pc-master #110

Merged
xiaomeng merged 2 commits from pc-master into portal 2024-02-20 00:20:59 +00:00
7 changed files with 77 additions and 56 deletions

View File

@ -627,6 +627,12 @@
width: 120px; width: 120px;
} }
.input-main.input-disabled input {
background: transparent;
border: 2px solid transparent;
padding-left: 0;
}
.input-main.input-main-w260 input { .input-main.input-main-w260 input {
width: 260px; width: 260px;
} }

File diff suppressed because one or more lines are too long

View File

@ -661,6 +661,13 @@
width: 120px; width: 120px;
} }
} }
&.input-disabled{
input{
background: transparent;
border: 2px solid transparent;
padding-left: 0;
}
}
&.input-main-w260{ &.input-main-w260{
input{ input{
width: 260px; width: 260px;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -371,6 +371,7 @@ export function realTimeLine(id, data,pageId) {
} }
export function statusCharts(id, data) { export function statusCharts(id, data) {
var chartDom = document.getElementById(id); var chartDom = document.getElementById(id);
var myChart = echarts.init(chartDom); var myChart = echarts.init(chartDom);
var option; var option;

View File

@ -148,6 +148,7 @@
alt=""> alt="">
<img v-else src="../../assets/img/fan-off.png" alt=""> <span>5#风机</span> <img v-else src="../../assets/img/fan-off.png" alt=""> <span>5#风机</span>
</div> </div>
<div style="display: none;"></div>
</div> </div>
</div> </div>
<div v-else class="status-noTrue"> <div v-else class="status-noTrue">
@ -219,6 +220,7 @@
<img v-else src="../../assets/img/fan-off.png" alt=""> <img v-else src="../../assets/img/fan-off.png" alt="">
<span>8#补光灯</span> <span>8#补光灯</span>
</div> </div>
<div style="display: none;"></div>
</div> </div>
</div> </div>
<div v-else class="status-noTrue"> <div v-else class="status-noTrue">
@ -250,7 +252,7 @@
</div> </div>
<div class="status-true-text" v-if="item.type == 2 || item.type == 5 || item.type == 6 || item.type == 12 <div class="status-true-text" v-if="item.type == 2 || item.type == 5 || item.type == 6 || item.type == 12
|| item.type == 13 || item.type == 14 || item.type == 15|| item.type == 16"> || item.type == 13 || item.type == 14 || item.type == 15 || item.type == 16">
<div class="status-true-text-left">{{ getNumberStatus(item) }}</div> <div class="status-true-text-left">{{ getNumberStatus(item) }}</div>
<div class="status-true-text-right" <div class="status-true-text-right"
v-if="item.type == 6 || item.type == 5 || item.type == 2 || item.type == 15 || item.type == 14 || item.type == 13 || item.type == 12"> v-if="item.type == 6 || item.type == 5 || item.type == 2 || item.type == 15 || item.type == 14 || item.type == 13 || item.type == 12">
@ -258,10 +260,9 @@
</div> </div>
<div class="status-fan status-btn" v-else> <div class="status-fan status-btn" v-else>
<div class="btn" :class="item.index == 1 ? 'blue' : 'off'"> <div class="btn" :class="item.index == 1 ? 'blue' : 'off'">
<img class="light-img" :src="getIcon(item)" <img class="light-img" :src="getIcon(item)" alt="">
alt="">
<!-- <img v-else src="../../assets/img/fan-off.png" alt=""> --> <!-- <img v-else src="../../assets/img/fan-off.png" alt=""> -->
<span>{{item.index==1?'开启':'关闭'}}</span> <span>{{ item.index == 1 ? '开启' : '关闭' }}</span>
</div> </div>
</div> </div>
</div> </div>
@ -667,7 +668,7 @@ export default {
height: divH, // 1080 px height: divH, // 1080 px
}) })
}, },
getIcon(item){ getIcon(item) {
var index = item.index var index = item.index
if (item.type == 3) { if (item.type == 3) {
// //
@ -688,7 +689,7 @@ export default {
} else { } else {
return '' return ''
} }
}else if (item.type == 4) { } else if (item.type == 4) {
// //
if (index == 0) { if (index == 0) {
return require('../../assets/img/fan-off.png') return require('../../assets/img/fan-off.png')
@ -697,7 +698,7 @@ export default {
} else { } else {
return '' return ''
} }
}else if (item.type == 9) { } else if (item.type == 9) {
// //
if (index == 0) { if (index == 0) {
return require('../../assets/img/fan-off.png') return require('../../assets/img/fan-off.png')
@ -732,7 +733,7 @@ export default {
getNumberStatus(item) { getNumberStatus(item) {
var index = item.index var index = item.index
if (item.type == 2 || item.type == 5 || item.type == 6 || item.type == 12 if (item.type == 2 || item.type == 5 || item.type == 6 || item.type == 12
|| item.type == 13 || item.type == 14 || item.type == 15|| item.type == 16) { || item.type == 13 || item.type == 14 || item.type == 15 || item.type == 16) {
// //
if (index == 0) { if (index == 0) {
return '静止状态' return '静止状态'
@ -944,7 +945,7 @@ export default {
this.api.postFsdata(data1).then(res => { this.api.postFsdata(data1).then(res => {
if (res.data.code == 200) { if (res.data.code == 200) {
var chartsData = res.data.data var chartsData = res.data.data
realTimeLine('realTime-line', chartsData,data1) realTimeLine('realTime-line', chartsData, data1)
} else { } else {
// this.$message.error(res.data.msg); // this.$message.error(res.data.msg);
} }
@ -1057,7 +1058,7 @@ export default {
this.api.getControlFsdata(data1).then(res => { this.api.getControlFsdata(data1).then(res => {
if (res.data.code == 200) { if (res.data.code == 200) {
var chartsData = res.data.data var chartsData = res.data.data
realTimeLine('realTime-line', chartsData,data1) realTimeLine('realTime-line', chartsData, data1)
} else { } else {
// this.$message.error(res.data.msg); // this.$message.error(res.data.msg);
} }
@ -1120,7 +1121,7 @@ export default {
if (res.data.code == 200) { if (res.data.code == 200) {
res.data.data.forEach((el, index) => { res.data.data.forEach((el, index) => {
var chartsData = res.data.data var chartsData = res.data.data
realTimeLine('realTime-line', chartsData,equipmentId) realTimeLine('realTime-line', chartsData, equipmentId)
}) })
} }
}) })
@ -1224,19 +1225,19 @@ export default {
} }
this.api.getControlGetState(TargetValue).then(res => { this.api.getControlGetState(TargetValue).then(res => {
if (res.data.code == 200) { if (res.data.code == 200) {
if(res.data.data["1119"]){ if (res.data.data["1119"]) {
this.sunrise = this.insertColonEveryTwoDigits( this.sunrise = this.insertColonEveryTwoDigits(
this.convertToTimeMinutes(res.data.data["1119"]) this.convertToTimeMinutes(res.data.data["1119"])
); );
}else{ } else {
this.sunrise ='' this.sunrise = ''
} }
if(res.data.data["1120"]){ if (res.data.data["1120"]) {
this.sunset = this.insertColonEveryTwoDigits( this.sunset = this.insertColonEveryTwoDigits(
this.convertToTimeMinutes(res.data.data["1120"]) this.convertToTimeMinutes(res.data.data["1120"])
); );
}else{ } else {
this.sunset ='' this.sunset = ''
} }
const statusList = [] const statusList = []
@ -1249,7 +1250,7 @@ export default {
fandata.type = 1 fandata.type = 1
fandata.name = el.name fandata.name = el.name
fandata.status = [] fandata.status = []
var num = res.data.data['1024']?res.data.data['1024']:0 var num = res.data.data['1024'] ? res.data.data['1024'] : 0
var num1 = this.padString(num.toString(2), 5) var num1 = this.padString(num.toString(2), 5)
var openListNew = [] var openListNew = []
openListNew = num1.split("") openListNew = num1.split("")
@ -1263,7 +1264,7 @@ export default {
fandata.type = 1 fandata.type = 1
fandata.name = el.name fandata.name = el.name
fandata.status = [] fandata.status = []
var num = res.data.data['1079']?res.data.data['1079']:0 var num = res.data.data['1079'] ? res.data.data['1079'] : 0
var num1 = this.padString(num.toString(2), 5) var num1 = this.padString(num.toString(2), 5)
var openListNew = [] var openListNew = []
openListNew = num1.split("") openListNew = num1.split("")
@ -1277,7 +1278,7 @@ export default {
fandata.type = 8 fandata.type = 8
fandata.name = el.name fandata.name = el.name
fandata.status = [] fandata.status = []
var num = res.data.data['1069']?res.data.data['1069']:0 var num = res.data.data['1069'] ? res.data.data['1069'] : 0
var num1 = this.padString(num.toString(2), 8) var num1 = this.padString(num.toString(2), 8)
var openListNew = [] var openListNew = []
openListNew = num1.split("") openListNew = num1.split("")
@ -1339,19 +1340,25 @@ export default {
// //
var statusData = { name: el.name, type: 15, id: el.id, open: res.data.data[(1102 + ((el.id - 26) * 3))], progress: res.data.data[(1104 + ((el.id - 26) * 3))], index: res.data.data[(1103 + ((el.id - 26) * 3))] } var statusData = { name: el.name, type: 15, id: el.id, open: res.data.data[(1102 + ((el.id - 26) * 3))], progress: res.data.data[(1104 + ((el.id - 26) * 3))], index: res.data.data[(1103 + ((el.id - 26) * 3))] }
statusList.push(statusData) statusList.push(statusData)
} else if (el.id == 30 || el.id == 31 ) { } else if (el.id == 30 || el.id == 31) {
// //
var statusData = { name: el.name, type: 16, id: el.id, open: res.data.data[(1182 + ((el.id - 30) * 3))], progress: res.data.data[(1184 + ((el.id - 30) * 3))], index: res.data.data[(1183 + ((el.id - 30) * 3))] } var statusData = { name: el.name, type: 16, id: el.id, open: res.data.data[(1182 + ((el.id - 30) * 3))], progress: res.data.data[(1184 + ((el.id - 30) * 3))], index: res.data.data[(1183 + ((el.id - 30) * 3))] }
statusList.push(statusData) statusList.push(statusData)
} }
}) })
this.statusList = statusList this.statusList = statusList
this.$forceUpdate(); this.$forceUpdate();
setTimeout(() => { setTimeout(() => {
this.statusList.forEach((el, index) => { this.statusList.forEach((el, index) => {
if (el.open != 0 && (el.type == 6 || el.type == 5 || el.type == 2 || el.type == 15 || el.type == 14 || el.type == 13 || el.type == 12)) { if (el.open != 0 && (el.type == 6 || el.type == 5 || el.type == 2 || el.type == 15 || el.type == 14 || el.type == 13 || el.type == 12)) {
setTimeout(() => {
statusCharts(`statusCharts${index}`, el.progress) statusCharts(`statusCharts${index}`, el.progress)
}, 0);
} }
}) })
}, 10); }, 10);

View File

@ -59,7 +59,7 @@
type="text" placeholder="0"> type="text" placeholder="0">
<span></span> <span></span>
</div> </div>
<div class="input-main input-main-w120"> <div class="input-main input-main-w120 input-disabled">
<div>PID计算结果</div> <div>PID计算结果</div>
<input disabled v-model="statusData[1114+Number(indexs)]" <input disabled v-model="statusData[1114+Number(indexs)]"
type="text" placeholder="0"> type="text" placeholder="0">