二维码模板
This commit is contained in:
parent
ab81562fdd
commit
bd27dbc86a
|
@ -102,6 +102,20 @@ export function deviceCode(data) {
|
||||||
data,
|
data,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function energyStorage(data) {
|
||||||
|
return request({
|
||||||
|
url:
|
||||||
|
'/device/energyStorage?deviceId=' +
|
||||||
|
data.deviceCode +
|
||||||
|
'&page=' +
|
||||||
|
data.page +
|
||||||
|
'&size=' +
|
||||||
|
data.size,
|
||||||
|
method: 'get',
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
}
|
||||||
//传感器数据 可读
|
//传感器数据 可读
|
||||||
export function sensorsOfWrite(data) {
|
export function sensorsOfWrite(data) {
|
||||||
return request({
|
return request({
|
||||||
|
|
|
@ -239,7 +239,11 @@ export default {
|
||||||
productAttribute(code).then(res => {
|
productAttribute(code).then(res => {
|
||||||
this.dialogqrcodeVisible = true;
|
this.dialogqrcodeVisible = true;
|
||||||
this.codeId = row.billNo;
|
this.codeId = row.billNo;
|
||||||
this.codeUrl = 'http://sm.lidinghb.com?materialCode=' + code;
|
this.codeUrl =
|
||||||
|
'http://sm.lidinghb.com?materialCode=' +
|
||||||
|
code +
|
||||||
|
'&billNo=' +
|
||||||
|
row.billNo;
|
||||||
this.qrinfoData = res.data;
|
this.qrinfoData = res.data;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
@ -93,7 +93,7 @@ onMounted(() => {
|
||||||
<style scoped>
|
<style scoped>
|
||||||
@media print {
|
@media print {
|
||||||
@page {
|
@page {
|
||||||
size: 60mm 40mm;
|
size: 90mm 60mm;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
@ -104,14 +104,10 @@ onMounted(() => {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
img {
|
|
||||||
width: 61mm;
|
|
||||||
height: 39mm;
|
|
||||||
}
|
|
||||||
|
|
||||||
.container {
|
.container {
|
||||||
width: 60mm;
|
width: 90mm;
|
||||||
height: 40mm;
|
height: 60mm;
|
||||||
position: relative;
|
position: relative;
|
||||||
.equipment {
|
.equipment {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
@ -123,31 +119,31 @@ onMounted(() => {
|
||||||
}
|
}
|
||||||
.date {
|
.date {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 47px;
|
top: 71px;
|
||||||
left: 18mm;
|
left: 25mm;
|
||||||
|
|
||||||
font-size: 6pt;
|
font-size: 9pt;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: #000;
|
color: #000;
|
||||||
}
|
}
|
||||||
img {
|
img {
|
||||||
width: 61mm;
|
width: 85mm;
|
||||||
height: 39mm;
|
height: 58mm;
|
||||||
}
|
}
|
||||||
|
|
||||||
.qrcodeimg {
|
.qrcodeimg {
|
||||||
width: 12mm;
|
width: 17mm;
|
||||||
height: 12mm;
|
height: 17mm;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 20px;
|
bottom: 33px;
|
||||||
right: 3mm;
|
right: 10mm;
|
||||||
}
|
}
|
||||||
|
|
||||||
.qrcodeSn {
|
.qrcodeSn {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 13px;
|
bottom: 22px;
|
||||||
right: 4mm;
|
right: 11mm;
|
||||||
font-size: 4pt;
|
font-size: 6pt;
|
||||||
color: #000;
|
color: #000;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,123 @@
|
||||||
|
<template>
|
||||||
|
<el-table
|
||||||
|
v-loading="listLoading"
|
||||||
|
:data="sensorData"
|
||||||
|
border
|
||||||
|
stripe
|
||||||
|
style="width: 100%"
|
||||||
|
>
|
||||||
|
<el-table-column
|
||||||
|
prop="name"
|
||||||
|
label="传感器名称"
|
||||||
|
align="center"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="dataKey"
|
||||||
|
label="传输id"
|
||||||
|
align="center"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column prop="dataValue" label="值" align="center">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-tag type="success">{{ row.dataValue }}</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="unit" label="单位" align="center"></el-table-column>
|
||||||
|
<el-table-column label="操作" align="center">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-button
|
||||||
|
v-if="row.readWrite == '读写' && isBtnPerm('/deviceSensor/write')"
|
||||||
|
type="text"
|
||||||
|
@click="distribute(row)"
|
||||||
|
>
|
||||||
|
下发指令
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<el-pagination
|
||||||
|
:background="background"
|
||||||
|
:current-page="queryForm.page"
|
||||||
|
:layout="layout"
|
||||||
|
:page-size="queryForm.size"
|
||||||
|
:total="total"
|
||||||
|
style="text-align: right"
|
||||||
|
@current-change="handleCurrentChange"
|
||||||
|
@size-change="handleSizeChange"
|
||||||
|
></el-pagination>
|
||||||
|
<distribute ref="distribute"></distribute>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { energyStorage } from '@/api/monitor';
|
||||||
|
import distribute from '@/views/server/siteDetails/distribute';
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
distribute,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
sensorData: [],
|
||||||
|
lazy: true,
|
||||||
|
activeName: 'first',
|
||||||
|
layout: 'prev, pager, next',
|
||||||
|
total: 0,
|
||||||
|
background: true,
|
||||||
|
listLoading: true,
|
||||||
|
elementLoadingText: '正在加载...',
|
||||||
|
queryForm: {
|
||||||
|
page: 1,
|
||||||
|
size: 5,
|
||||||
|
deviceCode: '',
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
height() {
|
||||||
|
return 500;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
showData(row) {
|
||||||
|
this.queryForm.deviceCode = row.deviceCode;
|
||||||
|
this.fetchData();
|
||||||
|
},
|
||||||
|
async fetchData() {
|
||||||
|
this.listLoading = true;
|
||||||
|
const { data } = await energyStorage(this.queryForm);
|
||||||
|
this.sensorData = data.items;
|
||||||
|
this.total = data.total;
|
||||||
|
setTimeout(() => {
|
||||||
|
this.listLoading = false;
|
||||||
|
}, 500);
|
||||||
|
},
|
||||||
|
distribute(row) {
|
||||||
|
const dataKey = row.dataKey;
|
||||||
|
const deviceCode = this.queryForm.deviceCode;
|
||||||
|
this.$refs['distribute'].showEdit({
|
||||||
|
deviceCode: deviceCode,
|
||||||
|
dataKey: dataKey,
|
||||||
|
unit: row.unit,
|
||||||
|
convertFlag: row.convertFlag,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleQuery() {
|
||||||
|
this.queryForm.pageNo = 1;
|
||||||
|
this.fetchData();
|
||||||
|
},
|
||||||
|
handleSizeChange(val) {
|
||||||
|
this.queryForm.pageSize = val;
|
||||||
|
this.fetchData();
|
||||||
|
},
|
||||||
|
handleCurrentChange(val) {
|
||||||
|
this.queryForm.pageNo = val;
|
||||||
|
this.fetchData();
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.manage-button {
|
||||||
|
margin-bottom: 30px;
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -111,6 +111,13 @@
|
||||||
:deviceCode="queryForm.deviceCode"
|
:deviceCode="queryForm.deviceCode"
|
||||||
></only-index>
|
></only-index>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
|
||||||
|
<el-tab-pane label="储能信息" name="data-third">
|
||||||
|
<energy-index
|
||||||
|
ref="energy"
|
||||||
|
:deviceCode="queryForm.deviceCode"
|
||||||
|
></energy-index>
|
||||||
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -126,6 +133,7 @@ import waterIndex from './water';
|
||||||
import imageIndex from './image';
|
import imageIndex from './image';
|
||||||
import readableIndex from './readable';
|
import readableIndex from './readable';
|
||||||
import onlyIndex from './only';
|
import onlyIndex from './only';
|
||||||
|
import energyIndex from './energy';
|
||||||
import siteIndex from './site';
|
import siteIndex from './site';
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
|
@ -136,6 +144,7 @@ export default {
|
||||||
imageIndex,
|
imageIndex,
|
||||||
readableIndex,
|
readableIndex,
|
||||||
onlyIndex,
|
onlyIndex,
|
||||||
|
energyIndex,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -187,10 +196,13 @@ export default {
|
||||||
},
|
},
|
||||||
handleDataClick(tab, event) {
|
handleDataClick(tab, event) {
|
||||||
const deviceCode = this.queryForm.deviceCode;
|
const deviceCode = this.queryForm.deviceCode;
|
||||||
|
const deviceId = this.queryForm.id;
|
||||||
if (tab.paneName == 'data-first') {
|
if (tab.paneName == 'data-first') {
|
||||||
this.$refs['readable'].showData({ deviceCode: deviceCode });
|
this.$refs['readable'].showData({ deviceCode: deviceCode });
|
||||||
} else if (tab.paneName == 'data-second') {
|
} else if (tab.paneName == 'data-second') {
|
||||||
this.$refs['only'].showData({ deviceCode: deviceCode });
|
this.$refs['only'].showData({ deviceCode: deviceCode });
|
||||||
|
} else if (tab.paneName == 'data-third') {
|
||||||
|
this.$refs['energy'].showData({ deviceCode: deviceId });
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//获取站点列表
|
//获取站点列表
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
全屏
|
全屏
|
||||||
</el-button>
|
</el-button>
|
||||||
<iframe
|
<iframe
|
||||||
id="iframeId"
|
id="iframeIdSite"
|
||||||
ref="iframe"
|
ref="iframe"
|
||||||
:src="src"
|
:src="src"
|
||||||
style="width: 100%; height: 495px"
|
style="width: 100%; height: 495px"
|
||||||
|
@ -78,7 +78,8 @@ export default {
|
||||||
},
|
},
|
||||||
dianji() {
|
dianji() {
|
||||||
//设置后就是id==con_lf_top_div 的容器全屏
|
//设置后就是id==con_lf_top_div 的容器全屏
|
||||||
const case1 = document.getElementById('iframeId');
|
debugger;
|
||||||
|
const case1 = document.getElementById('iframeIdSite');
|
||||||
if (this.fullscreen) {
|
if (this.fullscreen) {
|
||||||
if (document.exitFullscreen) {
|
if (document.exitFullscreen) {
|
||||||
document.exitFullscreen();
|
document.exitFullscreen();
|
||||||
|
|
|
@ -79,6 +79,7 @@ export default {
|
||||||
},
|
},
|
||||||
dianji() {
|
dianji() {
|
||||||
//设置后就是id==con_lf_top_div 的容器全屏
|
//设置后就是id==con_lf_top_div 的容器全屏
|
||||||
|
debugger;
|
||||||
const case1 = document.getElementById('iframeId');
|
const case1 = document.getElementById('iframeId');
|
||||||
if (this.fullscreen) {
|
if (this.fullscreen) {
|
||||||
if (document.exitFullscreen) {
|
if (document.exitFullscreen) {
|
||||||
|
|
Loading…
Reference in New Issue