Merge remote-tracking branch 'origin/master'

master
魔神煜修罗皇 2 years ago
commit dbeef3d05f
  1. 4
      psdc-ui/2.0.0
  2. 2
      psdc-ui/html/ie.html
  3. 4199
      psdc-ui/package-lock.json
  4. 12
      psdc-ui/src/App.vue
  5. 2
      psdc-ui/src/assets/styles/btn.scss
  6. 4
      psdc-ui/src/assets/styles/index.scss
  7. 4
      psdc-ui/src/assets/styles/sidebar.scss
  8. 2
      psdc-ui/src/components/Crontab/index.vue
  9. 2
      psdc-ui/src/components/IconSelect/index.vue
  10. 2
      psdc-ui/src/components/Pagination/index.vue
  11. 2
      psdc-ui/src/layout/components/Settings/index.vue
  12. 6
      psdc-ui/src/layout/components/TagsView/index.vue
  13. 2
      psdc-ui/src/main.js
  14. 137
      psdc-ui/src/utils/flexible.js
  15. 10
      psdc-ui/src/views/analyse/nhdb/index.vue
  16. 5
      psdc-ui/src/views/analyse/nhfx/index.vue
  17. 5
      psdc-ui/src/views/analyse/nhtj/index.vue
  18. 233
      psdc-ui/src/views/bigview/index.vue
  19. 113
      psdc-ui/src/views/control/manual/index.vue
  20. 43
      psdc-ui/src/views/control/timer/index.vue
  21. 74
      psdc-ui/src/views/emonitor/db/index.vue
  22. 38
      psdc-ui/src/views/emonitor/drgl/index.vue
  23. 37
      psdc-ui/src/views/emonitor/frdl/index.vue
  24. 37
      psdc-ui/src/views/emonitor/kqyrb/index.vue
  25. 2
      psdc-ui/src/views/emonitor/sp/index.vue
  26. 22
      psdc-ui/src/views/emonitor/wdcgq/index.vue
  27. 37
      psdc-ui/src/views/emonitor/xrgl/index.vue
  28. 4
      psdc-ui/src/views/error/404.vue
  29. 3
      psdc-ui/src/views/login.vue
  30. 8
      psdc-ui/src/views/system/cl/index.vue
  31. 830
      psdc-ui/src/views/system/config/index.vue
  32. 4
      psdc-ui/src/views/system/menu/index.vue
  33. 16
      psdc-ui/src/views/system/tactics/index.vue
  34. 1
      psdc-ui/vite.config.js

@ -0,0 +1,4 @@
Unknown command: "ERR!"
To see a list of supported npm commands, run:
npm help

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

