增加退出登录
This commit is contained in:
4
.env.dev
4
.env.dev
@@ -10,8 +10,8 @@ VUE_APP_TITLE = 洛玻集团驾驶舱
|
|||||||
# VUE_APP_BASE_API = 'http://172.16.33.83:7070'
|
# VUE_APP_BASE_API = 'http://172.16.33.83:7070'
|
||||||
|
|
||||||
# 杨姗姗
|
# 杨姗姗
|
||||||
VUE_APP_BASE_API = 'http://172.16.20.218:7070'
|
# VUE_APP_BASE_API = 'http://172.16.20.218:7070'
|
||||||
# VUE_APP_BASE_API = 'http://172.16.19.232:7070'
|
VUE_APP_BASE_API = 'http://172.16.19.232:7070'
|
||||||
|
|
||||||
|
|
||||||
# 路由懒加载
|
# 路由懒加载
|
||||||
|
|||||||
11
src/assets/icons/svg/logout.svg
Normal file
11
src/assets/icons/svg/logout.svg
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
|
||||||
|
<g id="组_1" data-name="组 1" transform="translate(-970 -281.875)">
|
||||||
|
<g id="编辑备份" transform="translate(970 281.5)">
|
||||||
|
<rect id="矩形" width="16" height="16" transform="translate(0 0.375)" opacity="0"/>
|
||||||
|
<path id="形状" d="M12.281,5.406a.512.512,0,0,0,1.023,0V2.559A2.559,2.559,0,0,0,10.746,0H2.559A2.559,2.559,0,0,0,0,2.559v8.188A2.559,2.559,0,0,0,2.559,13.3H5.415a.512.512,0,1,0,0-1.023H2.559a1.535,1.535,0,0,1-1.535-1.535V2.559A1.535,1.535,0,0,1,2.559,1.023h8.188a1.535,1.535,0,0,1,1.535,1.535Z" transform="translate(1.535 1.535)" fill="#3d7aff"/>
|
||||||
|
</g>
|
||||||
|
<g id="移出" transform="translate(978 290.608)">
|
||||||
|
<path id="形状结合" d="M0,2.821a.746.746,0,0,0,.529.73l.118.011,3.68-.011L3.459,4.4a.656.656,0,0,0,.816,1.02l.1-.083L6.146,3.6a1.107,1.107,0,0,0,.321-.634l.012-.2,0-.026a.61.61,0,0,0-.015-.125,1.106,1.106,0,0,0-.189-.455l-.107-.129L4.39.2a.656.656,0,0,0-1.022.814L4.23,2.108.654,2.1l-.125.011A.88.88,0,0,0,0,2.821Z" transform="translate(0 0)" fill="#3d7aff"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.1 KiB |
@@ -8,6 +8,15 @@
|
|||||||
|
|
||||||
<!-- 右侧区域:全屏按钮 -->
|
<!-- 右侧区域:全屏按钮 -->
|
||||||
<div class="right-content">
|
<div class="right-content">
|
||||||
|
<el-dropdown trigger="click">
|
||||||
|
<el-button type="text" class="logout-btn" :title="'退出'">
|
||||||
|
<svg-icon style="color: #0B58FF;" icon-class="logout" />
|
||||||
|
</el-button>
|
||||||
|
<el-dropdown-menu slot="dropdown">
|
||||||
|
<el-dropdown-item @click.native='logout'>退出登录</el-dropdown-item>
|
||||||
|
<el-dropdown-item @click.native='handleToggle'>切换账号</el-dropdown-item>
|
||||||
|
</el-dropdown-menu>
|
||||||
|
</el-dropdown>
|
||||||
<el-button type="text" class="screen-btn" @click="changeHomeSider">
|
<el-button type="text" class="screen-btn" @click="changeHomeSider">
|
||||||
<svg-icon style="color: #0B58FF;" v-if="openSider" icon-class="closeSider" />
|
<svg-icon style="color: #0B58FF;" v-if="openSider" icon-class="closeSider" />
|
||||||
<svg-icon style="color: #0B58FF;" v-else icon-class="openSider" />
|
<svg-icon style="color: #0B58FF;" v-else icon-class="openSider" />
|
||||||
@@ -36,6 +45,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import moment from 'moment'
|
import moment from 'moment'
|
||||||
|
import {getPath} from "@/utils/ruoyi";
|
||||||
export default {
|
export default {
|
||||||
name: 'Header',
|
name: 'Header',
|
||||||
props: {
|
props: {
|
||||||
@@ -139,6 +149,19 @@ export default {
|
|||||||
const timeRange = this.calculateTimeRange();
|
const timeRange = this.calculateTimeRange();
|
||||||
this.$emit('timeRangeChange', timeRange);
|
this.$emit('timeRangeChange', timeRange);
|
||||||
console.log('触发时间范围变化:', timeRange);
|
console.log('触发时间范围变化:', timeRange);
|
||||||
|
},
|
||||||
|
|
||||||
|
async logout() {
|
||||||
|
this.$modal.confirm('确定注销并退出系统吗?', '提示').then(() => {
|
||||||
|
this.$store.dispatch('LogOut').then(() => {
|
||||||
|
location.href = getPath('/index');
|
||||||
|
})
|
||||||
|
}).catch(() => {});
|
||||||
|
},
|
||||||
|
handleToggle() {
|
||||||
|
this.$store.dispatch('LogOut').then(() => {
|
||||||
|
location.href = getPath('/index');
|
||||||
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@@ -325,10 +348,11 @@ export default {
|
|||||||
|
|
||||||
.right-content {
|
.right-content {
|
||||||
display: flex;
|
display: flex;
|
||||||
margin-bottom: 60px;
|
margin-top: 12px;
|
||||||
margin-right: 16px;
|
margin-right: 16px;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
gap: 10px;
|
gap: 21px;
|
||||||
|
height: 35px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.current-time {
|
.current-time {
|
||||||
@@ -345,6 +369,15 @@ export default {
|
|||||||
color: #00fff0;
|
color: #00fff0;
|
||||||
font-size: 26px;
|
font-size: 26px;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.logout-btn {
|
||||||
|
width: 30px;
|
||||||
|
height: 30px;
|
||||||
|
font-size: 30px;
|
||||||
|
padding: 0;
|
||||||
|
margin-top: 2px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,15 @@
|
|||||||
|
|
||||||
<!-- 右侧区域:全屏按钮 -->
|
<!-- 右侧区域:全屏按钮 -->
|
||||||
<div class="right-content">
|
<div class="right-content">
|
||||||
|
<el-dropdown trigger="click">
|
||||||
|
<el-button type="text" class="logout-btn" :title="'退出'">
|
||||||
|
<svg-icon style="color: #0B58FF;" icon-class="logout" />
|
||||||
|
</el-button>
|
||||||
|
<el-dropdown-menu slot="dropdown">
|
||||||
|
<el-dropdown-item @click.native='logout'>退出登录</el-dropdown-item>
|
||||||
|
<el-dropdown-item @click.native='handleToggle'>切换账号</el-dropdown-item>
|
||||||
|
</el-dropdown-menu>
|
||||||
|
</el-dropdown>
|
||||||
<el-button type="text" class="return-btn" :title="'返回'" @click="handleReturn">
|
<el-button type="text" class="return-btn" :title="'返回'" @click="handleReturn">
|
||||||
<svg-icon style="color: #0B58FF;" icon-class="returnIcon" />
|
<svg-icon style="color: #0B58FF;" icon-class="returnIcon" />
|
||||||
</el-button>
|
</el-button>
|
||||||
@@ -35,7 +44,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import moment from 'moment'; // 引入moment
|
import moment from 'moment'; // 引入moment
|
||||||
|
import {getPath} from "@/utils/ruoyi";
|
||||||
export default {
|
export default {
|
||||||
name: 'Header',
|
name: 'Header',
|
||||||
props: {
|
props: {
|
||||||
@@ -75,6 +84,18 @@ export default {
|
|||||||
handleReturn() {
|
handleReturn() {
|
||||||
this.$router.go(-1);
|
this.$router.go(-1);
|
||||||
},
|
},
|
||||||
|
async logout() {
|
||||||
|
this.$modal.confirm('确定注销并退出系统吗?', '提示').then(() => {
|
||||||
|
this.$store.dispatch('LogOut').then(() => {
|
||||||
|
location.href = getPath('/index');
|
||||||
|
})
|
||||||
|
}).catch(() => {});
|
||||||
|
},
|
||||||
|
handleToggle() {
|
||||||
|
this.$store.dispatch('LogOut').then(() => {
|
||||||
|
location.href = getPath('/index');
|
||||||
|
})
|
||||||
|
},
|
||||||
exportPDF() {
|
exportPDF() {
|
||||||
this.$emit('exportPDF');
|
this.$emit('exportPDF');
|
||||||
},
|
},
|
||||||
@@ -300,6 +321,7 @@ export default {
|
|||||||
margin-top: 12px;
|
margin-top: 12px;
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
gap: 21px;
|
gap: 21px;
|
||||||
|
height: 35px;
|
||||||
}
|
}
|
||||||
|
|
||||||
// .current-time {
|
// .current-time {
|
||||||
@@ -326,6 +348,7 @@ export default {
|
|||||||
color: #00fff0;
|
color: #00fff0;
|
||||||
font-size: 26px;
|
font-size: 26px;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.return-btn {
|
.return-btn {
|
||||||
@@ -336,6 +359,13 @@ export default {
|
|||||||
font-size: 26px;
|
font-size: 26px;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.logout-btn {
|
||||||
|
width: 28px;
|
||||||
|
height: 28px;
|
||||||
|
font-size: 28px;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 自定义下拉框样式(替换原有日期选择器样式) */
|
/* 自定义下拉框样式(替换原有日期选择器样式) */
|
||||||
|
|||||||
@@ -7,6 +7,15 @@
|
|||||||
|
|
||||||
<!-- 右侧区域:全屏按钮 -->
|
<!-- 右侧区域:全屏按钮 -->
|
||||||
<div class="right-content">
|
<div class="right-content">
|
||||||
|
<el-dropdown trigger="click">
|
||||||
|
<el-button type="text" class="logout-btn" :title="'退出'">
|
||||||
|
<svg-icon style="color: #0B58FF;" icon-class="logout" />
|
||||||
|
</el-button>
|
||||||
|
<el-dropdown-menu slot="dropdown">
|
||||||
|
<el-dropdown-item @click.native='logout'>退出登录</el-dropdown-item>
|
||||||
|
<el-dropdown-item @click.native='handleToggle'>切换账号</el-dropdown-item>
|
||||||
|
</el-dropdown-menu>
|
||||||
|
</el-dropdown>
|
||||||
<el-button type="text" class="return-btn" :title="'返回'" @click="handleReturn">
|
<el-button type="text" class="return-btn" :title="'返回'" @click="handleReturn">
|
||||||
<svg-icon style="color: #0B58FF;" icon-class="returnIcon" />
|
<svg-icon style="color: #0B58FF;" icon-class="returnIcon" />
|
||||||
</el-button>
|
</el-button>
|
||||||
@@ -31,7 +40,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import moment from 'moment'; // 引入moment
|
import moment from 'moment'; // 引入moment
|
||||||
|
import {getPath} from "@/utils/ruoyi";
|
||||||
export default {
|
export default {
|
||||||
name: 'Header',
|
name: 'Header',
|
||||||
props: {
|
props: {
|
||||||
@@ -100,6 +109,18 @@ export default {
|
|||||||
this.$router.go(-1);
|
this.$router.go(-1);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
async logout() {
|
||||||
|
this.$modal.confirm('确定注销并退出系统吗?', '提示').then(() => {
|
||||||
|
this.$store.dispatch('LogOut').then(() => {
|
||||||
|
location.href = getPath('/index');
|
||||||
|
})
|
||||||
|
}).catch(() => {});
|
||||||
|
},
|
||||||
|
handleToggle() {
|
||||||
|
this.$store.dispatch('LogOut').then(() => {
|
||||||
|
location.href = getPath('/index');
|
||||||
|
})
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
* 计算时间范围(时间戳格式)
|
* 计算时间范围(时间戳格式)
|
||||||
* 固定为月维度:当月1日00:00:00 → 当月最后一天23:59:59
|
* 固定为月维度:当月1日00:00:00 → 当月最后一天23:59:59
|
||||||
@@ -297,6 +318,7 @@ export default {
|
|||||||
margin-top: 12px;
|
margin-top: 12px;
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
gap: 21px;
|
gap: 21px;
|
||||||
|
height: 35px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.screen-btn {
|
.screen-btn {
|
||||||
@@ -305,6 +327,7 @@ export default {
|
|||||||
color: #00fff0;
|
color: #00fff0;
|
||||||
font-size: 26px;
|
font-size: 26px;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.home-btn {
|
.home-btn {
|
||||||
@@ -322,6 +345,14 @@ export default {
|
|||||||
font-size: 26px;
|
font-size: 26px;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.logout-btn {
|
||||||
|
width: 28px;
|
||||||
|
height: 28px;
|
||||||
|
font-size: 28px;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 日期选择器自定义样式 */
|
/* 日期选择器自定义样式 */
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ import { getOperateCockpit, getOrderDetail } from '@/api/cockpit'
|
|||||||
import { Sidebar } from "../../layout/components";
|
import { Sidebar } from "../../layout/components";
|
||||||
import { mapState } from "vuex";
|
import { mapState } from "vuex";
|
||||||
export default {
|
export default {
|
||||||
name: 'DayReport',
|
name: 'JtHome',
|
||||||
components: { ReportHeader, coreSalesKPIs, keyProductionIndicators, coreBottomLeft, keyWork, orderProgress, financeCosts, Sidebar },
|
components: { ReportHeader, coreSalesKPIs, keyProductionIndicators, coreBottomLeft, keyWork, orderProgress, financeCosts, Sidebar },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|||||||
Reference in New Issue
Block a user