-
名称:{{ allData.wellName }}
+
+
名称:{{ allData.wellName }}
+
-
@@ -184,7 +188,7 @@
:dataSource="this.dataSource.length ? [{}]: []"
:pagination="false">
@@ -200,7 +204,6 @@
import CommonCard from '@comp/CommonCard'
import CommonCardInfo from '@comp/CommonCardInfo'
import ResponsiveChart from '@comp/ResponsiveChart'
-import * as echarts from 'echarts'
import { getOilWellRealTimeData, getWellheadList } from '@api/systemOverview'
import { wellheadType } from '@/enums/commonEnums'
import CommonEmpty from '@comp/CommonEmpty'
@@ -463,6 +466,7 @@ export default {
align: 'center'
}],
dataSource: [],
+ hasData: false, // 是否有数据
defaultId: 'default', // 默认数据的id
// 油井实时数据
oilWellRealTimeData: {},
@@ -531,31 +535,46 @@ export default {
}
}
},
+ watch: {
+ // 是否有数据状态改变
+ hasData () {
+ // 移除当前事件,然后绑定新事件
+ borderTable && borderTable.removeEventListener('scroll', borderTable)
+ leftTable && leftTable.removeEventListener('scroll', leftTable)
+ this.$nextTick(() => {
+ // 还原UI图:左侧两个表格,其中一个只显示滚动条,任意一个滚动,两个表格双向绑定滚动事件
+ borderTable = this.$refs.borderTable.$el.querySelector('.ant-table-body')
+ leftTable = this.$refs.leftTable.$el.querySelector('.ant-table-body')
+ borderTable.addEventListener('scroll', borderTableScroll)
+ leftTable.addEventListener('scroll', leftTableScroll)
+ })
+ }
+ },
mounted () {
this.searchQuery()
- this.$nextTick(() => {
- /* 处理左侧表格滚动两个表格滚动同步 begin */
- // 还原UI图:左侧两个表格,其中一个只显示滚动条,任意一个滚动,两个表格双向绑定滚动事件
- borderTable = this.$refs.borderTable.$el.querySelector('.ant-table-body')
- leftTable = this.$refs.leftTable.$el.querySelector('.ant-table-body')
- borderTable.addEventListener('scroll', borderTableScroll)
- leftTable.addEventListener('scroll', leftTableScroll)
- /* 处理左侧表格滚动两个表格滚动同步 end */
- })
},
beforeDestroy () {
// 离开页面前清除定时器
clearInterval(this.timer)
// 离开时清除事件
- borderTable.remove('scroll', borderTableScroll)
- leftTable.remove('scroll', leftTableScroll)
+ borderTable && borderTable.removeEventListener('scroll', borderTableScroll)
+ leftTable && leftTable.removeEventListener('scroll', leftTableScroll)
},
methods: {
searchQuery () {
const params = Object.assign({}, this.queryParam)
- // 没有条件恢复默认数据
- if (Object.values(params).filter(item => item || item !== 0).length === 0) {
- this.allData = staticData
+ console.log(params)
+ // if (!params.singleWell && !params.wellheadName) {
+ // this.$message.warning('请选择油井或输入井口名称查询')
+ // return
+ // }
+ // 选择单井查询
+ if (params.singleWell) {
+ const singleWell = this.singleWellList.find(item => item.id === params.singleWell)
+ this.hasData = true
+ this.allData = Object.assign({}, staticData, {
+ wellName: singleWell.wellheadName
+ })
this.dataSource = staticTableData
setTimeout(() => {
// 加载功图计产监控
@@ -570,6 +589,7 @@ export default {
return
}
// 置空数据,不请求实时数据
+ this.hasData = false
this.allData = {}
this.dataSource = []
clearInterval(this.timer)
@@ -608,7 +628,7 @@ export default {
const data = res.result || {}
this.oilWellRealTimeData = data
// 将油井实时参数放进全部数据中
- this.allData = Object.assign({}, staticData, data['油井实时参数'])
+ this.allData = Object.assign({}, this.allData, data['油井实时参数'])
this.initIndicatorDiagram(data['实时示功图'])
this.initLoadDistribution(data['载荷分布图'])
} else {
@@ -642,27 +662,15 @@ export default {
color: '#FF5353',
symbol: 'none',
smooth: true,
- areaStyle: {
- color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
- { offset: 0, color: 'rgba(255,83,83,0.2)' },
- { offset: 1, color: 'rgba(255,83,83,0)' }
- ])
- },
data: data['上冲程']
},
{
name: legendData[1],
type: 'line',
stack: 'downStroke',
- color: '#0094FF',
+ color: '#8FC7FF',
symbol: 'none',
smooth: true,
- areaStyle: {
- color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
- { offset: 0, color: 'rgba(0,148,255,0.2)' },
- { offset: 1, color: 'rgba(0,148,255,0)' }
- ])
- },
data: data['下冲程']
}
]
@@ -696,28 +704,16 @@ export default {
symbol: lineSymbolBase64,
symbolSize: 15,
smooth: true,
- areaStyle: {
- color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
- { offset: 0, color: 'rgba(46,228,253,0.2)' },
- { offset: 1, color: 'rgba(46,228,253,0)' }
- ])
- },
data: data.oilProduction
},
{
name: legendData[1],
type: 'line',
stack: 'liquidProduction',
- color: '#0094FF',
+ color: '#8FC7FF',
symbol: lineSymbolBase64,
symbolSize: 15,
smooth: true,
- areaStyle: {
- color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
- { offset: 0, color: 'rgba(0,148,255,0.2)' },
- { offset: 1, color: 'rgba(0,148,255,0)' }
- ])
- },
data: data.liquidProduction
}
]
@@ -817,14 +813,15 @@ export default {
}
.pump-type {
+ border: 1px solid @border-color-base;
position: relative;
- background-image: url("~@assets/images/systemOverview/wellheadDataMonitoring/pump-type-bg.png");
- background-size: 100%;
- background-repeat: no-repeat;
- background-position: left;
height: 84px;
- width: 364px;
- margin: 0 auto 20px;
+ background-color: rgba(143,199,255,0.1);
+ background-image: url("~@assets/images/systemOverview/wellheadDataMonitoring/pump-type.png");
+ background-repeat: no-repeat;
+ background-size: 60px 60px;
+ background-position: 12px 12px;
+ width: 100%;
&-title {
position: absolute;
@@ -833,8 +830,17 @@ export default {
font-family: DingTalk JinBuTi, DingTalk JinBuTi, sans-serif;
font-weight: 400;
font-size: 15px;
- color: rgba(255,255,255,0.96);
+ color: @text-color;
line-height: 18px;
+ // 最大宽度 = 100% - 距离左侧 - 距离右侧
+ max-width: calc(100% - 88px - 12px);
+ z-index: 1;
+
+ &::before {
+ // 背景宽度 = 内容宽度 + 左侧4px 右侧4px
+ max-width: calc(100% + 8px);
+ min-width: 124px;
+ }
}
&-remarks {
position: absolute;
@@ -845,9 +851,7 @@ export default {
font-size: 12px;
color: #D0DEEE;
line-height: 14px;
- width: 70%;
- white-space: nowrap;
- word-break: break-all;
+ max-width: calc(100% - 88px - 12px);
}
}
@@ -856,21 +860,25 @@ export default {
height: 100%;
.working-status-title {
- background-size: 124px 16px;
- background: url("~@/assets/images/text-bg.png") no-repeat 0 6px;
- font-family: DingTalk JinBuTi, DingTalk JinBuTi, sans-serif;
font-weight: 400;
font-size: 15px;
- color: rgba(255,255,255,0.96);
+ color: @text-color;
line-height: 18px;
- padding-left: 4px;
+ max-width: 100%;
+ margin-bottom: 18px;
+
+ // 背景宽度 = 内容宽度 + 左侧4px 右侧4px
+ &::before {
+ max-width: calc(100% + 8px);
+ min-width: 124px;
+ }
}
.working-status-img {
height: 178px;
font-size: 0;
text-align: center;
- margin: 12px auto 18px;
+ margin: 0 auto 18px;
img {
height: 100%;
@@ -881,6 +889,10 @@ export default {
display: flex;
justify-content: center;
+ /deep/.ant-btn {
+ height: 32px;
+ }
+
button:not(:last-child) {
margin-right: 16px;
}
@@ -901,7 +913,7 @@ export default {
}
.info-row .info-value {
- color: #2EE4FD;
+ color: @primary-color;
}
.divider-vertical {
width: 1px;
@@ -935,9 +947,16 @@ export default {
left: 50%;
transform: translate(-50%, calc(-50% + 20px));
display: inline-block;
- width: 40px;
- height: 100px;
- background: url("~@/assets/images/systemOverview/wellheadDataMonitoring/all-alarms-btn.png");
+ width: 36px;
+ height: 96px;
+ padding: 12px 0;
+ background: #8FC7FF;
+ border-radius: 2px;
+ font-family: Rubik, Rubik, sans-serif;
+ font-weight: 500;
+ font-size: 14px;
+ color: #1D2632;
+ line-height: 18px;
}
.left-table {
display: inline-block;
@@ -962,17 +981,15 @@ export default {
width: 100%;
// 屏幕高度 - 头部导航高度 - 搜索部分高度 - 距离底部
height: calc(100vh - 158px - 84px - 20px);
- background: rgba(0,148,255,0.08);
- border: 1px solid rgba(0,148,255,0.24);
+ border: 1px solid @border-color-base;
.empty {
position: absolute;
- height: 45%;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
/deep/ .ant-empty-image {
- height: 100%;
+ height: 140px;
}
/deep/ .empty-text {
font-size: 26px;
@@ -986,7 +1003,7 @@ export default {
right: 10px;
top: 40px;
bottom: 0;
- width: 5px;
+ width: 6px;
overflow: hidden;
.border-table {
position: absolute;
diff --git a/src/views/user/Login.vue b/src/views/user/Login.vue
index 957b728..7250bff 100644
--- a/src/views/user/Login.vue
+++ b/src/views/user/Login.vue
@@ -276,10 +276,10 @@ export default {
} else {
this.$router.push({ path: '/' }).catch((/* res */) => {})
}
- this.$notification.success({
- message: '欢迎',
- description: `${timeFix()},欢迎回来`
- })
+ // this.$notification.success({
+ // message: '欢迎',
+ // description: `${timeFix()},欢迎回来`
+ // })
},
cmsFailed (err) {
this.$notification.error({
diff --git a/vue.config.js b/vue.config.js
index 98e20c5..42ea228 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -65,8 +65,8 @@ module.exports = {
less: {
modifyVars: {
/* less 变量覆盖,用于自定义 ant design 主题 */
- 'primary-color': '#0094FF',
- 'link-color': '#0094FF',
+ 'primary-color': '#8FC7FF',
+ 'link-color': '#8FC7FF',
'border-radius-base': '4px',
...modifyLessVars
},