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

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

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