@ -3,14 +3,16 @@
</template>
<script setup>
import {onMounted} from "vue";
import useSettingsStore from '@/store/modules/settings'
import { handleThemeStyle } from '@/utils/theme'
nextTick(() => {
//
handleThemeStyle(useSettingsStore().theme)
})
onMounted(() => {
nextTick(() => {
//
handleThemeStyle(useSettingsStore().theme)
})
})
</script>
@ -25,7 +27,7 @@ onMounted(() => {
}
body{
color: #f3ffff;
font-size: 14px;
//font-size: 100px;
}
/* 滚动条 */
::-webkit-scrollbar {

@ -44,7 +44,7 @@
.pan-btn {
font-size: 14px;
color: #fff;
padding: 14px 36px;
padding: 14px .36rem;
border-radius: 8px;
border: none;
outline: none;

@ -105,7 +105,7 @@ aside {
border-radius: 2px;
display: block;
line-height: 32px;
font-size: 16px;
font-size: .16rem;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
color: #2c3e50;
-webkit-font-smoothing: antialiased;
@ -185,7 +185,7 @@ aside {
//refine vue-multiselect plugin
.multiselect {
line-height: 16px;
line-height: .16rem;
}
.multiselect--active {

@ -62,7 +62,7 @@
}
.svg-icon {
margin-right: 16px;
margin-right: .16rem;
}
.el-menu {
@ -206,7 +206,7 @@
.el-menu--vertical {
&>.el-menu {
.svg-icon {
margin-right: 16px;
margin-right: .16rem;
}
}

@ -276,7 +276,7 @@ onMounted(() => {
left: 50%;
width: 140px;
font-size: 14px;
margin-left: -70px;
margin-left: -.7rem;
text-align: center;
line-height: 30px;
background: #fff;

@ -12,7 +12,7 @@
</el-input>
<div class="icon-list">
<div v-for="(item, index) in iconList" :key="index" @click="selectedIcon(item)">
<svg-icon :icon-class="item" style="height: 30px;width: 16px;" />
<svg-icon :icon-class="item" style="height: 30px;width: .16rem;" />
<span>{{ item }}</span>
</div>
</div>

@ -97,7 +97,7 @@ function handleCurrentChange(val) {
<style scoped>
.pagination-container {
/*background: #fff;*/
padding: 32px 16px;
padding: 32px .16rem;
}
.pagination-container.hidden {
display: none;

@ -197,7 +197,7 @@ defineExpose({
.setting-drawer-block-checbox-item {
position: relative;
margin-right: 16px;
margin-right: .16rem;
border-radius: 2px;
cursor: pointer;

@ -300,7 +300,7 @@ function handleScroll() {
box-shadow: 2px 2px 3px 0 rgba(0, 0, 0, 0.3);
li {
margin: 0;
padding: 7px 16px;
padding: 7px .16rem;
cursor: pointer;
&:hover {
background: #eee;
@ -315,8 +315,8 @@ function handleScroll() {
.tags-view-wrapper {
.tags-view-item {
.el-icon-close {
width: 16px;
height: 16px;
width: .16rem;
height: .16rem;
vertical-align: 2px;
border-radius: 50%;
text-align: center;

@ -12,7 +12,6 @@ import store from './store'
import router from './router'
import directive from './directive' // directive
// 注册指令
import plugins from './plugins' // plugins
import { download } from '@/utils/request'
@ -24,6 +23,7 @@ import elementIcons from '@/components/SvgIcon/svgicon'
import './permission' // permission control
import { useDict } from '@/utils/dict'
import { parseTime, resetForm, addDateRange, handleTree, selectDictLabel, selectDictLabels } from '@/utils/energy'

@ -0,0 +1,137 @@
(function (win, lib) {
var doc = win.document;
var docEl = doc.documentElement;
var metaEl = doc.querySelector('meta[name="viewport"]');
var flexibleEl = doc.querySelector('meta[name="flexible"]');
var dpr = 0;
var scale = 0;
var tid;
var flexible = lib.flexible || (lib.flexible = {});
if (metaEl) {
console.warn("将根据已有的meta标签来设置缩放比例");
var match = metaEl.getAttribute("content").match(/initial-scale=([d.]+)/);
if (match) {
scale = parseFloat(match[1]);
dpr = parseInt(1 / scale);
}
} else if (flexibleEl) {
var content = flexibleEl.getAttribute("content");
if (content) {
var initialDpr = content.match(/initial-dpr=([d.]+)/);
var maximumDpr = content.match(/maximum-dpr=([d.]+)/);
if (initialDpr) {
dpr = parseFloat(initialDpr[1]);
scale = parseFloat((1 / dpr).toFixed(2));
}
if (maximumDpr) {
dpr = parseFloat(maximumDpr[1]);
scale = parseFloat((1 / dpr).toFixed(2));
}
}
}
if (!dpr && !scale) {
// var isAndroid = win.navigator.appVersion.match(/android/gi);
var isIPhone = win.navigator.appVersion.match(/iphone/gi);
var devicePixelRatio = win.devicePixelRatio;
if (isIPhone) {
// iOS下,对于2和3的屏,用2倍的方案,其余的用1倍方案
if (devicePixelRatio >= 3 && (!dpr || dpr >= 3)) {
dpr = 3;
} else if (devicePixelRatio >= 2 && (!dpr || dpr >= 2)) {
dpr = 2;
} else {
dpr = 1;
}
} else {
// 其他设备下,仍旧使用1倍的方案
dpr = 1;
}
scale = 1 / dpr;
}
docEl.setAttribute("data-dpr", dpr);
if (!metaEl) {
metaEl = doc.createElement("meta");
metaEl.setAttribute("name", "viewport");
metaEl.setAttribute(
"content",
"initial-scale=" +
scale +
", maximum-scale=" +
scale +
", minimum-scale=" +
scale +
", user-scalable=no"
);
if (docEl.firstElementChild) {
docEl.firstElementChild.appendChild(metaEl);
} else {
var wrap = doc.createElement("div");
wrap.appendChild(metaEl);
doc.write(wrap.innerHTML);
}
}
function refreshRem() {
var width = docEl.getBoundingClientRect().width;
if (width / dpr >= 1920) {
// 这个位置划重点 1920是设计稿的大小 如果你的设计稿是750 那么就需要将1920替换成750
width = (docEl.clientWidth / 1920) * 1920;
}
var rem = width / 10;
docEl.style.fontSize = rem + "px";
flexible.rem = win.rem = rem;
}
win.addEventListener(
"resize",
function () {
clearTimeout(tid);
tid = setTimeout(refreshRem, 300);
},
false
);
win.addEventListener(
"pageshow",
function (e) {
if (e.persisted) {
clearTimeout(tid);
tid = setTimeout(refreshRem, 300);
}
},
false
);
if (doc.readyState === "complete") {
doc.body.style.fontSize = 12 * dpr + "px";
} else {
doc.addEventListener(
"DOMContentLoaded",
function () {
doc.body.style.fontSize = 12 * dpr + "px";
},
false
);
}
refreshRem();
flexible.dpr = win.dpr = dpr;
flexible.refreshRem = refreshRem;
flexible.rem2px = function (d) {
var val = parseFloat(d) * this.rem;
if (typeof d === "string" && d.match(/rem$/)) {
val += "px";
}
return val;
};
flexible.px2rem = function (d) {
var val = parseFloat(d) / this.rem;
if (typeof d === "string" && d.match(/px$/)) {
val += "rem";
}
return val;
};
})(window, window["lib"] || (window["lib"] = {}));

@ -301,5 +301,15 @@ function getCelueListFun(){
background-color: #2F3D8A;
height: 260px;
}
@media (max-width:960px) {
.app-container{
padding: 8px;
}
.box-card{
width: 100%;
margin-bottom: 8px;
margin-right: 0 !important;
}
}
</style>

@ -728,5 +728,10 @@ onBeforeUnmount(() => {
//color: #f3ffff;
color: #606266 !important;
}
@media (max-width:960px) {
.app-container{
padding: 8px;
}
}
</style>

@ -543,5 +543,10 @@ const { filterForm } = toRefs(data);
//color: #f3ffff;
color: #606266 !important;
}
@media (max-width:960px) {
.app-container{
padding: 8px;
}
}
</style>

@ -3,7 +3,8 @@
<div class="header">
<h2>电能替代分布式控制试验平台</h2>
<div class="timer">{{timer}}</div>
<router-link :to="{path:'/control/manual'}" tag="div" class="back"><el-icon><HomeFilled /></el-icon></router-link>
<screenfull id="screenfull" @click="refresh" class="right-menu-item hover-effect" />
<router-link :to="{path:'/control/manual'}" tag="div" class="back" @click="linkPage"><el-icon><HomeFilled /></el-icon></router-link>
</div>
<div class="main">
<div class="left">
@ -114,11 +115,30 @@
<script setup name="Index">
import * as echarts from 'echarts'
import {HomeFilled} from '@element-plus/icons-vue'
import {ref,reactive,onMounted,onBeforeUnmount } from 'vue'
import Screenfull from '@/components/Screenfull'
import {ref, reactive, onMounted, onBeforeUnmount} from 'vue'
import {getTemperature,getDevicesInfo,getZdb} from '../../api/bigview/bigview'
//
function linkPage(){
let newWindow = window.open('/control/manual');
newWindow.location.reload();
}
/** 页面加载时*/
onMounted(()=>{
const setFontSize = () => {
const width = window.innerWidth;
if (width >= 0) {
const fontSize = width / 1920 * 100;
document.documentElement.style.fontSize = `${fontSize}px`;
}
}
setFontSize(); //
window.onresize = () => {
setFontSize(); //
}
setInterval(()=> {
currentTime();
}, 1000);
@ -131,7 +151,9 @@ onMounted(()=>{
getZdbFun();
dqglChartFun()
})
function refresh(){
// window.location.reload();
}
/** 日期*/
const timer = ref()
//
@ -161,6 +183,16 @@ function currentTime() {
timer.value = `${year}-${month}-${day} ${hour}:${minute}:${second} ${week}`
}
/** 使用rem的思想实现图表字体等其他样式的自适应*/
function fontSize(px) { //
let clientWidth = window.innerWidth || document.body.clientWidth; //
if (!clientWidth) {
return 0;
}
let fontSize = clientWidth / 1920; //稿
return px * fontSize; // rem
}
/** 8个温度传感器数据*/
const wdcgqArr = ref([])
function getWenduFun(){
@ -284,14 +316,15 @@ let xrglChart;
let kqyrbChart;
let frdlChart;
function dcglChartFun(){
const chartDom = document.getElementById('dcglChart')
var chartDom = document.getElementById('dcglChart')
dcglChart = echarts.init(chartDom);
const option = {
var option = {
legend: {
data: ["进水温度","出水温度"],
// selectedMode: 'single',
textStyle: {
color: "#b6bee7"
color: "#b6bee7",
fontSize:fontSize(14)
}
},
tooltip: {
@ -329,7 +362,8 @@ function dcglChartFun(){
data: dcglTimeList.value,
axisLabel: {
textStyle: {
color: "#b6bee7"
color: "#b6bee7",
fontSize:fontSize(12)
}
},
axisLine: {
@ -354,11 +388,13 @@ function dcglChartFun(){
name:'℃',
nameTextStyle: {
color: "#b6bee7",
fontSize:fontSize(12),
nameLocation: "start"
},
axisLabel: {
textStyle: {
color: "#b6bee7"
color: "#b6bee7",
fontSize:fontSize(12)
}
},
splitLine: {
@ -390,6 +426,9 @@ function dcglChartFun(){
]
};
option && dcglChart.setOption(option);
window.addEventListener("resize", function () {
dcglChart.resize();
});
};
function xrglChartFun(){
const chartDom = document.getElementById('xrglChart')
@ -399,7 +438,8 @@ function xrglChartFun(){
data: ["进水温度","出水温度"],
// selectedMode: 'single',
textStyle: {
color: "#b6bee7"
color: "#b6bee7",
fontSize:fontSize(14)
}
},
tooltip: {
@ -437,7 +477,8 @@ function xrglChartFun(){
data: xrglTimeList.value,
axisLabel: {
textStyle: {
color: "#b6bee7"
color: "#b6bee7",
fontSize:fontSize(12)
}
},
axisLine: {
@ -462,11 +503,13 @@ function xrglChartFun(){
name:'℃',
nameTextStyle: {
color: "#b6bee7",
fontSize:fontSize(12),
nameLocation: "start"
},
axisLabel: {
textStyle: {
color: "#b6bee7"
color: "#b6bee7",
fontSize:fontSize(12)
}
},
splitLine: {
@ -498,6 +541,9 @@ function xrglChartFun(){
]
};
option && xrglChart.setOption(option);
window.addEventListener("resize", function () {
xrglChart.resize();
});
};
function kqyrbChartFun(){
const chartDom = document.getElementById('kqyrbChart')
@ -507,7 +553,8 @@ function kqyrbChartFun(){
data: ["进水温度","出水温度"],
// selectedMode: 'single',
textStyle: {
color: "#b6bee7"
color: "#b6bee7",
fontSize:fontSize(14)
}
},
tooltip: {
@ -545,7 +592,8 @@ function kqyrbChartFun(){
data: kqyrbTimeList.value,
axisLabel: {
textStyle: {
color: "#b6bee7"
color: "#b6bee7",
fontSize:fontSize(12)
}
},
axisLine: {
@ -570,11 +618,13 @@ function kqyrbChartFun(){
name:'℃',
nameTextStyle: {
color: "#b6bee7",
fontSize:fontSize(12),
nameLocation: "start"
},
axisLabel: {
textStyle: {
color: "#b6bee7"
color: "#b6bee7",
fontSize:fontSize(12)
}
},
splitLine: {
@ -606,6 +656,9 @@ function kqyrbChartFun(){
]
};
option && kqyrbChart.setOption(option);
window.addEventListener("resize", function () {
kqyrbChart.resize();
});
};
function frdlChartFun(){
const chartDom = document.getElementById('frdlChart')
@ -615,7 +668,8 @@ function frdlChartFun(){
data: ["当前温度"],
// selectedMode: 'single',
textStyle: {
color: "#b6bee7"
color: "#b6bee7",
fontSize:fontSize(14)
}
},
tooltip: {
@ -653,7 +707,8 @@ function frdlChartFun(){
data: frdlTimeList.value,
axisLabel: {
textStyle: {
color: "#b6bee7"
color: "#b6bee7",
fontSize:fontSize(12)
}
},
axisLine: {
@ -678,11 +733,13 @@ function frdlChartFun(){
name:'℃',
nameTextStyle: {
color: "#b6bee7",
fontSize:fontSize(12),
nameLocation: "start"
},
axisLabel: {
textStyle: {
color: "#b6bee7"
color: "#b6bee7",
fontSize:fontSize(12)
}
},
splitLine: {
@ -704,6 +761,9 @@ function frdlChartFun(){
]
};
option && frdlChart.setOption(option);
window.addEventListener("resize", function () {
frdlChart.resize();
});
};
/**总电表信息*/
@ -733,7 +793,8 @@ function dqglChartFun(){
data: ["当前功率"],
// selectedMode: 'single',
textStyle: {
color: "#b6bee7"
color: "#b6bee7",
fontSize:fontSize(14)
}
},
tooltip: {
@ -789,7 +850,8 @@ function dqglChartFun(){
"23:15", "23:30", "23:45",],
axisLabel: {
textStyle: {
color: "#b6bee7"
color: "#b6bee7",
fontSize:fontSize(12)
}
},
axisLine: {
@ -814,11 +876,13 @@ function dqglChartFun(){
name:'kW',
nameTextStyle: {
color: "#b6bee7",
fontSize:fontSize(12),
nameLocation: "start"
},
axisLabel: {
textStyle: {
color: "#b6bee7"
color: "#b6bee7",
fontSize:fontSize(12)
}
},
splitLine: {
@ -849,6 +913,9 @@ function dqglChartFun(){
]
};
option && dqglChart.setOption(option);
window.addEventListener("resize", function () {
dqglChart.resize();
});
};
@ -880,33 +947,51 @@ onBeforeUnmount(() => {
height: 100%;
background-image: url("../../assets/images/bg.png");
background-size: 100% 100%;
color: #f3ffff;
font-size: 100px;
.header{
position: relative;
width: 100%;
height: 70px;
height: .7rem;
background-image: url("../../assets/images/headtitle.png");
background-size: 100% 100%;
.timer{
position: absolute;
top: 13px;
left: 30px;
font-size: 16px;
top: .13rem;
left: .3rem;
font-size: .16rem;
font-weight: bold;
}
h2{
font-size: 36px;
font-size: .36rem;
color: #AFEAFF;
font-weight: bold;
text-align: center;
line-height: 70px;
line-height: .7rem;
}
.right-menu-item {
display: inline-block;
color: #97A8BE;
vertical-align: text-bottom;
position: absolute;
top: 0px;
right: .8rem;
font-size: .14rem;
padding: 0.09rem .15rem;
border: 1px solid #dddddd00;
cursor: pointer;
&:hover{
border: 1px solid #dddddd70;
}
}
.back{
position: absolute;
top: 0px;
right: 30px;
font-size: 16px;
right: .3rem;
font-size: .16rem;
color: #fff;
padding: 9px 15px;
padding: 0.09rem .15rem;
border: 1px solid #dddddd00;
&:hover{
border: 1px solid #dddddd70;
@ -917,9 +1002,9 @@ onBeforeUnmount(() => {
display: flex;
justify-content: space-between;
flex-wrap: nowrap;
padding: 0 20px 20px 20px;
padding: 0 .2rem .2rem .2rem;
width: 100%;
height: calc(100% - 70px);
height: calc(100% - .7rem);
.left{
width: 24%;
height: 100%;
@ -946,65 +1031,65 @@ onBeforeUnmount(() => {
flex: 2;
width: 100%;
height: 67%;
padding-bottom: 20px;
padding-bottom: .2rem;
.now_power{
position: absolute;
bottom: 20px;
left: 20px;
width: 112px;
height: 110px;
bottom: .2rem;
left: .2rem;
width: 1.12rem;
height: 1.1rem;
.data{
color: #F5901A;
font-size: 24px;
font-size: .24rem;
font-weight: bold;
text-align: center;
}
.bg_img{
width: 112px;
height: 62px;
width: 1.12rem;
height: .62rem;
background-image: url("../../assets/images/footer.png");
background-size: 100% 100%;
margin-top: -10px;
margin-top: -.1rem;
}
.txt{
color: #1AC4F5;
font-size: 15px;
font-size: .15rem;
font-weight: bold;
line-height: 30px;
line-height: .3rem;
text-align: center;
}
}
.now_ele{
position: absolute;
bottom: 20px;
right: 20px;
width: 112px;
height: 110px;
bottom: .2rem;
right: .2rem;
width: 1.12rem;
height: 1.1rem;
.data{
color: #128DFF;
font-size: 24px;
font-size: .24rem;
font-weight: bold;
text-align: center;
}
.bg_img{
width: 112px;
height: 62px;
width: 1.12rem;
height: .62rem;
background-image: url("../../assets/images/footer.png");
background-size: 100% 100%;
margin-top: -10px;
margin-top: -.1rem;
}
.txt{
color: #1AC4F5;
font-size: 15px;
font-size: .15rem;
font-weight: bold;
line-height: 30px;
line-height: .3rem;
text-align: center;
}
}
.my3D_img{
width: 100%;
height: 100%;
padding: 20px 70px 0 70px;
padding: .2rem .7rem 0 .7rem;
img{
width: 100%;
height: 100%;
@ -1035,16 +1120,16 @@ onBeforeUnmount(() => {
.item{
width: 24%;
height: 48.5%;
padding: 0 10px;
padding: 0 .1rem;
border: 1px solid #1085B6;
&:first-child{
margin-bottom: 8px;
margin-bottom: 0.08rem;
}
.dev_name{
color: #19C3F4;
font-size: 14px;
font-size: .14rem;
text-align: center;
line-height: 50px;
line-height: .4rem;
}
.line{
width: 100%;
@ -1054,9 +1139,9 @@ onBeforeUnmount(() => {
}
.data{
color: #F5901A;
font-size: 26px;
font-size: .26rem;
font-weight: bold;
line-height: 80px;
line-height: .8rem;
text-align: center;
}
}
@ -1082,11 +1167,11 @@ onBeforeUnmount(() => {
}
.title{
width: 45%;
height: 30px;
line-height: 30px;
margin: 0 auto 20px auto;
height: .3rem;
line-height: .3rem;
margin: 0 auto .2rem auto;
color: #19C3F4;
font-size: 18px;
font-size: .18rem;
font-weight: bold;
text-align: center;
background-image: url("../../assets/images/wrappertitle.png");
@ -1096,7 +1181,7 @@ onBeforeUnmount(() => {
display: flex;
width: 100%;
height: 44%;
padding: 10px;
padding: .1rem;
.dev_img{
width: 50%;
height: 100%;
@ -1110,10 +1195,10 @@ onBeforeUnmount(() => {
width: 50%;
height: 100%;
//border: 1px solid #fff;
margin-left: 10px;
margin-left: .1rem;
p{
font-size: 16px;
line-height: 40px;
font-size: .16rem;
line-height: .4rem;
color: #f3ffff;
}
.green{
@ -1139,7 +1224,7 @@ onBeforeUnmount(() => {
.chart_box{
width: 100%;
height: 44%;
padding: 10px 10px 10px 10px;
padding: .1rem;
.dev_chart{
width: 100%;
height: 100%;
@ -1154,5 +1239,17 @@ onBeforeUnmount(() => {
.screenNumber{
font-family: 'ds-digitalnormal';
}
@media (max-width: 960px) {
.info_box{
.dev_img{
width: 40%;
height: 80%;
}
.dev_data{
width: 55%;
}
}
}
</style>

@ -18,7 +18,7 @@
</div>
<div class="item_bottom_form">
<el-form :model="form1">
<el-form-item label="当前状态" label-width="96px">
<el-form-item label="当前状态" label-width="96">
<span :class="{'green':item.deviceRunstatus === true,'red':item.deviceRunstatus === false}">
{{ item.deviceRunstatus === true ? '正在运行' : '停止运行'}}
</span>
@ -39,10 +39,10 @@
<div class="dev_control_table">
<div class="control_header"><span>调控日志</span></div>
<div class="control_table">
<el-table :data="controlLogList" height="305px">
<el-table-column label="序号" type="index" :index="indexMethod1" width="60"></el-table-column>
<el-table :data="controlLogList" height="90%">
<el-table-column label="序号" align="center" type="index" width="60" :index="indexMethod1"></el-table-column>
<el-table-column label="设备名称" align="center" prop="deviceName"/>
<el-table-column label="操作内容" align="center" prop="controlValue" width="700" :formatter="formatControlKeyValue"/>
<el-table-column label="操作内容" align="center" prop="controlValue" :formatter="formatControlKeyValue"/>
<el-table-column label="操作时间" align="center" prop="createTime"/>
<el-table-column label="操作人员" align="center" prop="createBy"/>
<el-table-column label="操作结果" align="center" prop="controlContext" :formatter="formatControlResult"></el-table-column>
@ -107,6 +107,7 @@
</div>
</template>
<script setup name="Index">
@ -515,7 +516,8 @@ function getSetTemperatureFun(item){
<style scoped lang="scss">
.home {
height: calc(100vh - 118px);
height: calc(100vh - 150px);
//font-size: 27px;
.dev_control_wrapper{
display: flex;
justify-content: flex-start;
@ -526,7 +528,7 @@ function getSetTemperatureFun(item){
overflow-y: auto;
.dev_control_item{
width: 24%;
height: 49%;
//height: 49%;
margin-right: 12px;
margin-bottom: 12px;
background-color: #2F3D8A;
@ -554,13 +556,14 @@ function getSetTemperatureFun(item){
.item_bottom{
display: flex;
width: 100%;
height: 80%;
//height: 80%;
height: 170px;
.item_bottom_img{
width: 35%;
height: 95%;
//border: 1px solid red;
padding: 10px;
margin-right: 20px;
margin-right: 10px;
img{
width: 100%;
height: 100%;
@ -577,17 +580,6 @@ function getSetTemperatureFun(item){
.red{
color: red;
}
.submit{
padding: 3px 15px;
border-radius: 2px;
background-color: #2F8EED;
float: right;
margin-top: 8px;
cursor: pointer;
&:hover{
background-color: #5ba2f3;
}
}
}
}
}
@ -614,7 +606,6 @@ function getSetTemperatureFun(item){
}
}
}
.celueBox{
width: 100%;
height: auto;
@ -651,12 +642,9 @@ function getSetTemperatureFun(item){
}
}
}
.success {
color: green;
}
.failure {
color: red;
}
@ -675,6 +663,15 @@ function getSetTemperatureFun(item){
float: right;
margin-top: 5px;
}
::v-deep .el-form-item--default .el-form-item__label{
height: 32px;
line-height: 32px;
font-size: 14px;
}
::v-deep .el-form-item--default .el-form-item__content{
line-height: 32px;
font-size: 14px;
}
::v-deep .el-timeline-item__content{
white-space: normal;
}
@ -743,5 +740,75 @@ function getSetTemperatureFun(item){
white-space: normal !important;
//margin-bottom: 20px;
}
@media (max-width:960px) {
.app-container{
padding: 8px;
}
.home{
height: 800px;
.dev_control_wrapper{
.dev_control_item{
width: 32%;
&:nth-child(3n){
margin-right: 0px;
}
&:nth-child(4n){
margin-right: 12px;
}
.item_header{
height: 15%;
span{
font-size: 14px;
line-height: 30px;
}
.switch{
line-height: 30px;
height: 30px;
}
}
.item_bottom{
.item_bottom_img{
width: 35%;
height: 65%;
padding: 15px;
margin-right: 5px;
}
.item_bottom_form{
width: 60%;
height: 100%;
padding: 0;
}
}
}
}
.dev_control_table{
.control_header{
height: 8%;
span{
font-size: 14px;
line-height: 32px;
}
}
.control_table{
height: 80%;
}
}
}
::v-deep .el-button{
margin-bottom: 8px;
font-size: 12px;
}
::v-deep .el-form-item--default .el-form-item__label{
height: 30px;
line-height: 30px;
font-size: 12px;
}
::v-deep .el-form-item--default .el-form-item__content{
line-height: 30px;
font-size: 12px;
}
}
</style>

@ -26,8 +26,8 @@
></el-date-picker>
</el-form-item>
<el-form-item class="mr30">
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
<el-button class="mybtn" type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button class="mybtn" icon="Refresh" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
@ -37,9 +37,9 @@
</el-row>
<div class="dev_control_table">
<el-table :data="timingList" height="685px">
<el-table-column label="序号" type="index" :index="indexMethod1" width="60"></el-table-column>
<el-table-column label="序号" type="index" width="60" :index="indexMethod1"></el-table-column>
<el-table-column label="设备名称" align="center" prop="deviceName"/>
<el-table-column label="任务描述" align="center" prop="controlContext" width="500"/>
<el-table-column label="任务描述" align="center" prop="controlContext"/>
<!-- <el-table-column label="状态" align="center">-->
<!-- <template v-slot="scope">-->
<!--&lt;!&ndash; <el-tag class="ml-2" :type="timerStatus">暂停</el-tag>&ndash;&gt;-->
@ -50,7 +50,7 @@
<el-table-column label="执行时间" align="center" prop="runtime"/>
<el-table-column label="创建者" align="center" prop="createBy"/>
<el-table-column label="创建时间" align="center" prop="createTime"/>
<el-table-column label="操作" align="center" prop="handle" width="200">
<el-table-column label="操作" align="center" prop="handle">
<template v-slot="scope">
<!-- <el-button size="small" :type="scope.row.timerStatus == 0 ? 'success':''" @click="getUpDateStatusFun(scope)">{{ scope.row.timerStatus == 0 ? '开启' : '停止' }}</el-button>-->
<el-button type="danger" size="small" :icon="Delete" @click="getDeleteTimerFun(scope)">删除</el-button>
@ -538,7 +538,7 @@ const { queryParams } = toRefs(data);
.dev_control_table{
position: relative;
width: 100%;
min-height: 740px;
//min-height: 740px;
background-color: #2F3D8A;
}
.mr30{
@ -618,5 +618,36 @@ const { queryParams } = toRefs(data);
::v-deep .el-scrollbar__wrap.el-scrollbar__wrap--hidden-default{
background-color: rgba(47,61,138);
}
@media (max-width:960px) {
.app-container{
padding: 8px;
}
.dev_control_table{
height: 540px !important;
}
.mb8{
margin-bottom: 0px;
}
.mybtn{
margin-bottom: 0px !important;
}
::v-deep .el-button{
margin-bottom: 8px;
font-size: 12px;
}
::v-deep .el-form-item--default .el-form-item__label{
height: 30px;
line-height: 30px;
font-size: 12px;
}
::v-deep .el-form-item--default .el-form-item__content{
line-height: 30px;
font-size: 12px;
}
::v-deep .el-form--inline .el-form-item{
margin-right: 20px;
}
}
</style>

@ -45,12 +45,10 @@
</div>
</div>
<div class="bottom">
<div class="bottom1">
<div class="bottom1-1">
今日用电量总览
</div>
<div id="myEcharts3" style="width: 100%; height: 88.6%"></div>
<div class="bottom1-1">
今日用电量总览
</div>
<div id="myEcharts3" style="width: 100%; height: 88.6%"></div>
</div>
</div>
</template>
@ -178,7 +176,8 @@ export default {
// getData
// },
onMounted(() => {//element,onMountedHook
onMounted(() => {
//element,onMountedHook
getData(13).then((res)=>{
console.log(res)
if(res.data!=null){
@ -193,9 +192,7 @@ export default {
data.glData=arr
}
//
let myChart1 = echarts.getInstanceByDom(document.getElementById("myEcharts1"));
if (myChart1){
myChart1.dispose()
@ -244,7 +241,10 @@ export default {
detail: {
valueAnimation: true,
formatter: '{value} kW',
color: 'inherit'
color: 'inherit',
textStyle:{
fontSize: 22
}
},
data: [
{
@ -254,13 +254,11 @@ export default {
}
]
});
window.onresize = function () {//
window.addEventListener("resize", function () {
myChart1.resize();
};
});
//线
let myChart2 = echarts.getInstanceByDom(document.getElementById("myEcharts2"));
if (myChart2){
myChart2.dispose()
@ -345,7 +343,7 @@ export default {
])
}
}, //线
symbol: "none", //
symbol: "circle", //
markPoint: {
itemStyle: {
normal: {
@ -365,21 +363,22 @@ export default {
},
],
});
window.onresize = function () {//
window.addEventListener("resize", function () {
myChart2.resize();
};
});
})
//
getZdb(13).then((res)=>{
console.log(res)
let arr = []
let brr = []
for (let i in res.data){
arr.push(res.data[i].hour)
brr.push(res.data[i].useElectric)
arr.push(res.data[i].hour)
brr.push(res.data[i].useElectric)
}
data.fdlData=brr
data.fdlXz=arr
data.fdlData=brr
data.fdlXz=arr
let myChart3 = echarts.getInstanceByDom(document.getElementById("myEcharts3"));
if (myChart3){
myChart3.dispose()
@ -544,12 +543,13 @@ p{
.bottom{
width: 100%;
height: 350px;
}
.bottom1{
width: 100%;
height: 100%;
background-color: #2F3D8A;
}
//.bottom1{
// width: 100%;
// height: 100%;
//
//}
.bottom1-1{
width: 100%;
height: 40px;
@ -557,5 +557,25 @@ p{
padding-top: 10px;
padding-left: 10px;
}
@media (max-width:960px) {
.app-container{
padding: 8px;
}
.card{
p{
font-size: 14px;
}
h1{
font-size: 18px;
}
}
.mid1-1,.mid2-1,.bottom1-1{
font-size: 14px;
height: 32px;
line-height: 32px;
padding-top: 0;
}
}
</style>

@ -301,7 +301,10 @@ export default {
detail: {
valueAnimation: true,
formatter: '{value} kW',
color: 'inherit'
color: 'inherit',
textStyle:{
fontSize: 22
}
},
data: [
{
@ -311,9 +314,9 @@ export default {
}
]
});
window.onresize = function () {//
window.addEventListener("resize", function () {
myChart1.resize();
};
});
}
//
@ -623,9 +626,9 @@ export default {
},
],
});
window.onresize = function () {//
window.addEventListener("resize", function () {
myChart4.resize();
};
});
})
}
function getDrglFun(){
@ -724,7 +727,7 @@ export default {
itemStyle:{
color:'#2F8EE0'
},
symbol: "none", //
symbol: "circle", //
markPoint: {
itemStyle: {
normal: {
@ -753,9 +756,9 @@ export default {
},
],
});
window.onresize = function () {//
window.addEventListener("resize", function () {
myChart3.resize();
};
});
})
}
@ -852,5 +855,24 @@ p{
::v-deep .el-form-item{
margin-bottom: 12px;
}
@media (max-width:960px) {
.app-container{
padding: 8px;
}
.card{
p{
font-size: 14px;
}
h1{
font-size: 18px;
}
}
.title{
font-size: 14px;
height: 32px;
line-height: 32px;
padding-top: 0;
}
}
</style>

@ -296,7 +296,10 @@ export default {
detail: {
valueAnimation: true,
formatter: '{value} kW',
color: 'inherit'
color: 'inherit',
textStyle:{
fontSize: 22
}
},
data: [
{
@ -306,9 +309,9 @@ export default {
}
]
});
window.onresize = function () {//
window.addEventListener("resize", function () {
myChart1.resize();
};
});
}
//
@ -607,9 +610,9 @@ export default {
},
],
});
window.onresize = function () {//
window.addEventListener("resize", function () {
myChart4.resize();
};
});
})
}
function getFrdlFun(){
@ -709,7 +712,7 @@ export default {
itemStyle:{
color:'#2F8EE0'
},
symbol: "none", //
symbol: "circle", //
markPoint: {
itemStyle: {
normal: {
@ -738,9 +741,9 @@ export default {
},
],
});
window.onresize = function () {//
window.addEventListener("resize", function () {
myChart3.resize();
};
});
})
}
@ -836,6 +839,24 @@ p{
}
::v-deep .el-form-item{
margin-bottom: 12px;
}@media (max-width:960px) {
.app-container{
padding: 8px;
}
.card{
p{
font-size: 14px;
}
h1{
font-size: 18px;
}
}
.title{
font-size: 14px;
height: 32px;
line-height: 32px;
padding-top: 0;
}
}
</style>

@ -300,7 +300,10 @@ export default {
detail: {
valueAnimation: true,
formatter: '{value} kW',
color: 'inherit'
color: 'inherit',
textStyle:{
fontSize: 22
}
},
data: [
{
@ -310,9 +313,9 @@ export default {
}
]
});
window.onresize = function () {//
window.addEventListener("resize", function () {
myChart1.resize();
};
});
}
//
@ -621,9 +624,9 @@ export default {
},
],
});
window.onresize = function () {//
window.addEventListener("resize", function () {
myChart4.resize();
};
});
})
}
function getKqrybFun(){
@ -721,7 +724,7 @@ export default {
itemStyle:{
color:'#2F8EE0'
},
symbol: "none", //
symbol: "circle", //
markPoint: {
itemStyle: {
normal: {
@ -750,9 +753,9 @@ export default {
},
],
});
window.onresize = function () {//
window.addEventListener("resize", function () {
myChart3.resize();
};
});
})
}
@ -848,6 +851,24 @@ p{
}
::v-deep .el-form-item{
margin-bottom: 12px;
}@media (max-width:960px) {
.app-container{
padding: 8px;
}
.card{
p{
font-size: 14px;
}
h1{
font-size: 18px;
}
}
.title{
font-size: 14px;
height: 32px;
line-height: 32px;
padding-top: 0;
}
}
</style>

@ -44,7 +44,7 @@ export default {
margin-top: 100px;
}
h1{
font-size: 16px;
font-size: .16rem;
}
.green{
color: #14FF00;

@ -321,13 +321,15 @@ p{
width: 100%;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
justify-content: flex-start;
}
.card{
width: 19.45%;
height: 110px;
background-color: #2F3D8A;
margin-bottom: 12px;
margin-right: 12px;
//margin-right: 10px;
display: flex;
justify-content: space-around;
align-items: center;
@ -348,6 +350,24 @@ p{
background-color: #374590;
padding-top: 10px;
padding-left: 10px;
}@media (max-width:960px) {
.app-container{
padding: 8px;
}
.card{
p{
font-size: 14px;
}
h1{
font-size: 18px;
}
}
.mid1-1,.mid2-1,.bottom1-1{
font-size: 14px;
height: 32px;
line-height: 32px;
padding-top: 0;
}
}
</style>

@ -302,7 +302,10 @@ export default {
detail: {
valueAnimation: true,
formatter: '{value} kW',
color: 'inherit'
color: 'inherit',
textStyle:{
fontSize: 22
}
},
data: [
{
@ -312,9 +315,9 @@ export default {
}
]
});
window.onresize = function () {//
window.addEventListener("resize", function () {
myChart1.resize();
};
});
}
//
@ -413,7 +416,7 @@ export default {
itemStyle:{
color:'#2F8EE0'
},
symbol: "none", //
symbol: "circle", //
markPoint: {
itemStyle: {
normal: {
@ -442,9 +445,9 @@ export default {
},
],
});
window.onresize = function () {//
window.addEventListener("resize", function () {
myChart3.resize();
};
});
})
}
function getXcglFun(){
@ -753,9 +756,9 @@ export default {
},
],
});
window.onresize = function () {//
window.addEventListener("resize", function () {
myChart4.resize();
};
});
})
}
@ -850,6 +853,24 @@ p{
}
::v-deep .el-form-item{
margin-bottom: 12px;
}@media (max-width:960px) {
.app-container{
padding: 8px;
}
.card{
p{
font-size: 14px;
}
h1{
font-size: 18px;
}
}
.title{
font-size: 14px;
height: 32px;
line-height: 32px;
padding-top: 0;
}
}
</style>

@ -198,14 +198,14 @@ let message = computed(() => {
display: block;
float: left;
width: 110px;
height: 36px;
height: .36rem;
background: #1482f0;
border-radius: 100px;
text-align: center;
color: #ffffff;
opacity: 0;
font-size: 14px;
line-height: 36px;
line-height: .36rem;
cursor: pointer;
animation-name: slideUp;
animation-duration: 0.5s;

@ -256,5 +256,8 @@ getCookie();
.login-code-img {
height: 40px;
padding-left: 12px;
}
@media (max-width: 960px) {
}
</style>

@ -85,13 +85,13 @@
<el-select v-model="item.judgeDevice" placeholder="请选择" style="width: 240px">
<el-option :label='item.deviceName' :value='item.deviceId' :key="item.deviceId" v-for="item in data.allsblb"/>
</el-select>
<span style="width: 70px;display: inline-block ;margin: 20px">限制属性</span>
<span style="width: .7rem;display: inline-block ;margin: 20px">限制属性</span>
<el-radio-group v-model="item.judgeElement">
<el-radio label="thermometer_value">温度</el-radio>
<el-radio label="thermometer_value_in">进水温度</el-radio>
<el-radio label="thermometer_value_out">出水温度</el-radio>
</el-radio-group>
<span style="width: 70px;display: inline-block ;margin-left: 50px">限制值</span>
<span style="width: .7rem;display: inline-block ;margin-left: 50px">限制值</span>
<el-input type="number" v-model="item.judgeData" placeholder="请输入" style="width: 80px ; height: 25px" />
</el-collapse-item>
</el-collapse>
@ -164,13 +164,13 @@
<el-select v-model="item.judgeDevice" placeholder="请选择" style="width: 240px">
<el-option :label='item.deviceName' :value='item.deviceId' :key="item.deviceId" v-for="item in data.allsblb"/>
</el-select>
<span style="width: 70px;display: inline-block ;margin: 20px">限制属性</span>
<span style="width: .7rem;display: inline-block ;margin: 20px">限制属性</span>
<el-radio-group v-model="item.judgeElement">
<el-radio label="thermometer_value">温度</el-radio>
<el-radio label="thermometer_value_in">进水温度</el-radio>
<el-radio label="thermometer_value_out">出水温度</el-radio>
</el-radio-group>
<span style="width: 70px;display: inline-block ;margin-left: 50px">限制值</span>
<span style="width: .7rem;display: inline-block ;margin-left: 50px">限制值</span>
<el-input type="number" v-model="item.judgeData" placeholder="请输入" style="width: 80px ; height: 25px" />
</el-collapse-item>
</el-collapse>

@ -1,798 +1,60 @@
<template>
<div class="app-container home">
<el-row :gutter="20">
<el-col :span="24" :xs="24">
<el-form :model="queryParams" ref="queryRef" :inline="true" label-width="88px">
<el-form-item label="策略名称:" prop="name">
<el-select v-model="data.sceneCode" placeholder="请选择" style="width: 240px" @change="changeSl">
<el-option label='所有' :value='0' />
<el-option :label='item.label' :value='item.sceneCode' :key="item.sceneCode" v-for="item in queryParams"/>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" icon="Plus" @click="handleAdd">新增</el-button>
</el-col>
</el-row>
<div class="dev_control_table">
<el-table :data="data.timingList" height="500px">
<el-table-column label="序号" align="center" width="50" type="index"/>
<el-table-column label="策略名称" align="center" prop="sceneName" width="300"/>
<el-table-column label="策略描述" align="center" prop="sceneRemark"/>
<el-table-column label="创建时间" align="center" prop="createTime"/>
<!-- <el-table-column label="温度" align="center" prop="sceneValue"/>-->
<el-table-column label="操作" align="center" prop="handle">
<template v-slot="scope">
<el-button type="primary" size="small" icon="Edit" v-hasPermi="['system:cl:edit']" @click="handleXg(scope.row)">修改</el-button>
<el-button type="danger" size="small" :icon="Delete" @click="handleDel(scope.row.sceneCode)">删除</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
v-model:current-page="currentPage"
v-model:page-size="pageSize"
:page-sizes="[5, 10, 20, 50]"
:small="small"
:disabled="disabled"
:background="background"
layout="total, sizes, prev, pager, next, jumper"
:total="data.total"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"/>
</div>
</el-col>
</el-row>
<!-- 新增对话框 -->
<el-dialog :title="title" v-model="open" width="1100" append-to-body>
<el-form :model="timingForm" ref="userRef" label-width="88px">
<el-row>
<el-col :span="24">
<el-form-item label="策略名称:" prop="sceneName" >
<el-input v-model="timingForm.sceneName" placeholder="请输入策略名称" />
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="策略描述:" prop="sceneRemark" >
<el-input v-model="timingForm.sceneRemark" placeholder="请输入策略描述" />
</el-form-item>
</el-col>
<!-- <span style="width: 60px;display: inline-block ;margin: 20px">第一步</span>-->
<!-- <el-radio-group v-model="timingForm.isJudge">-->
<!-- <el-radio :label="1">展开</el-radio>-->
<!-- <el-radio :label="2">关闭</el-radio>-->
<!-- </el-radio-group>-->
<el-collapse v-model="timingForm.num" style="margin-left: 20px" accordion>
<el-collapse-item title="第一步" :name="1">
<span style="width: 50px; margin-left: 20px ">步骤描述</span>
<el-input placeholder="请输入步骤描述" style="width: 900px"/>
<span style="width: 120px;display: inline-block ;margin: 20px">是否有限制条件</span>
<el-radio-group v-model="timingForm.isJudge">
<el-radio :label="1"></el-radio>
<el-radio :label="2"></el-radio>
</el-radio-group>
<el-collapse v-model="timingForm.isJudge" style="width: 1000px">
<el-collapse-item title="限制条件" :name="1">
<span>限制设备</span>
<el-select v-model="timingForm.judgeDevice" placeholder="请选择" style="width: 240px">
<el-option :label='item.deviceName' :value='item.deviceId' :key="item.deviceId" v-for="item in data.allsblb"/>
</el-select>
<span style="width: 70px;display: inline-block ;margin: 20px">限制属性</span>
<el-radio-group v-model="timingForm.judgeElement">
<el-radio label="thermometer_value">温度</el-radio>
<el-radio label="thermometer_value_in">进水温度</el-radio>
<el-radio label="thermometer_value_out">出水温度</el-radio>
</el-radio-group>
<span style="width: 70px;display: inline-block ;margin-left: 50px">温度数值</span>
<el-input type="number" v-model="timingForm.judgeData" placeholder="请输入" style="width: 80px ; height: 25px" />
</el-collapse-item>
</el-collapse>
<el-checkbox :indeterminate="data.isIndeterminate" v-model="data.checkAll" @change="handleCheckAllChange">全选</el-checkbox>
<el-checkbox-group v-model="data.checkedSblb" @change="handleCheckedCitiesChange" style="white-space: normal;display: inline-block">
<el-checkbox v-for="item in data.sblb" :label="item.deviceId" :key="item.deviceId" style="margin-bottom: 10px;width: 560px;">
<span style="width: 160px;display: inline-block">{{item.deviceName}}</span>
<span v-for="control in item.controlKey" style="margin-left: 20px">
<span style="width: 80px;display: inline-block">{{control.label}}</span>
<template v-if="control.label === '控制启停'">
<el-radio-group v-model="control.value">
<el-radio label="1">开启</el-radio>
<el-radio label="2">关闭</el-radio>
</el-radio-group>
</template>
<template v-else>
<el-input type="number" v-model="control.value" style="width: 120px ;margin: 10px;height: 25px"/>
</template>
</span>
</el-checkbox>
</el-checkbox-group>
</el-collapse-item>
<el-collapse-item title="第二步" :name="2">
<span style="width: 50px; margin-left: 20px ">步骤描述</span>
<el-input placeholder="请输入步骤描述" style="width: 900px"/>
<span style="width: 120px;display: inline-block ;margin: 20px">是否有限制条件</span>
<el-radio-group v-model="timingForm.isJudge">
<el-radio :label="1"></el-radio>
<el-radio :label="2"></el-radio>
</el-radio-group>
<el-collapse v-model="timingForm.isJudge" style="width: 1000px">
<el-collapse-item title="限制条件" :name="1">
<span>限制设备</span>
<el-select v-model="timingForm.judgeDevice" placeholder="请选择" style="width: 240px">
<el-option :label='item.deviceName' :value='item.deviceId' :key="item.deviceId" v-for="item in data.allsblb"/>
</el-select>
<span style="width: 70px;display: inline-block ;margin: 20px">限制属性</span>
<el-radio-group v-model="timingForm.judgeElement">
<el-radio label="thermometer_value">温度</el-radio>
<el-radio label="thermometer_value_in">进水温度</el-radio>
<el-radio label="thermometer_value_out">出水温度</el-radio>
</el-radio-group>
<span style="width: 70px;display: inline-block ;margin-left: 50px">温度数值</span>
<el-input type="number" v-model="timingForm.judgeData" placeholder="请输入" style="width: 80px ; height: 25px" />
</el-collapse-item>
</el-collapse>
<el-checkbox :indeterminate="data.isIndeterminate" v-model="data.checkAll" @change="handleCheckAllChange">全选</el-checkbox>
<el-checkbox-group v-model="data.checkedSblb" @change="handleCheckedCitiesChange" style="white-space: normal;display: inline-block">
<el-checkbox v-for="item in data.sblb" :label="item.deviceId" :key="item.deviceId" style="margin-bottom: 10px;width: 560px;">
<span style="width: 160px;display: inline-block">{{item.deviceName}}</span>
<span v-for="control in item.controlKey" style="margin-left: 20px">
<span style="width: 80px;display: inline-block">{{control.label}}</span>
<template v-if="control.label === '控制启停'">
<el-radio-group v-model="control.value">
<el-radio label="1">开启</el-radio>
<el-radio label="2">关闭</el-radio>
</el-radio-group>
</template>
<template v-else>
<el-input type="number" v-model="control.value" style="width: 120px ;margin: 10px;height: 25px"/>
</template>
</span>
</el-checkbox>
</el-checkbox-group>
</el-collapse-item>
<el-collapse-item title="第三步" :name="3">
<span style="width: 50px; margin-left: 20px ">步骤描述</span>
<el-input placeholder="请输入步骤描述" style="width: 900px"/>
<span style="width: 120px;display: inline-block ;margin: 20px">是否有限制条件</span>
<el-radio-group v-model="timingForm.isJudge">
<el-radio :label="1"></el-radio>
<el-radio :label="2"></el-radio>
</el-radio-group>
<el-collapse v-model="timingForm.isJudge" style="width: 1000px">
<el-collapse-item title="限制条件" :name="1">
<span>限制设备</span>
<el-select v-model="timingForm.judgeDevice" placeholder="请选择" style="width: 240px">
<el-option :label='item.deviceName' :value='item.deviceId' :key="item.deviceId" v-for="item in data.allsblb"/>
</el-select>
<span style="width: 70px;display: inline-block ;margin: 20px">限制属性</span>
<el-radio-group v-model="timingForm.judgeElement">
<el-radio label="thermometer_value">温度</el-radio>
<el-radio label="thermometer_value_in">进水温度</el-radio>
<el-radio label="thermometer_value_out">出水温度</el-radio>
</el-radio-group>
<span style="width: 70px;display: inline-block ;margin-left: 50px">温度数值</span>
<el-input type="number" v-model="timingForm.judgeData" placeholder="请输入" style="width: 80px ; height: 25px" />
</el-collapse-item>
</el-collapse>
<el-checkbox :indeterminate="data.isIndeterminate" v-model="data.checkAll" @change="handleCheckAllChange">全选</el-checkbox>
<el-checkbox-group v-model="data.checkedSblb" @change="handleCheckedCitiesChange" style="white-space: normal;display: inline-block">
<el-checkbox v-for="item in data.sblb" :label="item.deviceId" :key="item.deviceId" style="margin-bottom: 10px;width: 560px;">
<span style="width: 160px;display: inline-block">{{item.deviceName}}</span>
<span v-for="control in item.controlKey" style="margin-left: 20px">
<span style="width: 80px;display: inline-block">{{control.label}}</span>
<template v-if="control.label === '控制启停'">
<el-radio-group v-model="control.value">
<el-radio label="1">开启</el-radio>
<el-radio label="2">关闭</el-radio>
</el-radio-group>
</template>
<template v-else>
<el-input type="number" v-model="control.value" style="width: 120px ;margin: 10px;height: 25px"/>
</template>
</span>
</el-checkbox>
</el-checkbox-group>
</el-collapse-item>
</el-collapse>
<el-collapse v-model="activeNames">
<el-collapse-item v-for="item in items" :key="item.id" :title="item.title" :name="item.id">
{{ item.content }}
</el-collapse-item>
</el-collapse>
<el-button @click="addStep">添加步骤</el-button>
<!-- <el-col :span="12">-->
<!-- <el-form-item label="策略列表:" >-->
<!-- <el-select v-model="timingForm.sceneCode" placeholder="策略列表">-->
<!-- <el-option v-for="item in data.queryParams" :key="item.sceneCode" :label="item.label" :value="item.sceneCode">-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="12">-->
<!-- <el-form-item label="设备列表:" >-->
<!-- <el-select v-model="timingForm.deviceId" placeholder="设备列表">-->
<!-- <el-option v-for="item in data.sblb" :key="item.deviceId" :label="item.deviceName" :value="item.deviceId">-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="12">-->
<!-- <el-form-item label="进水温度:" prop="intemp" >-->
<!-- <el-input v-model="timingForm.intemp" placeholder="进水温度" />-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="12">-->
<!-- <el-form-item label="出水温度:" prop="outtemp" >-->
<!-- <el-input v-model="timingForm.outtemp" placeholder="出水温度" />-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="24">-->
<!-- <el-form-item label="温度:" prop="temp">-->
<!-- <el-input v-model="timingForm.temp" placeholder="温度" maxlength="11" />-->
<!-- </el-form-item>-->
<!-- </el-col>-->
</el-row>
</el-form>
<template #footer>
<div class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</template>
</el-dialog>
<!-- 修改对话框 -->
<el-dialog :title="title1" v-model="open1" width="1000px" append-to-body>
<el-form :model="timingForm1" ref="userRef" label-width="88px">
<el-row>
<el-col :span="24">
<el-form-item label="策略名称:" prop="sceneName">
<el-input v-model="timingForm1.sceneName" placeholder="请输入策略名称" maxlength="11" />
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="策略描述:" prop="sceneRemark" >
<el-input v-model="timingForm1.sceneRemark" placeholder="请输入策略描述" />
</el-form-item>
</el-col>
<span style="width: 120px;display: inline-block ;margin: 20px">是否有限制条件</span>
<el-radio-group v-model="timingForm1.isJudge">
<el-radio :label="1"></el-radio>
<el-radio :label="2"></el-radio>
</el-radio-group>
<el-collapse v-model="timingForm1.isJudge" style="width: 1000px">
<el-collapse-item title="限制条件" :name="1">
<span>限制设备</span>
<el-select v-model="timingForm1.judgeDevice" placeholder="请选择" style="width: 240px">
<el-option :label='item.deviceName' :value='item.deviceId' :key="item.deviceId" v-for="item in data.allsblb"/>
</el-select>
<span style="width: 70px;display: inline-block ;margin: 20px">限制属性</span>
<el-radio-group v-model="timingForm1.judgeElement">
<el-radio label="thermometer_value">温度</el-radio>
<el-radio label="thermometer_value_in">进水温度</el-radio>
<el-radio label="thermometer_value_out">出水温度</el-radio>
</el-radio-group>
<span style="width: 70px;display: inline-block ;margin-left: 50px">温度数值</span>
<el-input type="number" v-model="timingForm1.judgeData" placeholder="请输入" style="width: 80px ; height: 25px" />
</el-collapse-item>
</el-collapse>
<el-checkbox :indeterminate="data.isIndeterminate1" v-model="data.checkAll1" @change="handleCheckAllChange1">全选</el-checkbox>
<!-- <div class="taber"><span>进水温度</span><span>出水温度</span><span>温度</span></div>-->
<el-checkbox-group v-model="data.checkedSblb1" @change="handleCheckedCitiesChange1">
<el-checkbox v-for="item in data.sblb" :label="item.deviceId" :key="item.deviceId" style="margin-bottom: 10px;width: 560px;">
<span style="width: 160px;display: inline-block">{{item.deviceName}}</span>
<span v-for="control in item.controlKey" style="margin-left: 20px">
<span style="width: 80px;display: inline-block">{{control.label}}</span>
<template v-if="control.label === '控制启停'">
<el-radio-group v-model="control.value">
<el-radio label="1">开启</el-radio>
<el-radio label="2">关闭</el-radio>
</el-radio-group>
</template>
<template v-else>
<el-input type="number" v-model="control.value" style="width: 120px ;margin: 10px;height: 25px"/>
</template>
</span>
</el-checkbox>
</el-checkbox-group>
<!-- <el-col :span="24">-->
<!-- <el-form-item label="设备列表:" >-->
<!-- <el-select v-model="timingForm1.deviceId" placeholder="设备列表">-->
<!-- <el-option v-for="item in data.sblb" :key="item.deviceId" :label="item.deviceName" :value="item.deviceId">-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="12">-->
<!-- <el-form-item label="进水温度:" prop="intemp" >-->
<!-- <el-input v-model="timingForm1.intemp" placeholder="进水温度" />-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="12">-->
<!-- <el-form-item label="出水温度:" prop="outtemp" >-->
<!-- <el-input v-model="timingForm1.outtemp" placeholder="出水温度" />-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="13">-->
<!-- <el-form-item label="温度值:" prop="temp">-->
<!-- <el-input v-model="timingForm1.temp" placeholder="温度" maxlength="11" />-->
<!-- </el-form-item>-->
<!-- </el-col>-->
</el-row>
</el-form>
<template #footer>
<div class="dialog-footer">
<el-button type="primary" @click="submitForm1"> </el-button>
<el-button @click="cancel1"> </el-button>
</div>
</template>
</el-dialog>
<el-radio v-for="(item, index) in celueList" :key="index" v-model="radio" :label="item.sceneName" @change="selectCeLue(item)">
<el-timeline>
<el-timeline-item v-for="(items, index) in item.flow" :key="index" :timestamp="items.timestamp" :hollow="items.hollow" :icon="getIcon(items)" :type="getType(items)">
{{items.step}}
</el-timeline-item>
</el-timeline>
</el-radio>
</div>
</template>
<script setup name="Index">
import {ElMessage,ElMessageBox} from 'element-plus'
import {Delete} from '@element-plus/icons-vue'
import {ref,reactive,watch,onMounted} from "vue";
import {getXl,getTb,postNew,getSb1,postXg,postDel,getSb} from '../../../api/emonitor/api'
onMounted(()=>{
getSb().then((res)=>{
console.log('111',res)
var arr = []
for(var i in res.data){
arr=arr.concat(res.data[i].children)
}
console.log('Allsblb',arr)
data.allsblb=arr
})
getSb1().then((res)=>{
console.log('222',res)
var arr = []
for(var i in res.data){
arr=arr.concat(res.data[i].children)
}
console.log('sblb',arr)
data.sblb=arr
var brr = []
for(let a in arr){
brr.push(arr[a].deviceId)
}
data.AllName=brr
console.log(brr)
})
getXl().then((res)=>{
console.log(res)
data.queryParams=res.data
})
getTb({
"sceneCode": data.sceneCode,
"pageNum": currentPage.value,
"pageSize": pageSize.value
}).then((res)=>{
console.log(res)
data.timingList=res.rows
data.total=res.total
})
// postNew().then((res)=>{
// console.log(res)
// })
})
/** 筛选处理 */
const data = reactive({
num:1,
activeNames:0,
checkAll: false,
checkedSblb: [],
checkAll1: false,
checkedSblb1: [],
sblb: [],
allsblb:[],
AllName:[],
isIndeterminate: false,
isIndeterminate1: false,
total:'',
timingList:[],
queryParams: '',
sceneCode:0,
dateRange:[],
postData:[],
});
// const wat = watch(()=> data.sblb,(val) =>{
// console.log(val)
// })
//
function changeSl(){
console.log(data.sceneCode)
}
//
function handleQuery(){
getTb({
"sceneCode": data.sceneCode,
"pageNum": currentPage.value,
"pageSize": pageSize.value
}).then((res)=>{
console.log(res)
data.timingList=res.rows
data.total=res.total
})
}
//
function resetQuery(){
data.sceneCode=0
currentPage.value=1
pageSize.value=10
getTb({
"sceneCode": data.sceneCode,
"pageNum": currentPage.value,
"pageSize": pageSize.value
}).then((res)=>{
console.log(res)
data.timingList=res.rows
data.total=res.total
})
}
function handleCheckAllChange(val) {
data.checkedSblb = val ? data.AllName : [];
data.isIndeterminate = false;
console.log(data.checkedSblb)
}
function handleCheckedCitiesChange(value) {
let checkedCount = value.length;
data.checkAll = checkedCount === data.sblb.length;
data.isIndeterminate = checkedCount > 0 && checkedCount < data.sblb.length;
}
function handleCheckAllChange1(val) {
data.checkedSblb1 = val ? data.AllName : [];
data.isIndeterminate1 = false;
console.log(data.checkedSblb1)
}
function handleCheckedCitiesChange1(value) {
let checkedCount = value.length;
data.checkAll1 = checkedCount === data.sblb.length;
data.isIndeterminate1 = checkedCount > 0 && checkedCount < data.sblb.length;
}
/** 数据表格处理 */
const currentPage = ref(1)
const pageSize = ref(10)
const small = ref(false)
const background = ref(false)
const disabled = ref(false)
const handleSizeChange = (val) => {
console.log(`${val}`)
getTb({
"sceneCode": data.sceneCode,
"pageNum": currentPage.value,
"pageSize": pageSize.value
}).then((res)=>{
console.log(res)
data.timingList=res.rows
data.total=res.total
})
}
const handleCurrentChange = (val) => {
console.log(`${val}`)
getTb({
"sceneCode": data.sceneCode,
"pageNum": currentPage.value,
"pageSize": pageSize.value
}).then((res)=>{
console.log(res)
data.timingList=res.rows
data.total=res.total
})
}
/** 新增策略处理 */
const open = ref(false);
const title = ref();
const open1 = ref(false);
const title1= ref();
const activeName = ref('1')
const timingForm = reactive({
num:1,
sceneName:'',
sceneRemark:'',
deviceVos:[],
isJudge:null,
judgeDevice:null,
judgeElement:null,
judgeData:null
})
const timingForm1 = reactive({
sceneName:'',
sceneRemark:'',
sceneCode:'',
deviceVos:[],
isJudge:null,
judgeDevice:null,
judgeElement:null,
judgeData:null
// deviceId:'',
// temp:'',
// intemp:'',
// outtemp:''
})
// const watchTime = watch(()=> timingForm.executeTime, (val) => {
// // console.log(val.toLocaleString())
// let date = new Date(val)
// let hours = date.getHours()
// let minutes = date.getMinutes()
// let seconds = date.getSeconds()
// console.log(`${hours}:${minutes}:${seconds}`)
// })
function handleAdd() {
open.value = true;
title.value = "新增策略";
};
function submitForm() {
let tempCheckedSblb = [];
data.checkedSblb.forEach(item => {
let tempItem = {
deviceId: item,
tempList:[]
};
// item data.sblb
let deviceInfo = data.sblb.find(sblbItem => sblbItem.deviceId === item);
if (deviceInfo) {
console.log(deviceInfo)
tempItem.tempList = deviceInfo.controlKey
}
tempCheckedSblb.push(tempItem);
timingForm.deviceVos=tempCheckedSblb
// for(let i in deviceInfo.controlKey){
// deviceInfo.controlKey[i].value=''
// }
// deviceInfo.controlKey.map(item => {
// item.value = '';
// });
});
console.log(timingForm)
postNew(timingForm).then((res)=>{
console.log(res)
ElMessage({type:"success",message:'新增成功!'})
handleQuery()
getXl().then((res)=>{
console.log(res)
data.queryParams=res.data
})
timingForm.sceneName='',
timingForm.sceneRemark='',
timingForm.deviceVos=[],
timingForm.isJudge=2,
timingForm.judgeDevice=null,
timingForm.judgeElement=null,
timingForm.judgeData=null,
data.checkedSblb=[];
data.isIndeterminate=false
open.value = false;
data.sblb.map(item => {
item.controlKey.map(temp => {
temp.value = '';
});
});
})
};
function cancel() {
timingForm.sceneName='',
timingForm.sceneRemark='',
timingForm.deviceVos=[];
timingForm.isJudge=2,
timingForm.judgeDevice=null,
timingForm.judgeElement=null,
timingForm.judgeData=null
data.checkedSblb=[];
data.isIndeterminate=false
open.value = false;
data.sblb.map(item => {
item.controlKey.map(temp => {
temp.value = '';
});
});
};
function handleXg(dat) {
open1.value = true;
title1.value = "修改策略";
console.log('101111',dat)
var arr = []
for(let i in dat.deviceVos){
arr.push(dat.deviceVos[i].deviceId)
}
data.checkedSblb1=arr
for (let i = 0;i < data.sblb.length ;i++ ){
var deviceId = data.sblb[i].deviceId
for (let j = 0;j < dat.deviceVos.length ;j++ ) {
if ( deviceId === dat.deviceVos[j].deviceId){
console.log(dat.deviceVos[j].tempValue)
data.sblb[i].controlKey = dat.deviceVos[j].tempValue;
}
}
}
timingForm1.sceneName=dat.sceneName
timingForm1.sceneRemark=dat.sceneRemark
timingForm1.sceneCode = dat.sceneCode
timingForm1.isJudge=dat.isJudge
timingForm1.judgeDevice=dat.judgeDevice
timingForm1.judgeElement=dat.judgeElement
timingForm1.judgeData=dat.judgeData
};
function submitForm1() {
let tempCheckedSblb = [];
data.checkedSblb1.forEach(item => {
let tempItem = {
deviceId: item,
tempList:[]
};
// item data.sblb
let deviceInfo = data.sblb.find(sblbItem => sblbItem.deviceId === item);
if (deviceInfo) {
tempItem.tempList = deviceInfo.controlKey;
}
tempCheckedSblb.push(tempItem);
timingForm1.deviceVos=tempCheckedSblb
});
console.log(timingForm1)
postXg(timingForm1).then((res)=>{
console.log(res)
ElMessage({type:"success",message:'修改成功!'})
getXl().then((res)=>{
console.log(res)
data.queryParams=res.data
})
handleQuery()
data.sblb.map(item => {
item.controlKey.map(temp => {
temp.value = '';
});
});
})
open1.value = false;
timingForm1.sceneName=''
timingForm1.sceneRemark=''
timingForm1.sceneCode=''
timingForm1.deviceVos=[]
timingForm1.isJudge=2,
timingForm1.judgeDevice=null,
timingForm1.judgeElement=null,
timingForm1.judgeData=null
};
function cancel1() {
open1.value = false;
timingForm1.sceneName=''
timingForm1.sceneRemark=''
timingForm1.sceneCode=''
timingForm1.deviceVos=[]
timingForm1.isJudge=2,
timingForm1.judgeDevice=null,
timingForm1.judgeElement=null,
timingForm1.judgeData=null
handleQuery()
data.sblb.map(item => {
item.controlKey.map(temp => {
temp.value = '';
});
})
};
function handleDel(sceneCode) {
ElMessageBox.confirm("是否确认删除此策略?", "提示",{
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
console.log(sceneCode)
postDel({
"sceneCode":sceneCode
}).then((res) => {
console.log(res)
ElMessage({type:"success",message:'删除成功!'})
getXl().then((res)=>{
console.log(res)
data.queryParams=res.data
<script>
import { ref } from 'vue'
export default {
setup() {
const radio = ref('')
const celueList = ref([
{ sceneName: '场景1',
flow: [
{ step: '步骤1', timestamp: '2022-01-01', hollow: true },
{ step: '步骤2', timestamp: '2022-01-02', hollow: false, icon: 'el-icon-check', type: 'success' },
{ step: '步骤3', timestamp: '2022-01-03', hollow: true },
{ step: '步骤4', timestamp: '2022-01-04', hollow: false, icon: 'el-icon-close', type: 'danger' },
],
},
{ sceneName: '场景2',
flow: [
{ step: '步骤1', timestamp: '2022-01-01', hollow: true },
{ step: '步骤2', timestamp: '2022-01-02', hollow: false, icon: 'el-icon-check', type: 'success' },
{ step: '步骤3', timestamp: '2022-01-03', hollow: true },
{ step: '步骤4', timestamp: '2022-01-04', hollow: false, icon: 'el-icon-close', type: 'danger' },
],
},
])
const selectCeLue = (item) => {
celueList.value.forEach((celue) => {
celue.flow.forEach((flow) => {
flow.icon = ''
flow.type = ''
})
})
handleQuery()
});
})
}
//
const items = reactive([{ id: 1, title: '第一步', content: '步骤一的内容' }])
const activeNames = ref(['1'])
const addStep = () => {
const newId = items.length + 1
items.push({ id: newId, title: `${newId}`, content: `步骤${newId}的内容` })
activeNames.value.push(`${newId}`)
item.flow.forEach((flow) => {
flow.icon = flow.icon || ''
flow.type = flow.type || ''
})
console.log(item)
}
const getIcon = (item) => { return item.icon || '' }
const getType = (item) => { return item.type || '' }
return { radio, celueList, selectCeLue, getIcon, getType, }
},
}
const { queryParams } = toRefs(data);
</script>
<style scoped lang="scss">
.dev_control_table{
position: relative;
width: 100%;
min-height: 745px;
background-color: #2F3D8A;
}
.taber{
width: 400px;
margin-left: 52px;
display: flex;
justify-content: flex-start;
line-height: 32px;
span{
width: 120px;
&:nth-child(2),&:nth-child(3){
margin-left: 20px;
}
}
}
::v-deep .el-button{
border-radius: 2px;
}
::v-deep .el-pagination{
position: absolute;
bottom: 10px;
left: 50%;
transform: translateX(-50%);
}
::v-deep .el-pagination__total{
color: #f3ffff;
}
::v-deep .el-pagination__jump{
color: #f3ffff;
}
::v-deep .el-pager{
margin: 0 5px;
}
::v-deep .el-table .el-table__body-wrapper{
background-color: #2F3D8A;
}
::v-deep .el-form-item__content{
//display: flex;
}
::v-deep .el-checkbox {
width: 560px;
}
//::v-deep .el-dialog:not(.is-fullscreen){
// width: auto;
//}
</style>

@ -124,9 +124,9 @@
v-if="form.icon"
:icon-class="form.icon"
class="el-input__icon"
style="height: 32px;width: 16px;"
style="height: 32px;width: .16rem;"
/>
<el-icon v-else style="height: 32px;width: 16px;"><search /></el-icon>
<el-icon v-else style="height: 32px;width: .16rem;"><search /></el-icon>
</template>
</el-input>
</template>

@ -1,16 +0,0 @@
<template>
<div class="app-container home">
<h1>策略管理</h1>
</div>
</template>
<script setup name="Index">
</script>
<style scoped lang="scss">
</style>

@ -32,6 +32,7 @@ export default defineConfig(({ mode, command }) => {
// https://cn.vitejs.dev/config/#server-proxy
'/dev-api': {
target: 'http://192.168.10.99:8999',
// target: 'http://192.168.10.33:8999',
changeOrigin: true,
rewrite: (p) => p.replace(/^\/dev-api/, '')
}

Loading…
Cancel
Save