luyanan 6 years ago
parent
commit
dc40070cf4

+ 1 - 1
config/dev.env.js

4
4
5
module.exports = merge(prodEnv, {
5
module.exports = merge(prodEnv, {
6
  NODE_ENV: '"development"',
6
  NODE_ENV: '"development"',
7
  BASE_API: '"http://localhost:90"'
7
  BASE_API: '""'
8
})
8
})

+ 1 - 1
config/prod.env.js

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

+ 8 - 8
src/api/bridgeInfo.js

66
    params
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
export function getMonitorByTime(params) {
76
export function getMonitorByTime(params) {
77
  return request({
77
  return request({
78
    url: '/ajax/collect/wave/server/time',
78
    url: '/ajax/collect/wave/server/time',
80
    params
80
    params
81
  })
81
  })
82
}
82
}
83
export function getTimingMonitor(params) {
83
export function getSysTime(params) {
84
  return request({
84
  return request({
85
    url: '/ajax/collect/wave/curr',
85
    url: '/ajax/collect/wave/curr',
86
    method: 'get',
86
    method: 'get',

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

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

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

186
      })
186
      })
187
    },
187
    },
188
    getSysTime() {
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
    },
208
    },
205
    getTimingMonitor() {
209
    getTimingMonitor() {
206
      var that = this
210
      var that = this
207
      var preTime = 2 * 60 * 1000
208
      var arr = this.serverSeqArr
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
      var endTime = this.formatTime(this.sysTime)
213
      var endTime = this.formatTime(this.sysTime)
211
      that.sysTime += 1000
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
      getMonitorByTime({ seq: arr, begin: startTime, end: endTime }).then(res => {
217
      getMonitorByTime({ seq: arr, begin: startTime, end: endTime }).then(res => {
213
        var mCache = that.monitorCache
218
        var mCache = that.monitorCache
214
        var mList = []
219
        var mList = []
219
              var ftime = res.data[0].ctime
224
              var ftime = res.data[0].ctime
220
              monModel.construct(mCache, res.data)
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
              for (;;) {
229
              for (;;) {
225
                var fts = that.formatTime(f_q_t)
230
                var fts = that.formatTime(f_q_t)
253
          if (iv < 0) {
258
          if (iv < 0) {
254
            iv = 1
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
          that.jishiTime = setTimeout(() => {
261
          that.jishiTime = setTimeout(() => {
261
            that.getTimingMonitor()
262
            that.getTimingMonitor()
262
          }, iv)
263
          }, iv)

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

105
          max: this.maxXcount
105
          max: this.maxXcount
106
        },
106
        },
107
        yAxis: {
107
        yAxis: {
108
          name: '毫伏(mv)',
109
          type: 'value'
108
          type: 'value',
109
          max: 8191,
110
          min: -8192
110
        },
111
        },
111
        legend: {
112
        legend: {
112
          data: ['信号值']
113
          data: ['信号值']
142
          dataZoom: [
143
          dataZoom: [
143
            {
144
            {
144
              type: 'slider',
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
              type: 'inside',
151
              type: 'inside',
152
              start: 94,
152
              xAxisIndex: 0,
153
              start: 0,
153
              end: 100
154
              end: 100
154
            },
155
            },
155
            {
156
            {
156
              type: 'slider',
157
              type: 'slider',
157
              show: true,
158
              yAxisIndex: 0,
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
      <navbar></navbar>
7
      <navbar></navbar>
8
      <app-main></app-main>
8
      <app-main></app-main>
9
    </div>
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
  </div>
18
  </div>
11
</template>
19
</template>
12
20
72
    position: absolute;
80
    position: absolute;
73
    z-index: 999;
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
</style>
95
</style>

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

24
  min-height: 100%;
24
  min-height: 100%;
25
  position: relative;
25
  position: relative;
26
  overflow: hidden;
26
  overflow: hidden;
27
  padding-bottom: 50px;
27
}
28
}
28
</style>
29
</style>

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