Commit d23f73e3 authored by 罗林杰's avatar 罗林杰

修改历史记录和员工信息页面

parent a78ca7bf
......@@ -22,6 +22,8 @@
<i style="width: 10px; height: 10px; margin-top: -12px"></i>
首页
</el-menu-item>
</template>
<template>
<el-menu-item
class="menuStyle"
style="
......@@ -38,6 +40,8 @@
<i style="width: 10px; height: 10px; margin-top: -12px"></i>
员工信息
</el-menu-item>
</template>
<template>
<el-menu-item
class="menuStyle"
style="
......@@ -68,7 +72,7 @@
v-if="this.backTag"
@click="changeBackTag()"
>
<i style="width: 10px; height: 10px; margin-top: -12px"></i>
<i class="el-icon-back " style="width: 15px; height: 15px; margin-top: -8px; margin-left: -8px"></i>
返回历史记录
</el-menu-item>
</template>
......@@ -100,6 +104,7 @@ const hideList = ["/index", "/user/profile"];
export default {
components: { Menu },
data() {
return {
roles: [],
......@@ -127,6 +132,11 @@ export default {
currentIndex: '/monitoring/video'
};
},
watch: {
'$route.path': function (newVal, oldVal) {
this.updateBackTag(newVal);
},
},
computed: {
theme() {
return this.$store.state.settings.theme;
......@@ -203,15 +213,17 @@ export default {
this.roles = this.$store.getters.roles;
},
created() {
this.getinfo();
this.updateBackTag(this.$route.path);
},
methods: {
changeBackTag() {
this.backTag = false;
updateBackTag(path) {
this.backTag = path === '/monitoringPlayback/playback';
},
getinfo() {
let self = this;
self.backTag = this.$router.params.backTag;
changeBackTag() {
this.$router.push({
path: "/monitoringhistory/history",
});
console.log('返回历史记录');
},
// 根据宽度计算设置显示栏数
setVisibleNumber() {
......
......@@ -6,18 +6,19 @@
<img src="../../assets/images/titlePic.png" alt="" style="width: 200px;height: 80px;">
<top-nav id="topmenu-container" class="topmenu-container" v-if="topNav"/>
<div class="right-menu" style="margin-top: 20px">
<el-dropdown class="avatar-container right-menu-item hover-effect" trigger="click">
<el-dropdown class="avatar-container right-menu-item " trigger="click">
<div class="avatar-wrapper">
<img :src="avatar" class="user-avatar">
<i class="el-icon-caret-bottom"/>
<!-- <img :src="avatar" class="user-avatar">-->
<span class="username">{{ username }}
<i class="el-icon-caret-bottom"/></span>
</div>
<el-dropdown-menu slot="dropdown">
<router-link to="/user/profile">
<el-dropdown-menu>
<!-- <router-link to="/user/profile">
<el-dropdown-item>个人中心</el-dropdown-item>
</router-link>
<el-dropdown-item @click.native="setting = true">
<span>布局设置</span>
</el-dropdown-item>
</el-dropdown-item>-->
<!-- sunyu 新加了修改密码的弹窗,完成修改密码功能-->
<el-dropdown-item @click.native="resetPwdVisible = true">
<span>修改密码</span>
......@@ -55,6 +56,7 @@
<script>
import {mapGetters} from 'vuex'
import Cookies from "js-cookie";
import Breadcrumb from '@/components/Breadcrumb'
import TopNav from '@/components/TopNav'
import Hamburger from '@/components/Hamburger'
......@@ -77,6 +79,7 @@ export default {
}
};
return {
username: '',
user: {
oldPassword: undefined,
newPassword: undefined,
......@@ -110,6 +113,9 @@ export default {
RuoYiGit,
RuoYiDoc
},
mounted() {
this.username = Cookies.get('username')
},
computed: {
...mapGetters([
'sidebar',
......@@ -227,20 +233,12 @@ export default {
.right-menu-item {
display: inline-block;
padding: 0 8px;
padding: 0 10px;
height: 100%;
font-size: 18px;
color: #5a5e66;
vertical-align: text-bottom;
&.hover-effect {
cursor: pointer;
transition: background .3s;
&:hover {
background: rgba(0, 0, 0, .025)
}
}
}
.avatar-container {
......@@ -249,14 +247,12 @@ export default {
.avatar-wrapper {
margin-top: 5px;
position: relative;
left: 20px;
.user-avatar {
cursor: pointer;
width: 40px;
height: 40px;
border-radius: 10px;
.username {
position: absolute;
left: -100px;
}
.el-icon-caret-bottom {
cursor: pointer;
position: absolute;
......
......@@ -700,21 +700,28 @@ export default {
if (this.userList && this.userList.length > 0) {
// 获取当前选中的行
const currentSelection = this.$refs.table.selection;
// 检查是否有选中的行
if (currentSelection.length === 0) {
this.$message.warning('请至少选择一条数据进行反选操作。');
return;
}
// 创建一个新数组,用于存储反选后的结果
const newSelection = this.userList.filter(row => {
return !currentSelection.includes(row);
});
const newSelection = this.userList.filter(row => !currentSelection.includes(row));
// 使用 toggleAllSelection 方法来选中反选后的行
this.$refs.table.toggleAllSelection(false); // 先取消选中所有行
// 使用 toggleAllSelection 方法来取消所有行的选中状态
this.$refs.table.clearSelection();
// 在下一个DOM更新周期中,重新选中需要反选的行
this.$nextTick(() => {
this.$refs.table.toggleRowSelection(newSelection, true); // 再选中需要反选的行
newSelection.forEach(row => {
this.$refs.table.toggleRowSelection(row);
});
});
// 触发 selection-change 事件以更新状态
this.handleSelectionChange(newSelection);
} else {
console.error('DataSource is not available or empty.');
}
},
// 更多操作触发
......
......@@ -40,10 +40,10 @@
placeholder="请输入监控点名称"
clearable
>
<el-option value="01">Camera 01</el-option>
<el-option value="02">Camera 02</el-option>
<el-option value="03">Camera 03</el-option>
<el-option value="04">Camera 04</el-option>
<el-option value="01" label="Camera 01">Camera 01</el-option>
<el-option value="02" label="Camera 02">Camera 02</el-option>
<el-option value="03" label="Camera 03">Camera 03</el-option>
<el-option value="04" label="Camera 04">Camera 04</el-option>
</el-select>
</el-form-item>
......@@ -53,8 +53,8 @@
placeholder="请选择监控状态"
clearable
>
<el-option value="0">进行中</el-option>
<el-option value="1">已完成</el-option>
<el-option value="0" label="进行中">进行中</el-option>
<el-option value="1" label="已完成">已完成</el-option>
</el-select>
</el-form-item>
......@@ -179,9 +179,7 @@
>
<template slot-scope="scope">
<span
:class="
scope.row.monitorState === '0' ? 'green-text' : 'black-text'
"
:class="scope.row.monitorState === '0' ? 'green-text' : 'black-text'"
>{{
scope.row.monitorState === "0" ? "·进行中" : "·已完成"
}}</span
......
......@@ -4,7 +4,7 @@
<div style="margin-right: 30px;margin-top: 60px">
<el-form label-position="right" label-width="100px" :model="formLabelAlign">
<el-form-item label="监控点名称">
<el-input v-model="carryRowCode.id" disabled></el-input>
<el-input v-model="carryRowCode.monitoringName" disabled></el-input>
</el-form-item>
<el-form-item label="开始时间">
<el-input v-model="carryRowCode.monitoringStarttime" disabled></el-input>
......@@ -16,7 +16,10 @@
<el-input v-model="carryRowCode.monitorTime" disabled></el-input>
</el-form-item>
<el-form-item label="监控状态">
<el-input v-model="carryRowCode.monitorState" disabled></el-input>
<el-input
disabled
:value="carryRowCode.monitorState === 0 ? '进行中' : '已完成' "
></el-input>
</el-form-item>
</el-form>
</div>
......
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