Merge remote-tracking branch 'origin/master'

master
魔神煜修罗皇 2 years ago
commit 5332be1cf3
  1. 8
      psdc-ui/src/views/control/manual/index.vue
  2. 8
      psdc-ui/src/views/emonitor/db/index.vue
  3. 84
      psdc-ui/src/views/emonitor/drgl/index.vue
  4. 26
      psdc-ui/src/views/emonitor/frdl/index.vue
  5. 22
      psdc-ui/src/views/emonitor/kqyrb/index.vue
  6. 5
      psdc-ui/src/views/emonitor/wdcgq/index.vue
  7. 22
      psdc-ui/src/views/emonitor/xrgl/index.vue
  8. 108
      psdc-ui/src/views/system/device/index.vue

@ -336,10 +336,11 @@ function getSetTemperatureFun(item){
width: 100%;
height: 80%;
.item_bottom_img{
width: 40%;
height: 100%;
width: 35%;
height: 95%;
//border: 1px solid red;
padding: 10px;
margin-right: 20px;
img{
width: 100%;
height: 100%;
@ -500,5 +501,8 @@ function getSetTemperatureFun(item){
padding: 0 10px;
border-radius: 0px !important;
}
::v-deep .el-button.is-disabled{
background-color: #dddddd;
}
</style>

@ -63,10 +63,10 @@ export default {
name: "db",
setup() {
let data = reactive({
totp:'',
totwh:'',
eday:'',
emonth:'',
totp:'-- ',
totwh:'-- ',
eday:'-- ',
emonth:'-- ',
glData:[],
glXz:[
"00:00",

@ -1,5 +1,12 @@
<template>
<div class="app-container home">
<el-form :model="data.form" label-width="0px">
<el-form-item label="">
<el-select v-model="data.form.device">
<el-option v-for="item in data.devArr" :label="item.deviceName" :value="item.deviceId" @click.native="selectDevice(item.deviceId)"/>
</el-select>
</el-form-item>
</el-form>
<div class="top">
<div class="card">
<div><img src="../../../assets/images/用电量.png"></div>
@ -19,11 +26,11 @@
<div><img src="../../../assets/images/温度.png"></div>
<div>
<div style="display: flex; margin-bottom: 5px">
<p style="color: #cccccc">进水温度:</p>
<p style="color: #cccccc">进水温度</p>
<h1>{{data.tempIn}}</h1>
</div>
<div style="display: flex">
<p style="color: #cccccc">出水温度:</p>
<p style="color: #cccccc">出水温度</p>
<h1>{{data.tempOut}}</h1>
</div>
</div>
@ -32,7 +39,7 @@
<div><img src="../../../assets/images/温度传感器.png"></div>
<div>
<p>运行状态</p>
<h2 style="color: #1ab394">{{data.runStatus}}</h2>
<h2 :class="{'green':data.runStatus == '开启','red':data.runStatus == '关闭'}">{{data.runStatus}}</h2>
</div>
</div>
</div>
@ -67,19 +74,19 @@
</template>
<script name="Index">
import {getDrgl, getDcgl} from '../../../api/emonitor/api'
import {getDrgl, getDcgl,getSb} from '../../../api/emonitor/api'
import {onMounted, reactive} from "vue";
import * as echarts from 'echarts';
export default {
name: "drgl",
setup() {
let data = reactive({
totwh:'',
totp:'',
tempIn:'',
tempOut:'',
totwh:'-- ',
totp:'-- ',
tempIn:'-- ',
tempOut:'-- ',
//1 2
runStatus:'',
runStatus:'-- ',
glData:[],
glXz:[
"00:00",
@ -217,12 +224,21 @@ export default {
temIn:'',
temOut:'',
time:'',
form:{
device: 1
},
devArr:'',
deviceId: 1,
})
onMounted(() => {//element,onMountedHook
// getDrgl(1).then((res)=>{
// console.log(res)
// })
getDcgl(1).then((res)=>{
//element,onMountedHook
onMounted(() => {
getSbFun()
getDcglFun()
getDrglFun()
});
//
function getDcglFun(){
getDcgl(data.deviceId).then((res)=>{
console.log(res)
//
let arr = []
@ -530,7 +546,9 @@ export default {
myChart4.resize();
};
})
getDrgl(1).then((res)=>{
}
function getDrglFun(){
getDrgl(data.deviceId).then((res)=>{
console.log('1',res)
if(res.data!=null){
data.tempIn=res.data.tempIn
@ -648,15 +666,31 @@ export default {
myChart3.resize();
};
})
}
});
return {
data
//
function getSbFun(){
getSb().then((res)=>{
console.log('获取设备',res.data)
for(let i = 0;i < res.data.length;i++){
if(res.data[i].modelName == '电磁锅炉'){
data.devArr = res.data[i].children
}
}
console.log('devArr',data.devArr)
})
}
//
function selectDevice(id){
console.log(id)
data.deviceId = id;
getDcglFun()
getDrglFun()
}
},
components: {},
mounted() {},
return {data, selectDevice}
}
};
@ -703,5 +737,11 @@ p{
padding-top: 10px;
padding-left: 10px;
}
.green{
color: #14FF00;
}
.red{
color: red;
}
</style>

@ -5,14 +5,14 @@
<div><img src="../../../assets/images/用电量.png"></div>
<div>
<p style="color: #cccccc">总用电量</p>
<h1>1641kWh</h1>
<h1>{{ data.totwh }}kWh</h1>
</div>
</div>
<div class="card">
<div><img src="../../../assets/images/功率.png"></div>
<div>
<p style="color: #cccccc">当前功率</p>
<h1>11kW</h1>
<h1>{{ data.totp }}kW</h1>
</div>
</div>
<div class="card">
@ -20,7 +20,7 @@
<div>
<div>
<p style="color: #cccccc">当前温度</p>
<h1>25</h1>
<h1>{{ data.temp }}</h1>
</div>
</div>
</div>
@ -28,7 +28,7 @@
<div><img src="../../../assets/images/温度传感器.png"></div>
<div>
<p style="color: #cccccc">运行状态</p>
<h1 style="color: #1ab394">开启</h1>
<h1 :class="{'green':data.runStatus == '开启','red':data.runStatus == '关闭'}">{{ data.runStatus }}</h1>
</div>
</div>
</div>
@ -70,12 +70,13 @@ export default {
name: "frdl",
setup() {
let data = reactive({
totwh:'',
totp:'',
tempIn:'',
tempOut:'',
totwh:'-- ',
totp:'-- ',
temp:'-- ',
tempIn:'-- ',
tempOut:'-- ',
//1 2
runStatus:'',
runStatus:'-- ',
glData:[],
glXz:[
"00:00",
@ -518,6 +519,7 @@ export default {
if(res.data!=null){
data.tempIn=res.data.tempIn
data.tempOut=res.data.tempOut
data.temp=res.data.temp
data.totp = res.data.totp
data.totwh = res.data.totwh
if(res.data.runStatus==1){
@ -685,5 +687,11 @@ p{
padding-top: 10px;
padding-left: 10px;
}
.green{
color: #14FF00;
}
.red{
color: red;
}
</style>

@ -19,11 +19,11 @@
<div><img src="../../../assets/images/温度.png"></div>
<div>
<div style="display: flex; margin-bottom: 5px">
<p style="color: #cccccc">进水温度:</p>
<p style="color: #cccccc">进水温度</p>
<h1>{{data.tempIn}}</h1>
</div>
<div style="display: flex">
<p style="color: #cccccc">出水温度:</p>
<p style="color: #cccccc">出水温度</p>
<h1>{{data.tempOut}}</h1>
</div>
</div>
@ -32,7 +32,7 @@
<div><img src="../../../assets/images/温度传感器.png"></div>
<div>
<p style="color: #cccccc">运行状态</p>
<h1 style="color: #1ab394">{{data.runStatus}}</h1>
<h1 :class="{'green':data.runStatus == '开启','red':data.runStatus == '关闭'}">{{data.runStatus}}</h1>
</div>
</div>
</div>
@ -74,12 +74,12 @@ export default {
name: "kqyrb",
setup() {
let data = reactive({
totwh:'',
totp:'',
tempIn:'',
tempOut:'',
totwh:'-- ',
totp:'-- ',
tempIn:'-- ',
tempOut:'-- ',
//1 2
runStatus:'',
runStatus:'-- ',
glData:[],
glXz:[
"00:00",
@ -699,5 +699,11 @@ p{
padding-top: 10px;
padding-left: 10px;
}
.green{
color: #14FF00;
}
.red{
color: red;
}
</style>

@ -59,6 +59,9 @@ export default {
let brr = []
let crr = []
for (let i in res.data) {
if(res.data[i].deviceTemp == null){
res.data[i].deviceTemp = '-- '
}
arr.push({name: res.data[i].deviceName, temp: res.data[i].deviceTemp})
brr.push({
name: res.data[i].deviceName,
@ -70,7 +73,7 @@ export default {
})
crr.push(res.data[i].times)
}
console.log(crr)
// console.log('arr',arr)
data.info = arr
data.infos = brr
data.xinfo = crr

@ -19,11 +19,11 @@
<div><img src="../../../assets/images/温度.png"></div>
<div>
<div style="display: flex; margin-bottom: 5px">
<p style="color: #cccccc">进水温度:</p>
<p style="color: #cccccc">进水温度</p>
<h1>{{data.tempIn}}</h1>
</div>
<div style="display: flex">
<p style="color: #cccccc">出水温度:</p>
<p style="color: #cccccc">出水温度</p>
<h1>{{data.tempOut}}</h1>
</div>
</div>
@ -32,7 +32,7 @@
<div><img src="../../../assets/images/温度传感器.png"></div>
<div>
<p style="color: #cccccc">运行状态</p>
<h1 style="color: #1ab394">{{data.runStatus}}</h1>
<h1 :class="{'green':data.runStatus == '开启','red':data.runStatus == '关闭'}">{{data.runStatus}}</h1>
</div>
</div>
</div>
@ -74,12 +74,12 @@ export default {
name: "xrgl",
setup() {
let data = reactive({
totwh:'',
totp:'',
tempIn:'',
tempOut:'',
totwh:'-- ',
totp:'-- ',
tempIn:'-- ',
tempOut:'-- ',
//1 2
runStatus:'',
runStatus:'-- ',
glData:[],
glXz:[
"00:00",
@ -700,5 +700,11 @@ p{
padding-top: 10px;
padding-left: 10px;
}
.green{
color: #14FF00;
}
.red{
color: red;
}
</style>

@ -18,6 +18,15 @@
<el-col :span="1.5">
<el-button type="primary" icon="Plus" @click="handleAdd">新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="info"
plain
icon="Upload"
@click="handleImport"
v-hasPermi="['system:user:import']"
>导入</el-button>
</el-col>
</el-row>
<div class="dev_control_table">
<el-table :data="data.timingList" height="500px">
@ -53,8 +62,39 @@
</div>
</el-col>
</el-row>
//
<el-dialog :title="data.upload.title" v-model="data.upload.open" width="400px" append-to-body>
<el-upload
ref="uploadRef"
:limit="1"
accept=".xlsx, .xls"
:headers="data.upload.headers"
:action="data.upload.url + '?updateSupport=' + data.upload.updateSupport"
:disabled="data.upload.isUploading"
:on-progress="handleFileUploadProgress"
:on-success="handleFileSuccess"
:auto-upload="false"
drag
>
<el-icon class="el-icon--upload"><upload-filled /></el-icon>
<div class="el-upload__text">将文件拖到此处<em>点击上传</em></div>
<template #tip>
<div class="el-upload__tip text-center">
<div class="el-upload__tip">
<el-checkbox v-model="data.upload.updateSupport" />是否更新已经存在的设备数据
</div>
<span>仅允许导入xlsxlsx格式文件</span>
<el-link type="primary" :underline="false" style="font-size:12px;vertical-align: baseline;" @click="importTemplate">下载模板</el-link>
</div>
</template>
</el-upload>
<template #footer>
<div class="dialog-footer">
<el-button type="primary" @click="submitFileForm"> </el-button>
<el-button @click="data.upload.open = false"> </el-button>
</div>
</template>
</el-dialog>
<!-- 新增对话框 -->
<el-dialog :title="title" v-model="open" width="600px" append-to-body>
@ -162,6 +202,7 @@ import {ElMessage,ElMessageBox} from 'element-plus'
import {Delete} from '@element-plus/icons-vue'
import {ref,reactive,watch,onMounted} from "vue";
import {getXl, getSbTab, postNew1, getSb, postXg1, postDel1, getYh, getMx,} from '../../../api/emonitor/api'
import {getToken} from "@/utils/auth";
onMounted(()=>{
// getSb().then((res)=>{
// var arr = []
@ -205,6 +246,21 @@ onMounted(()=>{
})
/** 筛选处理 */
const data = reactive({
form:{},
upload:{
//
open: false,
//
title: "",
//
isUploading: false,
//
updateSupport: 0,
//
headers: { Authorization: "Bearer " + getToken() },
//
url: import.meta.env.VITE_APP_BASE_API + "/system/user/importData"
},
MxList:[],
sblb:[],
total:'',
@ -322,7 +378,52 @@ const handleCurrentChange = (val) => {
})
}
function handleImport() {
data.upload.title = "设备导入";
data.upload.open = true;
};
/** 下载模板操作 */
function importTemplate() {
proxy.download("system/user/importTemplate", {
}, `user_template_${new Date().getTime()}.xlsx`);
};
/**文件上传中处理 */
const handleFileUploadProgress = (event, file, fileList) => {
data.upload.isUploading = true;
};
/** 文件上传成功处理 */
const handleFileSuccess = (response, file, fileList) => {
data.upload.open = false;
data.upload.isUploading = false;
proxy.$refs["uploadRef"].handleRemove(file);
proxy.$alert("<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + response.msg + "</div>", "导入结果", { dangerouslyUseHTMLString: true });
getList();
};
/** 提交上传文件 */
function submitFileForm() {
proxy.$refs["uploadRef"].submit();
};
/** 重置操作表单 */
function reset() {
data.form = {
userId: undefined,
userName: undefined,
nickName: undefined,
password: undefined,
phonenumber: undefined,
email: undefined,
sex: undefined,
status: "0",
remark: undefined,
roleIds: []
};
proxy.resetForm("userRef");
};
/** 取消按钮 */
function cancel() {
open.value = false;
reset();
};
/** 新增策略处理 */
const open = ref(false);
const title = ref();
@ -388,7 +489,6 @@ function submitForm() {
timingForm.deviceAddress='',
timingForm.deviceModel=''
})
};
function cancel() {
open.value = false;

Loading…
Cancel
Save