luyanan 6 years ago
parent
commit
dc40070cf4

+ 1 - 1
config/dev.env.js

@ -4,5 +4,5 @@ const prodEnv = require('./prod.env')
4 4
5 5
module.exports = merge(prodEnv, {
6 6
  NODE_ENV: '"development"',
7
  BASE_API: '"http://localhost:90"'
7
  BASE_API: '""'
8 8
})

+ 1 - 1
config/prod.env.js

@ -1,5 +1,5 @@
1 1
'use strict'
2 2
module.exports = {
3 3
  NODE_ENV: '"production"',
4
  BASE_API: '"http://touchwave.cn"'
4
  BASE_API: '""'
5 5
}

+ 8 - 8
src/api/bridgeInfo.js

@ -66,13 +66,13 @@ export function getMonitorByDay(params) {
66 66
    params
67 67
  })
68 68
}
69
export function getSysTime(params) {
70
  return request({
71
    url: '/ajax/sys/serviceTime',
72
    method: 'get',
73
    params
74
  })
75
}
69
// export function getSysTime(params) {
70
//   return request({
71
//     url: '/ajax/sys/serviceTime',
72
//     method: 'get',
73
//     params
74
//   })
75
// }
76 76
export function getMonitorByTime(params) {
77 77
  return request({
78 78
    url: '/ajax/collect/wave/server/time',
@ -80,7 +80,7 @@ export function getMonitorByTime(params) {
80 80
    params
81 81
  })
82 82
}
83
export function getTimingMonitor(params) {
83
export function getSysTime(params) {
84 84
  return request({
85 85
    url: '/ajax/collect/wave/curr',
86 86
    method: 'get',

+ 2 - 1
src/views/bridgesConsole/bridgeDanger/dangerDetail.vue

@ -7,7 +7,7 @@
7 7
      </div>
8 8
      <el-row class="line-chart-box">
9 9
        <el-col :xs="24" :sm="24" :lg="24" v-for="(item, index) in alarmShowList" :key="item.index">
10
          <lineChart :chartData="item" :lineColor="index"></lineChart>
10
          <lineChart :chartData="item" :lineColor="index" :historyM="historyM"></lineChart>
11 11
        </el-col>
12 12
      </el-row>
13 13
      <div class="pagination-container">
@ -32,6 +32,7 @@ import lineChart from '../lineChart/LineChart'
32 32
export default {
33 33
  data() {
34 34
    return {
35
      historyM: true,
35 36
      alarmId: '',
36 37
      alarmTit: '',
37 38
      alarmRead: false,

+ 15 - 14
src/views/bridgesConsole/bridgeDetail/index.vue

@ -186,13 +186,17 @@ export default {
186 186
      })
187 187
    },
188 188
    getSysTime() {
189
      getSysTime().then(res => {
190
        if (res.success) {
191
          this.sysTime = res.data + this.eastEightDistrict - (5 * 60 * 1000)
192
          const localTime = new Date().getTime() + this.eastEightDistrict
193
          this.localTimeiv = localTime - this.sysTime
194
          this.first_Q = true
195
          this.getTimingMonitor()
189
      var that = this
190
      var arr = this.serverSeqArr
191
      getSysTime({ seq: arr }).then(res => {
192
        if (res.success && res.data && res.data.length > 0) {
193
          // that.sysTime = res.data + that.eastEightDistrict - (5 * 60 * 1000)
194
          const nowt = parseTime(res.data[0].ctime, true, true)
195
          that.sysTime = (new Date(nowt)).getTime() + that.eastEightDistrict - 2 * 60 * 1000
196
          const localTime = new Date().getTime() + that.eastEightDistrict
197
          that.localTimeiv = localTime - that.sysTime
198
          that.first_Q = true
199
          that.getTimingMonitor()
196 200
        }
197 201
      })
198 202
    },
@ -204,11 +208,12 @@ export default {
204 208
    },
205 209
    getTimingMonitor() {
206 210
      var that = this
207
      var preTime = 2 * 60 * 1000
208 211
      var arr = this.serverSeqArr
209
      var startTime = this.formatTime(this.first_Q ? (this.sysTime - preTime) : this.sysTime)
212
      var startTime = this.formatTime(this.sysTime)
210 213
      var endTime = this.formatTime(this.sysTime)
211 214
      that.sysTime += 1000
215
      // var startTime = this.formatTime(this.first_Q ? (this.sysTime - preTime) : this.sysTime)
216
      // var endTime = this.formatTime(this.sysTime)
212 217
      getMonitorByTime({ seq: arr, begin: startTime, end: endTime }).then(res => {
213 218
        var mCache = that.monitorCache
214 219
        var mList = []
@ -219,7 +224,7 @@ export default {
219 224
              var ftime = res.data[0].ctime
220 225
              monModel.construct(mCache, res.data)
221 226
222
              var f_q_t = that.sysTime - preTime
227
              var f_q_t = that.sysTime
223 228
224 229
              for (;;) {
225 230
                var fts = that.formatTime(f_q_t)
@ -253,10 +258,6 @@ export default {
253 258
          if (iv < 0) {
254 259
            iv = 1
255 260
          }
256
          // console.log('upNow:' + that.sysTime)
257
          // console.log('now:' + st)
258
          // console.log('interval:' + iv)
259
          // console.log(typeof(iv))
260 261
          that.jishiTime = setTimeout(() => {
261 262
            that.getTimingMonitor()
262 263
          }, iv)

+ 16 - 14
src/views/bridgesConsole/lineChart/LineChart.vue

@ -105,8 +105,9 @@ export default {
105 105
          max: this.maxXcount
106 106
        },
107 107
        yAxis: {
108
          name: '毫伏(mv)',
109
          type: 'value'
108
          type: 'value',
109
          max: 8191,
110
          min: -8192
110 111
        },
111 112
        legend: {
112 113
          data: ['信号值']
@ -142,26 +143,27 @@ export default {
142 143
          dataZoom: [
143 144
            {
144 145
              type: 'slider',
145
              show: true,
146
              start: 94,
147
              end: 100,
148
              handleSize: 8
146
              xAxisIndex: 0,
147
              start: 0,
148
              end: 100
149 149
            },
150 150
            {
151 151
              type: 'inside',
152
              start: 94,
152
              xAxisIndex: 0,
153
              start: 0,
153 154
              end: 100
154 155
            },
155 156
            {
156 157
              type: 'slider',
157
              show: true,
158 158
              yAxisIndex: 0,
159
              filterMode: 'empty',
160
              width: 12,
161
              height: '70%',
162
              handleSize: 8,
163
              showDataShadow: false,
164
              left: '98%'
159
              start: 0,
160
              end: 100
161
            },
162
            {
163
              type: 'inside',
164
              yAxisIndex: 0,
165
              start: 0,
166
              end: 100
165 167
            }
166 168
          ]
167 169
        })

+ 20 - 0
src/views/layout/Layout.vue

@ -7,6 +7,14 @@
7 7
      <navbar></navbar>
8 8
      <app-main></app-main>
9 9
    </div>
10
    <div class="main-footer">
11
      <div style="margin:0 auto; padding:8px 0;">
12
        <a target="_blank" href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=11010802027571" style="display:inline-block;text-decoration:none;margin-top:10px">
13
          <img src="./img/beian.png" width="18" style="float:left;"/>
14
          <p style="float:left;height:20px;line-height:20px;margin: 0px 0px 0px 5px; color:#939393;">京公网安备 11010802027571号</p>
15
        </a>
16
      </div>
17
    </div>
10 18
  </div>
11 19
</template>
12 20
@ -72,4 +80,16 @@ export default {
72 80
    position: absolute;
73 81
    z-index: 999;
74 82
  }
83
  .main-footer{
84
    z-index: 2002;
85
    position:fixed;
86
    background: rgba(48, 65, 86, 1);
87
    border-top:1px solid #e6e6e6;
88
    bottom:0;
89
    left:0;
90
    right:0;
91
    font-size:14px;
92
    text-align: center;
93
    color: #333;
94
  }
75 95
</style>

+ 1 - 0
src/views/layout/components/AppMain.vue

@ -24,5 +24,6 @@ export default {
24 24
  min-height: 100%;
25 25
  position: relative;
26 26
  overflow: hidden;
27
  padding-bottom: 50px;
27 28
}
28 29
</style>

BIN
src/views/layout/img/beian.png