Commit 998c1e76 authored by 拾柒's avatar 拾柒

修改页面布局,修改线上api

parent a34f3289
......@@ -5,4 +5,4 @@ VUE_APP_TITLE = 悦优享视频监控管理系统
ENV = 'production'
# 悦优享视频监控管理系统/生产环境
VUE_APP_BASE_API = '/prod-api'
VUE_APP_BASE_API = '/api'
<template>
<el-menu
:default-active="'/monitoring/video'"
:default-active="currentIndex"
mode="horizontal"
active-text-color="#ffd04b"
@select="handleSelect"
......@@ -63,7 +63,7 @@ export default {
// 顶部栏初始数
visibleNumber: 5,
// 当前激活菜单的 index
currentIndex: undefined
currentIndex: '/monitoring/video'
};
},
computed: {
......@@ -134,6 +134,7 @@ export default {
window.removeEventListener('resize', this.setVisibleNumber)
},
mounted() {
this.currentIndex = this.$route.path
this.$store.dispatch('app/toggleSideBarHide', true);
this.setVisibleNumber();
},
......
......@@ -162,7 +162,7 @@
<el-button
size="mini"
style="border: transparent"
icon="el-icon-edit"
icon="el-icon-view"
></el-button>
<el-button
size="mini"
......
<template>
<div class="app-container">
<div style="background-color: #F6F6FA;height: 95vh;padding-left: 30px;padding-right: 30px" >
<div style="background-color: white;height: 95vh;padding-left: 30px;padding-right: 30px" >
<div>
<span style="display: flex;justify-content: flex-start;align-items: center;"><div style="border: 1px solid #116FBB;width: 2px;height: 20px;margin-right: 5px"></div><h5 style="color: #116FBB;font-weight: bolder">历史记录</h5></span>
</div>
......@@ -57,37 +57,40 @@
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="序号" align="center" width="100"/>
<!-- <template slot-scope="scope">-->
<!-- <span> {{ queryParams.pageNum * queryParams.pageSize + scope.$index}}</span>-->
<!-- <span>{{ (scope.$index+1)+(queryParams.pageNum-1)*queryParams.pageSize }}</span>-->
<!-- </template>-->
<el-table-column label="监控点名称" align="center" prop="monitoringName" />
<el-table-column label="监控开始时间" align="center" prop="monitoringStarttime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.monitoringStarttime, '{y}-{m}-{d}') }}</span>
<span>{{ parseTime(scope.row.monitoringStarttime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<el-table-column label="监控结束时间" align="center" prop="monitoringFinallytime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.monitoringFinallytime, '{y}-{m}-{d}') }}</span>
<span>{{ parseTime(scope.row.monitoringFinallytime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<el-table-column label="监控时间" align="center" prop="monitorTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.monitorTime, '{y}-{m}-{d}') }}</span>
<span>{{ formatHoursAsHMS(scope.row.monitorTime) }}</span>
</template>
</el-table-column>
<el-table-column label="监控状态" align="center" prop="monitorState">
<template slot-scope="scope">
<dict-tag :options="dict.type.history_state" :value="scope.row.monitorState"/>
<span :class="scope.row.monitorState === '0' ? 'green-text' : 'black-text'">{{ scope.row.monitorState === '0' ? '·进行中' : '·已完成' }}</span>
<!-- <dict-tag :options="dict.type.history_state" :value="scope.row.monitorState"/>-->
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
style="border: transparent;background-color: transparent"
size="mini"
type="text"
icon="el-icon-edit"
plain
icon="el-icon-view"
class="green-icon"
@click="handleUpdate(scope.row)"
>修改</el-button>
></el-button>
</template>
</el-table-column>
</el-table>
......@@ -160,6 +163,16 @@ export default {
this.getList();
},
methods: {
formatHoursAsHMS(hours) {
// 确保小时数为整数
const intHours = Math.floor(hours);
// 使用 padStart 方法确保小时数始终有两位数字
const hoursStr = intHours.toString().padStart(2, '0');
// 返回格式化的字符串
return `${hoursStr}:00:00`;
},
parseTime,
/** 查询history列表 */
getList() {
......@@ -259,3 +272,14 @@ export default {
}
};
</script>
<style scoped>
.green-text {
color: #51ad51;
}
.black-text {
color: black;
}
.green-icon .el-icon-view {
color: #51ad51;
}
</style>
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