Commit b55b9eb4 authored by 拾柒's avatar 拾柒

Merge branch 'dev-sunyu'

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