Commit 0a1db58a authored by 王亚晖's avatar 王亚晖

创建巡更历史

parent c99940fd
......@@ -4,3 +4,13 @@
</el-table>
</template>
<script lang="ts" setup>
import { ref, reactive, onMounted, onUnmounted } from 'vue';
import http from '../../api/http';
import store from "../../store/index";
const props = defineProps(['actionValue'
]);
// console.log(props.actionValue);
</script>
\ No newline at end of file
......@@ -4,3 +4,22 @@
</el-table>
</template>
<script lang="ts" setup>
import { ref, reactive, onMounted, onUnmounted, watch } from 'vue';
import http from '../../api/http';
import store from "../../store/index";
const props = defineProps(['activeRadio']);
console.log("1actionValue:"+props.activeRadio);
//监听修改actionValue状态
watch(() =>props.activeRadio, (oldValue, newValue) => {
//console.log("2actionValue:"+props.activeRadio);
initData();
},{deep:true});
function initData(){
}
initData();
</script>
\ No newline at end of file
......@@ -241,7 +241,14 @@ const routes = [
name: 'PatrolPage',
component: () => import('@/views/PatrolPage/TransferPatrolPage.vue'),
meta: {
title: '换热站巡更'
title: '今日巡更'
}
},{
path: '/HisPatrol',
name: 'HisPatrolPage',
component: () => import('@/views/PatrolPage/HisPatrolPage.vue'),
meta: {
title: '巡更历史'
}
},{
path: '/HeatUser',
......
......@@ -2,7 +2,7 @@
<template>
<el-card class="card-contianer">
<label>{{radioTitle}}</label>
<el-radio-group v-model="radioList" style="margin-left: 50px;">
<el-radio-group v-model="activeRadio" style="margin-left: 50px;">
<el-radio
v-for="(option, index) in options"
:key="index"
......@@ -13,47 +13,47 @@
</el-radio-group>
</el-card>
<el-tabs :tab-position="tabPosition" style="height: 100%" class="demo-tabs">
<el-tab-pane label="换热站状态">
<TransferStatusControl/>
<el-tab-pane label="换热站状态" v-if="isTransferStatus">
<TransferStatusControl :activeRadio="activeRadio"/>
</el-tab-pane>
<el-tab-pane label="远程寄存器">
<el-tab-pane label="远程寄存器" v-if="isTransferRegControl">
<TransferRegControl/>
</el-tab-pane>
<el-tab-pane label="节假日参数组">
<el-tab-pane label="节假日参数组" v-if="isHolidayControl">
<HolidayControl/>
</el-tab-pane>
<el-tab-pane label="夜间参数组">
<el-tab-pane label="夜间参数组" v-if="isNightControl">
<NightControl/>
</el-tab-pane>
<el-tab-pane label="二次网供水温度">
<el-tab-pane label="二次网供水温度" v-if="isSecTempControl">
<SecTempControl/>
</el-tab-pane>
<el-tab-pane label="曲线对应">
<el-tab-pane label="曲线对应" v-if="isCurveControl">
<CurveControl/>
</el-tab-pane>
<el-tab-pane label="气象仪">
<el-tab-pane label="气象仪" v-if="isWeatherControl">
<WeatherControl/>
</el-tab-pane>
<el-tab-pane label="温度上下限">
<el-tab-pane label="温度上下限" v-if="isLimitControl">
<LimitControl/>
</el-tab-pane>
<el-tab-pane label="风向控制">
<el-tab-pane label="风向控制" v-if="isWinDirectionControl">
<WinDirectionControl/>
</el-tab-pane>
<el-tab-pane label="热量">
<el-tab-pane label="热量" v-if="isHeatControl">
<HeatControl/>
</el-tab-pane>
<el-tab-pane label="室外温度控制">
<el-tab-pane label="室外温度控制" v-if="isOutdoorTempControl">
<OutdoorTempControl/>
</el-tab-pane>
<el-tab-pane label="循环泵夜间降频">
<el-tab-pane label="循环泵夜间降频" v-if="isNightFrequency">
<NightFrequency/>
</el-tab-pane>
</el-tabs>
</template>
<script lang="ts" setup>
import { ref, reactive, onMounted, onUnmounted } from 'vue';
import { ref, reactive, onMounted, onUnmounted, watch } from 'vue';
import http from '../../api/http';
import store from "../../store/index";
import TransferStatusControl from '../../components/Remote/TransferStatusControl.vue';
......@@ -73,7 +73,19 @@
const options = reactive([]);
const enterpriseId = ref(null);
const tabPosition = ref('left');
const radioList = ref(null);
const activeRadio = ref(null);
const isTransferStatus = ref(false);
const isTransferRegControl = ref(false);
const isHolidayControl = ref(false);
const isNightControl = ref(false);
const isSecTempControl = ref(false);
const isCurveControl = ref(false);
const isWeatherControl = ref(false);
const isLimitControl = ref(false);
const isWinDirectionControl = ref(false);
const isHeatControl = ref(false);
const isOutdoorTempControl = ref(false);
const isNightFrequency = ref(false);
//初始化页面
function initPage(){
......@@ -106,20 +118,64 @@
}
}
});
radioList.value = options[0].value;
activeRadio.value = options[0].value;
console.log("activeRadio.value:"+activeRadio.value);
}
}
//根据权限初始化远程控制页列表
function initRomateList(){
let userInfo = store.getters.getUserInfo;
if(userInfo.roleId >4){
http.post("/api/module/RemoteModules", '').then((result) => {
if(result.data !== null){
//console.log(result.data);
result.data.forEach(item =>{
if(item.moduleCode ==="RemoteTransferStatus"){
isTransferStatus.value = true;
}
if(item.moduleCode ==="RemoteTransferReg"){
isTransferRegControl.value = true;
}
if(item.moduleCode ==="HolidayControl"){
isHolidayControl.value = true;
}
if(item.moduleCode ==="NightControl"){
isNightControl.value = true;
}
if(item.moduleCode ==="SecTempControl"){
isSecTempControl.value = true;
}
if(item.moduleCode ==="CurveControl"){
isCurveControl.value = true;
}
if(item.moduleCode ==="WeatherControl"){
isWeatherControl.value = true;
}
if(item.moduleCode ==="LimitControl"){
isLimitControl.value = true;
}
if(item.moduleCode ==="WinDirectionControl"){
isWinDirectionControl.value = true;
}
if(item.moduleCode ==="HeatControl"){
isHeatControl.value = true;
}
if(item.moduleCode ==="OutdoorTempControl"){
isOutdoorTempControl.value = true;
}
if(item.moduleCode ==="NightFrequency"){
isNightFrequency.value = true;
}
})
}
});
}
initPage();
// 当选中项变化时,这里会打印新的值
watch(activeRadio, (newValue) => {
// console.log('Selected value changed:', newValue);
});
</script>
<style lang="less" scoped>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment