修改bug
This commit is contained in:
parent
5bacf50c42
commit
e2c1f7e4cc
|
|
@ -2,7 +2,7 @@
|
|||
VITE_USE_MOCK = true
|
||||
|
||||
# 发布路径
|
||||
VITE_PUBLIC_PATH = /xz
|
||||
VITE_PUBLIC_PATH = /
|
||||
|
||||
|
||||
# 跨域代理,您可以配置多个 ,请注意,没有换行符
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
VITE_USE_MOCK = false
|
||||
|
||||
# 发布路径
|
||||
VITE_PUBLIC_PATH = /xz
|
||||
VITE_PUBLIC_PATH = /
|
||||
|
||||
# 是否启用gzip或brotli压缩
|
||||
# 选项值: gzip | brotli | none
|
||||
|
|
|
|||
|
|
@ -107,6 +107,16 @@ export const newDashboardRoute: AppRouteRecordRaw = {
|
|||
|
||||
};
|
||||
|
||||
// 驾驶舱
|
||||
export const newXzDashboardRoute: AppRouteRecordRaw = {
|
||||
path: '/xz/xzjsc/index',
|
||||
name: 'xzdashboardIndex',
|
||||
//新版后台登录,如果想要使用旧版登录放开即可
|
||||
// component: () => import('/@/views/sys/login/Login.vue'),
|
||||
component: () => import('/@/views/dashboard/Analysis/index1.vue'),
|
||||
|
||||
};
|
||||
|
||||
// Basic routing without permission
|
||||
export const basicRoutes = [
|
||||
LoginRoute,
|
||||
|
|
@ -120,4 +130,5 @@ export const basicRoutes = [
|
|||
newScreenRoute,
|
||||
tempRoute,
|
||||
newDashboardRoute,
|
||||
newXzDashboardRoute,
|
||||
];
|
||||
|
|
|
|||
|
|
@ -8,13 +8,13 @@
|
|||
<a-col :span="24" class="left1">
|
||||
<div class="gsmcClass">
|
||||
<span class="left-to-right" style="margin-left: 15px;">{{companyName}}</span>
|
||||
<span v-if="glfCount>1" style="margin-left:10px;color: #66b1e1;" @click="handleCheckGlf" ><Icon icon="ant-design:sync-outlined" /></span>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="24" class="left2">
|
||||
<div class="glfslClass">
|
||||
<span style="margin-left:10px;" class="left-to-right">锅炉房<br/> 数量</span>
|
||||
<span style="margin-left:12px;font-size:40px;">{{glfCount}}</span>
|
||||
<span style="margin-left:12px;font-size:12px;">
|
||||
<span v-for="(item,index) in heatsource" :key="index" :class="`glf-to-right ${glfCount==index?'glfSelect':''}`" @click="handleCheckGlf(item)">{{item.sourceName}};<br v-if="index==1"/></span>
|
||||
</span>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="24" class="left3">
|
||||
|
|
@ -89,7 +89,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, onMounted, nextTick, onUnmounted } from 'vue';
|
||||
import { ref, onMounted, nextTick, onUnmounted,onBeforeUnmount } from 'vue';
|
||||
import * as echarts from 'echarts';
|
||||
import { heatsourcelist } from "@/views/base/simconfig/Simconfig.api";
|
||||
|
||||
|
|
@ -101,7 +101,7 @@ const { userInfo } = useUserStore();
|
|||
const heatsource = ref();
|
||||
const sourceId = ref<string>('');
|
||||
const companyName = ref<string>('');
|
||||
const glfCount = ref<string>('');
|
||||
const glfCount = ref<number>(0);
|
||||
const disableSubmit = ref<boolean>(false);
|
||||
const visible = ref<boolean>(false);
|
||||
const dataList = ref<any>([]);
|
||||
|
|
@ -992,14 +992,24 @@ function getStaticSix(){
|
|||
}, true)
|
||||
}
|
||||
|
||||
function handleCheckGlf(){
|
||||
visible.value = true;
|
||||
disableSubmit.value = true;
|
||||
function handleCheckGlf(item){
|
||||
console.log("🚀 ~ handleCheckGlf ~ item:", item)
|
||||
|
||||
var list = heatsource.value
|
||||
for(var i=0;i<list.length;i++){
|
||||
var params = list[i].sourceId
|
||||
if(params == item.sourceId){
|
||||
sourceId.value = list[i].sourceId
|
||||
companyName.value = list[i].companyName
|
||||
glfCount.value = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
loadData();
|
||||
}
|
||||
function handleOk(){
|
||||
var list = heatsource.value
|
||||
companyName.value = list.filter(item => item.sourceId == sourceId.value)[0].sourceName
|
||||
companyName.value = list.filter(item => item.sourceId == sourceId.value)[0].companyName
|
||||
visible.value = false;
|
||||
disableSubmit.value = false;
|
||||
loadData();
|
||||
|
|
@ -1010,8 +1020,9 @@ function handleCancel(){
|
|||
}
|
||||
|
||||
async function loadData() {
|
||||
var startTime = dayjs().format('YYMM');
|
||||
await defHttp.post({url: '/exportapi/homeApi/getStaticNowList',params:{sourceId:sourceId.value,startTime}}).then(res => {
|
||||
var startTime2 = dayjs().format('YYMM');
|
||||
console.log("🚀 ~ loadData ~ startTime2:", startTime2)
|
||||
await defHttp.post({url: '/exportapi/homeApi/getStaticNowList',params:{sourceId:sourceId.value,startTime:startTime2}}).then(res => {
|
||||
var list = res.data
|
||||
for (let i = 0; i < list.length; i++) {
|
||||
list[i].datatime = dayjs(list[i].datatime).format('HH:mm')
|
||||
|
|
@ -1033,16 +1044,33 @@ async function getHeatsource(){
|
|||
/* ---- lifecycle ---- */
|
||||
onMounted(async () => {
|
||||
await getHeatsource();
|
||||
glfCount.value = userInfo.sourceId.split(',').length;
|
||||
var list = heatsource.value
|
||||
if(list.length>0){
|
||||
sourceId.value = list[0].sourceId
|
||||
companyName.value = list[0].sourceName
|
||||
companyName.value = list[0].companyName
|
||||
}
|
||||
loadData();
|
||||
setTimeout(() => {
|
||||
|
||||
setInterval(() => {
|
||||
var list = heatsource.value
|
||||
if(list.length>0){
|
||||
if(glfCount.value < list.length){
|
||||
glfCount.value = glfCount.value+1 ;
|
||||
}
|
||||
if(glfCount.value >= list.length){
|
||||
glfCount.value = 0;
|
||||
}
|
||||
var num = glfCount.value
|
||||
sourceId.value = list[num].sourceId
|
||||
companyName.value = list[num].companyName
|
||||
console.log("🚀 ~ sourceId.value:", sourceId.value,list[num].sourceName)
|
||||
}
|
||||
loadData();
|
||||
}, 30 * 60 * 1000);
|
||||
}, 60 * 1000);
|
||||
});
|
||||
|
||||
onBeforeUnmount(() => {
|
||||
window.removeEventListener("resize", loadData);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
@ -1176,4 +1204,11 @@ onMounted(async () => {
|
|||
width: 100%;
|
||||
height: calc(100% - 30px); // 减去标题高度
|
||||
}
|
||||
.glf-to-right {
|
||||
color: #66b1e1;
|
||||
cursor:pointer;
|
||||
}
|
||||
.glfSelect{
|
||||
color: #a3d1f0;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue