Commit 448241f2 authored by SQL_Mou's avatar SQL_Mou
parents e301769a d41bd207
...@@ -2,10 +2,10 @@ ENV = 'development' ...@@ -2,10 +2,10 @@ ENV = 'development'
# 接口地址 # 接口地址
#VUE_APP_BASE_API = 'http://localhost:8000' #VUE_APP_BASE_API = 'http://localhost:8000'
VUE_APP_BASE_API = 'http://8.143.203.103:9090' VUE_APP_BASE_API = 'http://192.168.0.108:8001'
VUE_APP_WS_API = 'ws://8.143.203.103:9090/webSocket' VUE_APP_WS_API = 'ws://8.143.203.103:9090/webSocket'
VUE_APP_LOCAL_API = 'http://8.143.203.103:9090' VUE_APP_LOCAL_API = 'http://192.168.0.108:8001'
VUE_APP_LOCAL_API2 = 'http://8.143.203.103:9090' VUE_APP_LOCAL_API2 = 'http://192.168.0.108:8001'
# 是否启用 babel-plugin-dynamic-import-node插件 # 是否启用 babel-plugin-dynamic-import-node插件
VUE_CLI_BABEL_TRANSPILE_MODULES = true VUE_CLI_BABEL_TRANSPILE_MODULES = true
{ {
"map3d": { "map3d": {
"scene": { "scene": {
"center": {"lat":37.4900,"lng":122.04849,"alt":1500,"heading":360,"pitch":-90}, "center": {"lat":37.4900,"lng":122.04849,"alt":1000,"heading":360,"pitch":-90},
"scene3DOnly": false, "scene3DOnly": false,
"shadows": false, "shadows": false,
"removeDblClick": true, "removeDblClick": true,
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
}, },
"cameraController": { "cameraController": {
"zoomFactor": 3.0, "zoomFactor": 3.0,
"minimumZoomDistance": 800, "minimumZoomDistance": 200,
"maximumZoomDistance": 50000000, "maximumZoomDistance": 50000000,
"enableRotate": true, "enableRotate": true,
"enableTranslate": true, "enableTranslate": true,
......
...@@ -36,53 +36,6 @@ export default { ...@@ -36,53 +36,6 @@ export default {
data(){ data(){
return{ return{
historyTrajectoryData:[], historyTrajectoryData:[],
persons:[
["122.128833", "37.526448", "500"],
["122.128638", "37.522818", "500"],
["122.128738", "37.522818", "500"],
["122.128638", "37.528518", "500"],
["122.128538", "37.528818", "500"],
["122.128538", "37.525818", "500"],
["122.121538", "37.523318", "500"],
["122.127833", "37.525448", "500"],
["122.128833", "37.526448", "500"],
["122.128638", "37.522818", "500"],
["122.128738", "37.522818", "500"],
["122.128638", "37.528518", "500"],
["122.128538", "37.528818", "500"],
["122.128538", "37.525818", "500"],
["122.121538", "37.523318", "500"],
["122.127833", "37.525448", "500"],
["122.128833", "37.526448", "500"],
["122.128638", "37.522818", "500"],
["122.128738", "37.522818", "500"],
["122.128638", "37.528518", "500"],
["122.128538", "37.528818", "500"],
["122.128538", "37.525818", "500"],
["122.121538", "37.523318", "500"],
["122.127833", "37.525448", "500"],
["122.128833", "37.526448", "500"],
["122.128638", "37.522818", "500"],
["122.128738", "37.522818", "500"],
["122.128638", "37.528518", "500"],
["122.128538", "37.528818", "500"],
["122.128538", "37.525818", "500"],
["122.121538", "37.523318", "500"],
["122.127833", "37.525448", "500"],
["122.128833", "37.526448", "500"],
["122.128638", "37.522818", "500"],
["122.128738", "37.522818", "500"],
["122.128638", "37.528518", "500"],
["122.128538", "37.528818", "500"],
["122.128538", "37.525818", "500"],
["122.121538", "37.523318", "500"],
["122.127833", "37.525448", "500"],
],
deviceId:'DESKTOP-L56LKGM', deviceId:'DESKTOP-L56LKGM',
zuobianData:[], zuobianData:[],
toJavaCoordinates:[], toJavaCoordinates:[],
...@@ -223,20 +176,6 @@ export default { ...@@ -223,20 +176,6 @@ export default {
map = new mars3d.Map(`mars3d-container${this.mapKey}`, mapOptions) map = new mars3d.Map(`mars3d-container${this.mapKey}`, mapOptions)
this[`map${this.mapKey}`] = map this[`map${this.mapKey}`] = map
//历史轨迹回放例子
// var graphicLayer1 = new mars3d.layer.GraphicLayer();
// map.addLayer(graphicLayer1);
// var itemText = `<table style="width: auto;">
// <tr>
// <th scope="col" colspan="2" style="text-align:center;font-size:15px;">卡车号码:${that.carNumber}</th>
// </tr>
// <tr>
// <td>设备名称:${that.deviceId}</td>
// </tr>
// </table>`;
// initGraphicManager(graphicLayer1,itemText);
// that.addGraphic_02(graphicLayer1,this.persons,that.carNumber);
//历史轨迹回放 //历史轨迹回放
that.historyTrajectoryData.forEach(function(item,index){ that.historyTrajectoryData.forEach(function(item,index){
var graphicLayer2 = new mars3d.layer.GraphicLayer(); var graphicLayer2 = new mars3d.layer.GraphicLayer();
...@@ -285,8 +224,9 @@ export default { ...@@ -285,8 +224,9 @@ export default {
}, },
label: { label: {
text: truckName, text: truckName,
font_size: 19, font_size: 22,
font_family: "楷体", font_family: "楷体",
color: "#ff0000",
color: Cesium.Color.AZURE, color: Cesium.Color.AZURE,
outline: true, outline: true,
outlineColor: Cesium.Color.BLACK, outlineColor: Cesium.Color.BLACK,
...@@ -296,8 +236,8 @@ export default { ...@@ -296,8 +236,8 @@ export default {
pixelOffset: new Cesium.Cartesian2(10, -25), //偏移量 pixelOffset: new Cesium.Cartesian2(10, -25), //偏移量
}, },
model: { model: {
url: "//data.mars3d.cn/gltf/mars/car/tufangche.glb", url: '//data.mars3d.cn/gltf/imap/1d4f63111fc9499dac5cee2286ad7bb3/gltf/gltf2.gltf',
scale: 0.1, scale: 1,
minimumPixelSize: 50, minimumPixelSize: 50,
}, },
}); });
......
...@@ -272,35 +272,27 @@ ...@@ -272,35 +272,27 @@
<div> <div>
<div class="dataScrView_rightView_title">矿石开采效率</div> <div class="dataScrView_rightView_title">矿石开采效率</div>
<div class="dataScrView_rightView_content"> <div class="dataScrView_rightView_content">
<div class="dataScrView_rightView_content_view1"> <div class="dataScrView_rightView_content_view1 guanhulanseditu">
<div class="dataScrView_rightView_content_view1_rate1"> <div id='liquidEchart1' class="dataScrView_rightView_content_view1_rate1"></div>
<div style="color:#06BEFA;">比率</div>
<div style="color:white;">28%</div>
</div>
<el-progress type="circle" :percentage="outputMineData.day.rate" :stroke-width="7" :width="80" :height="80" :show-text='false'></el-progress>
<div style="color:white;"> <div style="color:white;">
<div style="color:#A6F6F9;font-size:20px;"><span style="color:#06BEFA;">{{exploitationEfficiencyData.dayYield1}}</span> T</div>
<div>日总开采量</div> <div>日总开采量</div>
<div style="color:#A6F6F9;font-size:20px;"><span style="color:#06BEFA;">1000</span> T</div>
</div> </div>
<div style="color:white;"> <div style="color:white;">
<div style="color:#A6F6F9;font-size:20px;"><span style="color:#06BEFA;">{{exploitationEfficiencyData.dayMil1}}</span> KM</div>
<div>日总里程</div> <div>日总里程</div>
<div style="color:#A6F6F9;font-size:20px;"><span style="color:#06BEFA;">300</span> KM</div>
</div> </div>
</div> </div>
<div class="dataScrView_rightView_content_view1"> <div class="dataScrView_rightView_content_view1 guanhulvseditu">
<div class="dataScrView_rightView_content_view1_rate2">
<div style="color:#03FEFE;">比率</div>
<div style="color:white;">28%</div>
</div>
<div style="color:white;"> <div style="color:white;">
<div style="color:#A6F6F9;font-size:20px;"><span style="color:#03FEFE;">{{exploitationEfficiencyData.dayWorkTime2}}</span> H</div>
<div>司机日总工作时长</div> <div>司机日总工作时长</div>
<div style="color:#A6F6F9;font-size:20px;"><span style="color:#03FEFE;">1000</span> H</div>
</div> </div>
<div style="color:white;"> <div style="color:white;">
<div>日总开采量</div> <div style="color:#A6F6F9;font-size:20px;"><span style="color:#03FEFE;">{{exploitationEfficiencyData.dayYield2}}</span> T</div>
<div style="color:#A6F6F9;font-size:20px;"><span style="color:#03FEFE;">300</span> T</div> <div>日总开采量</div>
</div> </div>
<el-progress type="circle" :percentage="outputMineData.month.rate" :stroke-width="7" :width="80" :height="80" :show-text='false'></el-progress> <div id='liquidEchart2' class="dataScrView_rightView_content_view1_rate2"></div>
</div> </div>
</div> </div>
</div> </div>
...@@ -329,6 +321,7 @@ import * as echarts from 'echarts'; ...@@ -329,6 +321,7 @@ import * as echarts from 'echarts';
import sunnyPic from '../../../../assets/images/cutGraph/sunny.png' import sunnyPic from '../../../../assets/images/cutGraph/sunny.png'
import cloudyPic from '../../../../assets/images/cutGraph/cloudy.png' import cloudyPic from '../../../../assets/images/cutGraph/cloudy.png'
import overcastPic from '../../../../assets/images/cutGraph/overcast.png' import overcastPic from '../../../../assets/images/cutGraph/overcast.png'
import 'echarts-liquidfill'; // 引入水球图的组件
export default { export default {
data() { data() {
...@@ -401,7 +394,12 @@ export default { ...@@ -401,7 +394,12 @@ export default {
}, },
//矿石开采效率 //矿石开采效率
exploitationEfficiencyData:{ exploitationEfficiencyData:{
rate1:[0.5],
dayYield1:1000,
dayMil1:300,
rate2:[0.5],
dayWorkTime2:1000,
dayYield2:300,
}, },
//实时报警 //实时报警
realAlarmStyleData:{ realAlarmStyleData:{
...@@ -581,7 +579,8 @@ export default { ...@@ -581,7 +579,8 @@ export default {
} }
}) })
//矿石开采效率 //矿石开采效率
this.initLiquidEchart1();
this.initLiquidEchart2();
//实时报警 //实时报警
HttpReq.truckDispatching.callPoliceQuery({status:1}).then((res) => { HttpReq.truckDispatching.callPoliceQuery({status:1}).then((res) => {
if(res.code == 200){ if(res.code == 200){
...@@ -764,6 +763,113 @@ export default { ...@@ -764,6 +763,113 @@ export default {
} }
}) })
}, },
//矿石开采效率
initLiquidEchart1(){
echarts.init(document.getElementById('liquidEchart1')).dispose();
setTimeout(() => {
this.chartsLiquid = echarts.init(document.getElementById('liquidEchart1'));
// 把配置和数据放这里
this.chartsLiquid.setOption({
series: [{
type: 'liquidFill',
radius: '70px',
data: this.exploitationEfficiencyData.rate1,
label: {
normal: {
color: '#05ADFB',
insideColor: '#fff',
textStyle: {
fontSize: 18,
}
}
},
backgroundStyle: {
color: '#012861',
borderWidth: "1.5", // 内边框
borderColor: "rgb(6, 190, 250)"
},
color: [{
type: 'linear',
x: 0,
y: 1,
x2: 0,
y2: 0,
colorStops: [{
offset: 1,
color: ["rgb(6, 190, 250)"], // 0% 处的颜色
}, {
offset: 0,
color: ["rgb(6, 190, 250)"], // 100% 处的颜色
}],
global: false // 缺省为 false
}],
outline: {
show: true,
borderDistance: 0,
itemStyle: {
borderColor: '#012861',
borderWidth: 5,
shadowBlur: 5,
shadowColor: 'rgb(6, 190, 250)'
},
}
}]
});
}, 50)
},
initLiquidEchart2(){
echarts.init(document.getElementById('liquidEchart2')).dispose();
setTimeout(() => {
this.chartsLiquid = echarts.init(document.getElementById('liquidEchart2'));
// 把配置和数据放这里
this.chartsLiquid.setOption({
series: [{
type: 'liquidFill',
radius: '70px',
data: this.exploitationEfficiencyData.rate2,
label: {
normal: {
color: 'rgb(3, 254, 254)',
insideColor: '#fff',
textStyle: {
fontSize: 18,
}
}
},
backgroundStyle: {
color: '#012861',
borderWidth: "1.5", // 内边框
borderColor: "rgb(3, 254, 254)"
},
color: [{
type: 'linear',
x: 0,
y: 1,
x2: 0,
y2: 0,
colorStops: [{
offset: 1,
color: ["rgb(3, 254, 254)"], // 0% 处的颜色
}, {
offset: 0,
color: ["rgb(3, 254, 254)"], // 100% 处的颜色
}],
global: false // 缺省为 false
}],
outline: {
show: true,
borderDistance: 0,
itemStyle: {
borderColor: '#012861',
borderWidth: 5,
shadowBlur: 5,
shadowColor: 'rgb(3, 254, 254)'
},
}
}]
});
}, 50)
},
//获取当前时间 //获取当前时间
dayCurrentTimeFn(){ dayCurrentTimeFn(){
...@@ -1016,8 +1122,6 @@ dd>div{ ...@@ -1016,8 +1122,6 @@ dd>div{
bottom: 0px; bottom: 0px;
width: 100%; width: 100%;
height: 23.5vh; height: 23.5vh;
/* background:no-repeat center center url('~@/assets/images/cutGraph/yuanjianjuxing1.png');
background-size:100% 100%; */
background-color: rgba(32,42,67,0.8); background-color: rgba(32,42,67,0.8);
padding: 5px 7px; padding: 5px 7px;
box-sizing: border-box; box-sizing: border-box;
...@@ -1110,12 +1214,12 @@ dd>div{ ...@@ -1110,12 +1214,12 @@ dd>div{
.carPicStyle1{ .carPicStyle1{
width: 3.5vw; width: 3.5vw;
height: 3.5vw; height: 3.5vw;
border: 3px solid #03FEFE;
border-radius: 50%;
margin: 0px auto; margin: 0px auto;
position: relative; position: relative;
} }
.carPicStyle1>img{ .carPicStyle1>img{
height: 3.5vw;
width: 3.5vw;
position: absolute; position: absolute;
top: 50%; top: 50%;
left: 50%; left: 50%;
...@@ -1140,14 +1244,22 @@ dd>div{ ...@@ -1140,14 +1244,22 @@ dd>div{
justify-content: space-evenly; justify-content: space-evenly;
} }
.dataScrView_rightView_content_view1_rate1{ .dataScrView_rightView_content_view1_rate1{
position: absolute; height: 80px;
left: 3.1vw; width: 80px;
top: 2.4vh;
} }
.dataScrView_rightView_content_view1_rate2{ .dataScrView_rightView_content_view1_rate2{
position: absolute; height: 80px;
right: 2.3vw; width: 80px;
top: 2.4vh; }
.guanhulanseditu{
background:no-repeat center center url('~@/assets/images/cutGraph/juxinglanse.png');
background-size:100% 85%;
margin-right: 5%;
}
.guanhulvseditu{
background:no-repeat center center url('~@/assets/images/cutGraph/juxinglvse.png');
background-size:100% 90%;
margin-left: 5%;
} }
.realAlarmStyle{ .realAlarmStyle{
width: 100%; width: 100%;
......
...@@ -36,8 +36,8 @@ ...@@ -36,8 +36,8 @@
<!-- 嵌入三维地图页面 --> <!-- 嵌入三维地图页面 -->
<iframe src="http://8.143.203.103:9092/#/Index" frameborder="0" class="mapcontainer1"></iframe> <iframe src="http://8.143.203.103:9092/#/Index" frameborder="0" class="mapcontainer1"></iframe>
<!-- 单个车辆视频监控 --> <!-- 单个车辆视频监控 -->
<div class="monitorCover1" v-if="monitorCover1Show"> <div class="monitorCover1" v-show="monitorCover1Show">
<div class="monitorCover1_closePic"></div> <div class="monitorCover1_closePic" @click="closeMonitorCoverFn"></div>
<div class="monitorCover1_Video"> <div class="monitorCover1_Video">
<video id="monitorCover1Id" width="1300" height="700" muted autoplay></video> <video id="monitorCover1Id" width="1300" height="700" muted autoplay></video>
</div> </div>
...@@ -54,6 +54,7 @@ import intelligentSchedul from './components/intelligentSchedul/index.vue' //智 ...@@ -54,6 +54,7 @@ import intelligentSchedul from './components/intelligentSchedul/index.vue' //智
import dataAnalysis from './components/dataAnalysis/index.vue' //数据分析 import dataAnalysis from './components/dataAnalysis/index.vue' //数据分析
import carsEZUIKitJs from '../../components/ezuikit/carsEZUIKitJs.vue'//车辆监控 import carsEZUIKitJs from '../../components/ezuikit/carsEZUIKitJs.vue'//车辆监控
import kaungEZUIKitJs from '../../components/ezuikit/EZUIKitJs.vue'//矿山监控 import kaungEZUIKitJs from '../../components/ezuikit/EZUIKitJs.vue'//矿山监控
import Hls from "hls.js"
var noPtzhls1 = null; var noPtzhls1 = null;
export default { export default {
...@@ -263,6 +264,10 @@ export default { ...@@ -263,6 +264,10 @@ export default {
if(event.data.data.hasOwnProperty("url")){ if(event.data.data.hasOwnProperty("url")){
if(event.data.data.url == '监控'){ if(event.data.data.url == '监控'){
console.log('监控',event.data.data.data); console.log('监控',event.data.data.data);
if(noPtzhls1 != null){
noPtzhls1.destroy();
}
this.monitorCover1Show = true;
let monitorCover1Id = document.getElementById('monitorCover1Id'); let monitorCover1Id = document.getElementById('monitorCover1Id');
noPtzhls1 = new Hls(); noPtzhls1 = new Hls();
noPtzhls1.loadSource('http://kbs-dokdo.gscdn.com/dokdo_300/_definst_/dokdo_300.stream/playlist.m3u8'); noPtzhls1.loadSource('http://kbs-dokdo.gscdn.com/dokdo_300/_definst_/dokdo_300.stream/playlist.m3u8');
...@@ -271,16 +276,33 @@ export default { ...@@ -271,16 +276,33 @@ export default {
monitorCover1Id.play(); monitorCover1Id.play();
}); });
}else if(event.data.data.url == '轨迹回放'){ }else if(event.data.data.url == '轨迹回放'){
console.log('轨迹回放',event.data.data.data); let pathInfo = this.$router.resolve({
path:'/carManagement/carTrajectory',
query:{
number:event.data.data.data
}
})
window.open(pathInfo.href, '_blank');
} }
} }
}, },
//关闭视频蒙层
closeMonitorCoverFn(){
this.monitorCover1Show = false;
if(noPtzhls1 != null){
noPtzhls1.destroy();
}
},
}, },
beforeDestroy(){ beforeDestroy(){
this.$refs.intelligentSchedulMethod.xintiaoCloseFn(); this.$refs.intelligentSchedulMethod.xintiaoCloseFn();
if(this.timer) { if(this.timer) {
clearInterval(this.timer); clearInterval(this.timer);
} }
//注销视频
if(noPtzhls1 != null){
noPtzhls1.destroy();
}
} }
} }
</script> </script>
...@@ -398,5 +420,12 @@ export default { ...@@ -398,5 +420,12 @@ export default {
position: absolute; position: absolute;
top: 6vh; top: 6vh;
right: 3vw; right: 3vw;
cursor: pointer;
}
.monitorCover1_Video{
position: absolute;
top: 10vh;
left: 50vw;
transform: translateX(-50%);
} }
</style> </style>
\ No newline at end of file
...@@ -123,10 +123,7 @@ export default { ...@@ -123,10 +123,7 @@ export default {
} }
}, },
mounted() { mounted() {
var that = this; this.loadData();
this.$nextTick(() => {
this.loadData();
})
}, },
methods: { methods: {
loadData() { loadData() {
...@@ -135,14 +132,32 @@ export default { ...@@ -135,14 +132,32 @@ export default {
param.page = this.page - 1; param.page = this.page - 1;
param.size = this.size; param.size = this.size;
param.sort = sort; param.sort = sort;
let showData = [];
this.$nextTick(()=>{ this.$nextTick(()=>{
//获取故障表
HttpReq.truckDispatching.carFaultQuery(param).then((res) => { HttpReq.truckDispatching.carFaultQuery(param).then((res) => {
if(res.code == 200){ if(res.code == 200){
this.loading = false; this.loading = false;
this.tableData = res.data.content; this.tableData = res.data.content;
this.total = res.data.totalElements; this.total = res.data.totalElements;
let faultCarNumber1 = [];
res.data.content.forEach((item,index)=>{
if(item.status == '1'){
faultCarNumber1.push(item.number);
}
})
let set1 = new Set();
faultCarNumber1.forEach((item)=>{
set1.add(item);
})
let lastArray1 = Array.from(set1);
lastArray1.forEach((item)=>{
HttpReq.truckDispatching.carInformationQuery({number:item}).then((res1) => {
if(res1.code == 200){
HttpReq.truckDispatching.carInformationUpdate({id:res1.data.content[0].id,status:1}).then((res2) => {})
}
})
})
} }
}) })
//获取车辆信息 //获取车辆信息
...@@ -261,6 +276,13 @@ export default { ...@@ -261,6 +276,13 @@ export default {
//修改车辆故障 //修改车辆故障
reqUpdateItem(form, item){ reqUpdateItem(form, item){
let lastData = {...item}; let lastData = {...item};
//修改车辆信息状态数据
HttpReq.truckDispatching.carInformationQuery({number:lastData.number}).then((res1) => {
if(res1.code == 200){
HttpReq.truckDispatching.carInformationUpdate({id:res1.data.content[0].id,status:0}).then((res2) => {})
}
})
//修改故障表的数据
HttpReq.truckDispatching.carFaultUpdate(lastData).then((res) => { HttpReq.truckDispatching.carFaultUpdate(lastData).then((res) => {
form.visible = false; form.visible = false;
if(res.code == 200){ if(res.code == 200){
......
...@@ -75,20 +75,40 @@ export default { ...@@ -75,20 +75,40 @@ export default {
} }
}, },
mounted() { mounted() {
this.$nextTick(() => { let that = this;
this.loadData(); this.loadData();
this.$refs.mars3dViewerMapMethod.getCoordinate('','',5,'',''); if(this.$route.query.number){
}) this.query.number = this.$route.query.number;
HttpReq.truckDispatching.carInformationQuery({number:this.query.number}).then((res) => {
if(res.code == 200 && res.data.totalElements != 0){
this.tishiTextShow = false;
this.shuaxinTimer = new Date().getTime();
that.$refs.mars3dViewerMapMethod.getCoordinate(res.data.content[0].equipmentName,res.data.content[0].number,that.playSpeedNum,that.query.bTime,that.query.eTime);
}else{
this.$notify({
title: '暂无该车辆轨迹信息!',
type: 'warning',
duration: 2500
});
}
})
}
}, },
methods: { methods: {
// 点击搜索 // 点击搜索
toSearch() { toSearch() {
let that = this; let that = this;
HttpReq.truckDispatching.carInformationQuery({number:this.query.number}).then((res) => { HttpReq.truckDispatching.carInformationQuery({number:this.query.number}).then((res) => {
if(res.code == 200){ if(res.code == 200 && res.data.totalElements != 0){
this.tishiTextShow = false; this.tishiTextShow = false;
this.shuaxinTimer = new Date().getTime(); this.shuaxinTimer = new Date().getTime();
that.$refs.mars3dViewerMapMethod.getCoordinate(res.data.content[0].equipmentName,res.data.content[0].number,that.playSpeedNum,that.query.bTime,that.query.eTime); that.$refs.mars3dViewerMapMethod.getCoordinate(res.data.content[0].equipmentName,res.data.content[0].number,that.playSpeedNum,that.query.bTime,that.query.eTime);
}else{
this.$notify({
title: '暂无该车辆轨迹信息!',
type: 'warning',
duration: 2500
});
} }
}) })
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment