Browse Source

部分问题修复

develop
fuguobin 1 year ago
parent
commit
49f52aa954
  1. 27
      src/api/waring/index.ts
  2. 19
      src/api/waring/types.ts
  3. 52
      src/assets/iconfont/demo_index.html
  4. 14
      src/assets/iconfont/iconfont.css
  5. 2
      src/assets/iconfont/iconfont.js
  6. 14
      src/assets/iconfont/iconfont.json
  7. BIN
      src/assets/iconfont/iconfont.ttf
  8. BIN
      src/assets/iconfont/iconfont.woff
  9. BIN
      src/assets/iconfont/iconfont.woff2
  10. 0
      src/assets/images/waring_bg.png
  11. 6
      src/mock/routes.json
  12. 142
      src/styles/index.scss
  13. 5
      src/types/components.d.ts
  14. 8
      src/utils/socket.ts
  15. 131
      src/views/monitoring/components/header.vue
  16. 28
      src/views/monitoring/components/menu.vue
  17. 2
      src/views/monitoring/devicemanage/components/menu.vue
  18. 30
      src/views/monitoring/screen/components/main.vue
  19. 2
      src/views/monitoring/screen/components/menu.vue
  20. 7
      src/views/monitoring/screen/index.scss
  21. 2
      src/views/monitoring/screen/index.vue
  22. 2
      vite.config.ts

27
src/api/waring/index.ts

@ -0,0 +1,27 @@
import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { waringVo } from './types';
/**
*
*
* @param params status状态
*/
export function getWarList(params: number): AxiosPromise<waringVo> {
return request({
url: '/dc/dcBusiAlertJob/list/'+params,
method: 'get'
});
}
/**
*
*
* @param params id
*/
export function process(id: string) {
return request({
url: '/dc/dcBusiAlertJob/process/' + id,
method: 'post',
});
}

19
src/api/waring/types.ts

@ -0,0 +1,19 @@
/**
*
*/
export interface waringVo {
alertFirstTime: string;
alertLastTime: string;
alertLevel: number;
alertName: string;
alertTime:string
alertReadTime: string;
deviceName: string;
deviceUuid: string;
id: number;
paramCode: string;
paramName: string;
processStatus: number;
processUserId: number;
totalCounts: number;
}

52
src/assets/iconfont/demo_index.html

@ -54,6 +54,18 @@
<div class="content unicode" style="display: block;">
<ul class="icon_lists dib-box">
<li class="dib">
<span class="icon iconfont">&#xe621;</span>
<div class="name">编辑</div>
<div class="code-name">&amp;#xe621;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe6e7;</span>
<div class="name">箭头</div>
<div class="code-name">&amp;#xe6e7;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe845;</span>
<div class="name">up</div>
@ -396,9 +408,9 @@
<pre><code class="language-css"
>@font-face {
font-family: 'iconfont';
src: url('iconfont.woff2?t=1694076506316') format('woff2'),
url('iconfont.woff?t=1694076506316') format('woff'),
url('iconfont.ttf?t=1694076506316') format('truetype');
src: url('iconfont.woff2?t=1694485516205') format('woff2'),
url('iconfont.woff?t=1694485516205') format('woff'),
url('iconfont.ttf?t=1694485516205') format('truetype');
}
</code></pre>
<h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
@ -424,6 +436,24 @@
<div class="content font-class">
<ul class="icon_lists dib-box">
<li class="dib">
<span class="icon iconfont icon-edit-icon"></span>
<div class="name">
编辑
</div>
<div class="code-name">.icon-edit-icon
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-jiantou"></span>
<div class="name">
箭头
</div>
<div class="code-name">.icon-jiantou
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-arrow-up"></span>
<div class="name">
@ -937,6 +967,22 @@
<div class="content symbol">
<ul class="icon_lists dib-box">
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-edit-icon"></use>
</svg>
<div class="name">编辑</div>
<div class="code-name">#icon-edit-icon</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-jiantou"></use>
</svg>
<div class="name">箭头</div>
<div class="code-name">#icon-jiantou</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-arrow-up"></use>

14
src/assets/iconfont/iconfont.css

@ -1,8 +1,8 @@
@font-face {
font-family: "iconfont"; /* Project id 3987011 */
src: url('iconfont.woff2?t=1694076506316') format('woff2'),
url('iconfont.woff?t=1694076506316') format('woff'),
url('iconfont.ttf?t=1694076506316') format('truetype');
src: url('iconfont.woff2?t=1694485516205') format('woff2'),
url('iconfont.woff?t=1694485516205') format('woff'),
url('iconfont.ttf?t=1694485516205') format('truetype');
}
.iconfont {
@ -13,6 +13,14 @@
-moz-osx-font-smoothing: grayscale;
}
.icon-edit-icon:before {
content: "\e621";
}
.icon-jiantou:before {
content: "\e6e7";
}
.icon-arrow-up:before {
content: "\e845";
}

2
src/assets/iconfont/iconfont.js

File diff suppressed because one or more lines are too long

14
src/assets/iconfont/iconfont.json

@ -5,6 +5,20 @@
"css_prefix_text": "icon-",
"description": "",
"glyphs": [
{
"icon_id": "33987167",
"name": "编辑",
"font_class": "edit-icon",
"unicode": "e621",
"unicode_decimal": 58913
},
{
"icon_id": "9371505",
"name": "箭头",
"font_class": "jiantou",
"unicode": "e6e7",
"unicode_decimal": 59111
},
{
"icon_id": "34453072",
"name": "up",

BIN
src/assets/iconfont/iconfont.ttf

Binary file not shown.

BIN
src/assets/iconfont/iconfont.woff

Binary file not shown.

BIN
src/assets/iconfont/iconfont.woff2

Binary file not shown.

0
src/assets/images/20230908-091531.png → src/assets/images/waring_bg.png

Before

Width:  |  Height:  |  Size: 72 KiB

After

Width:  |  Height:  |  Size: 72 KiB

6
src/mock/routes.json

@ -8,7 +8,7 @@
"title": "监控系统",
"icon": "multi_level",
"hidden": false,
"roles": ["admin"],
"roles": ["biadmin"],
"keepAlive": true
},
"children": [
@ -20,7 +20,7 @@
"title": "数据大屏",
"icon": "document",
"hidden": false,
"roles": ["admin"],
"roles": ["biadmin"],
"keepAlive": true
}
},
@ -32,7 +32,7 @@
"title": "设备管理",
"icon": "system",
"hidden": false,
"roles": ["admin"],
"roles": ["biadmin"],
"keepAlive": true
}
}

142
src/styles/index.scss

@ -7,6 +7,7 @@
.app-container {
padding: 20px;
.search {
padding: 18px 0 0 10px;
margin-bottom: 10px;
@ -18,3 +19,144 @@
}
.n-drawer-container {
.waringDrawer {
color: #fff;
background: #0f2856;
backdrop-filter: blur(10px);
overflow: hidden;
.n-drawer-header {
color: #fff;
border-bottom: 1px solid #1a3960;
.n-drawer-header__main {
flex: 1;
.title {
display: flex;
justify-content: space-between;
align-items: center;
cursor: pointer;
.button {
font-size: 14px;
color: #b1e3ff;
padding-right: 20px;
}
}
}
.n-base-close {
color: #fff;
}
}
.waringList {
padding: 10px;
background: #08173e;
.item {
padding-bottom: 10px;
border-bottom: 1px solid #1a3960;
margin-bottom: 10px;
.name {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 10px;
span {
font-size: 16px;
}
span.time {
font-size: 14px;
color: #b1e3ff;
}
}
.info {
display: flex;
justify-content: space-between;
align-items: center;
span {
color: #b1e3ff;
}
.n-button {
background-color: #022a5a !important;
border: 1px solid #114073;
}
}
}
.item:last-child {
border-bottom: none;
margin-bottom: 0;
}
}
}
}
.n-modal-container {
.waringModal {
width: 70%;
height: 500px;
background: url(@/assets/images/waring_bg.png) no-repeat;
background-size: 100% 100%;
.n-card__content {
position: relative;
padding-top: 0;
padding: 80px;
.waringTable {
background-color: transparent;
border: 1px solid #053872;
.el-table__inner-wrapper::before {
content: none;
}
.headerRowClass {
.headerCellClass {
color: #fff;
background-color: #001D40;
border-bottom: none;
}
}
.rowClass {
background-color: transparent;
.cellClass {
color: #B1E3FF;
border-bottom: none;
background-color: #01153A;
.confirm {
background-color: #022a5a !important;
border: 1px solid #114073;
}
}
}
.rowClass.el-table__row--striped {
.cellClass {
background-color: #001D40;
}
}
}
.warClose {
width: 50px;
cursor: pointer;
color: #B1E3FF;
margin: 100px auto 0 auto;
}
}
}
}

5
src/types/components.d.ts

@ -27,20 +27,23 @@ declare module '@vue/runtime-core' {
ElScrollbar: typeof import('element-plus/es')['ElScrollbar']
ElSubMenu: typeof import('element-plus/es')['ElSubMenu']
ElSwitch: typeof import('element-plus/es')['ElSwitch']
ElTable: typeof import('element-plus/es')['ElTable']
ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
ElTooltip: typeof import('element-plus/es')['ElTooltip']
ElTree: typeof import('element-plus/es')['ElTree']
Hamburger: typeof import('./../components/Hamburger/index.vue')['default']
LangSelect: typeof import('./../components/LangSelect/index.vue')['default']
MultiUpload: typeof import('./../components/Upload/MultiUpload.vue')['default']
NAvatar: typeof import('naive-ui')['NAvatar']
NBadge: typeof import('naive-ui')['NBadge']
NButton: typeof import('naive-ui')['NButton']
NCard: typeof import('naive-ui')['NCard']
NCollapse: typeof import('naive-ui')['NCollapse']
NCollapseItem: typeof import('naive-ui')['NCollapseItem']
NDrawer: typeof import('naive-ui')['NDrawer']
NDrawerContent: typeof import('naive-ui')['NDrawerContent']
NIcon: typeof import('naive-ui')['NIcon']
NMenu: typeof import('naive-ui')['NMenu']
NModal: typeof import('naive-ui')['NModal']
NScrollbar: typeof import('naive-ui')['NScrollbar']
NSpin: typeof import('naive-ui')['NSpin']
NTooltip: typeof import('naive-ui')['NTooltip']

8
src/utils/socket.ts

@ -51,10 +51,16 @@ class WebSocketService {
onMessage(event: MessageEvent): void {
if (event.data != '连接成功') {
const response = JSON.parse(event.data);
console.log(response);
// console.log(response);
this.data = response;
// 处理返回的数据
if (response.code === 'datareal') {
console.log('table');
mitt.emit('tableMessage', response);
} else if (response.code === 'alertDev') {
console.log('waring');
mitt.emit('waringMessage', response);
}
// const oldData = tableStoreCounter.tableDataStore;
// const index = oldData.findIndex((obj) => obj.id === response.id);
// if (index !== -1) {

131
src/views/monitoring/components/header.vue

@ -36,11 +36,11 @@
</template>
</n-button>
</template>
返回
返回上一
</n-tooltip>
<n-tooltip trigger="hover" v-if="warningShow">
<template #trigger>
<n-badge class="warningbadge" :value="warningData.length" :max="15">
<n-badge class="warningbadge" :value="waringData.length" :max="15">
<n-button class="tooltips" circle quaternary @click="waringClick">
<template #icon>
<n-icon>
@ -56,23 +56,71 @@
<n-drawer class="waringDrawer" v-model:show="waringDrawer" :default-width="420" resizable placement="right">
<n-drawer-content closable>
<template #header>
消息
<div class="title">
<span>消息</span>
<span class="button" @click="waringMore">更多</span>
</div>
</template>
啊呀呀呀呀
<div class="waringList">
<div class="item" v-for="(item, index) in waringData" :key="index">
<div class="name">
<span>{{ item.deviceName }}</span>
<span class="time">{{ item.alertTime }}</span>
</div>
<div class="info">
<span>{{ item.paramName }}</span>
<n-button type="info" size="small" @click="waringConfirm(item)">确认</n-button>
</div>
</div>
</div>
</n-drawer-content>
</n-drawer>
<n-modal class="waringModal" v-model:show="waringModal">
<n-card :bordered="false" size="huge" role="dialog" aria-modal="true">
<el-table class="waringTable" :data="waringList" header-row-class-name="headerRowClass"
header-cell-class-name="headerCellClass" row-class-name="rowClass" cell-class-name="cellClass" height="350"
stripe>
<el-table-column prop="deviceName" label="设备名称" align="center" />
<el-table-column prop="paramName" label="变量名称" align="center" />
<el-table-column prop="alertName" label="告警级别" align="center" />
<el-table-column prop="totalCounts" label="告警累计" align="center" />
<el-table-column prop="alertFirstTime" label="首次告警时间" align="center" />
<el-table-column fixed="right" label="操作" align="center">
<template #default="scope">
<el-button class="confirm" type="info" size="small" @click="waringConfirm(scope.row)">确认</el-button>
</template>
</el-table-column>
</el-table>
<div class="warClose" @click="warClose">
<CloseCircleOutline />
</div>
</n-card>
</n-modal>
</template>
<script lang="ts" setup>
import router from '@/router';
import { useRoute, useRouter } from "vue-router";
import { getWeather } from '@/api/user/index';
import { getWarList, process } from '@/api/waring/index';
import { waringVo } from '@/api/waring/types';
import { Filter, Maximize, Settings, Power, Bell } from '@vicons/tabler';
import { CloseCircleOutline } from '@vicons/ionicons5';
import { useDateFormat, useNow } from '@vueuse/core';
const currentTime = useDateFormat(useNow(), 'YYYY-MM-DD HH:mm:ss');
import { uniqueArrayObject } from '@/utils/index';
import mitt from '@/plugins/bus';
import calendar from '@/utils/lunar';
const route = useRoute()
const router = useRouter()
const currentTime = useDateFormat(useNow(), 'YYYY-MM-DD HH:mm:ss');
const emit = defineEmits(['showModalClick', 'returnClick']);
const timer = ref()
const isCurrentRoute = ref(true)
const waringDrawer = ref(false)
const waringModal = ref(false)
const waringData = ref<waringVo[]>([])
const waringList = ref<waringVo[]>([])
const routerType = ref('')
const weatherData = ref(
{ city: "", weather: "", temperature: "", weatherImg: "" }
@ -95,17 +143,23 @@ const props = defineProps({
warningShow: {
type: Boolean,
default: false
},
warningData: {
type: Array,
default: [1, 2, 3],
}
});
onMounted(() => {
routerType.value = route.query?.id === undefined ? "0" : "1"
getWeatherData()
});
mitt.on('waringMessage', (res: any) => {
//
console.log(res.data);
waringData.value.push(res.data)
console.log("waringData--", waringData.value);
waringData.value = uniqueArrayObject(waringData.value, "id")
console.log("waringData--", waringData.value);
});
function showClick() {
///
emit('showModalClick', true);
@ -114,8 +168,15 @@ function showClick() {
function returnBack() {
//
// emit('returnClick', '');
if (routerType.value === '1'&&route.path!="/screen") {
router.push({
path: "/screen",
query: { id: sessionStorage.getItem('id') }
})
} else {
router.replace("/dashboard")
}
}
function waringClick() {
//
waringDrawer.value = true
@ -146,6 +207,47 @@ function getWeatherData() {
}
});
}
function waringMore() {
//
waringDrawer.value = false
waringModal.value = true
getwaringList()
}
function getwaringList() {
const params = 0;
getWarList(params).then((res: any) => {
if (res.code === 200) {
waringList.value = res.rows;
}
});
}
function waringConfirm(item: any) {
//
ElMessageBox.confirm('是否确认?', '提示', {
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning',
}).then(() => {
const params = item.id;
process(params).then((res: any) => {
if (res.code === 200) {
waringList.value = res.data;
// waringDrawer.value = false
// waringModal.value = false
getwaringList()
ElMessage({
message: res.msg,
type: 'success',
})
}
});
}).catch(() => { })
}
function warClose() {
//
waringModal.value = false
}
</script>
<style lang="scss" scoped>
@ -235,13 +337,4 @@ function getWeatherData() {
margin-left: 10px;
}
}
.n-drawer-container {
color: red;
.waringDrawer {
background: #0f2856;
backdrop-filter: blur(10px);
overflow: hidden;
}
}
</style>

28
src/views/monitoring/components/menu.vue

@ -5,6 +5,7 @@
</template>
<script lang="ts" setup>
import { useRoute } from "vue-router";
import type { MenuOption } from 'naive-ui';
// import { NEllipsis } from 'naive-ui';
import { getMenu } from '@/api/table/list';
@ -12,9 +13,15 @@ import { getMenuData } from '@/api/device/index';
import { getFirstNodeLastLevel } from '@/utils/index';
import useStorage from '@/utils/useStorage'
import mitt from '@/plugins/bus';
const router = useRoute()
const menuOptions = ref([]);
const selectedKey = ref();
const sessionStorageIns = useStorage('sessionStorage');
const routerType = ref('')
const id = ref(0)
const deptId = ref(0)
const menuDeptKey = ref(0)
const menuIdKey = ref(0)
const emit = defineEmits(['tableMenuData']);
@ -26,6 +33,9 @@ const props = defineProps({
});
onMounted(() => {
routerType.value = router.query?.id === undefined ? "0" : "1"
id.value = sessionStorage.getItem('id') === null ? 0 : Number(sessionStorage.getItem('id'))
deptId.value = sessionStorage.getItem('deptId') === null ? 0 : Number(sessionStorage.getItem('deptId'))
if (props.menuType === '1') {
menuApi();
} else if (props.menuType === '2') {
@ -37,12 +47,12 @@ function menuApi() {
//
getMenu().then((res: any) => {
if (res.code === 200) {
const key = getFirstNodeLastLevel(res.data).deptId
menuDeptKey.value = routerType.value === '1' ? deptId.value : getFirstNodeLastLevel(res.data).deptId
removeChildren(res.data);
menuOptions.value = res.data;
selectedKey.value = key;
sessionStorageIns.setUseStorage('deptId', key);
mitt.emit(props.menuType === '1' ? 'menuKey' : 'deviceMenuKey', key);
selectedKey.value = menuDeptKey.value;
sessionStorageIns.setUseStorage('deptId', menuDeptKey.value);
mitt.emit(props.menuType === '1' ? 'menuKey' : 'deviceMenuKey', menuDeptKey.value);
emit('tableMenuData', res.data);
}
});
@ -51,12 +61,12 @@ function comMenuApi() {
//
getMenuData().then((res: any) => {
if (res.code === 200) {
const key = getFirstNodeLastLevel(res.data).deptId
menuIdKey.value = routerType.value === '1' ? id.value : getFirstNodeLastLevel(res.data).deptId
removeChildren(res.data);
menuOptions.value = res.data;
selectedKey.value = key;
sessionStorageIns.setUseStorage('deptId', key);
mitt.emit(props.menuType === '1' ? 'menuKey' : 'deviceMenuKey', key);
selectedKey.value = menuIdKey.value;
sessionStorageIns.setUseStorage('deptId', routerType.value === '1' ? deptId.value : menuIdKey.value);
mitt.emit(props.menuType === '1' ? 'menuKey' : 'deviceMenuKey', menuIdKey.value);
emit('tableMenuData', res.data);
}
});
@ -84,7 +94,7 @@ function renderMenuLabel(option: MenuOption) {
function menuUpdateValue(key: string, item: MenuOption) {
//
sessionStorageIns.setUseStorage('deptId', key);
sessionStorageIns.setUseStorage(props.menuType === '1' ? 'deptId' : 'id', key);
mitt.emit(props.menuType === '1' ? 'menuKey' : 'deviceMenuKey', key);
console.log(key, item);
}

2
src/views/monitoring/devicemanage/components/menu.vue

@ -58,7 +58,7 @@ function renderMenuLabel(option: MenuOption) {
function menuUpdateValue(key: string, item: MenuOption) {
//
sessionStorageIns.setUseStorage('deptId', key);
sessionStorageIns.setUseStorage('id', key);
mitt.emit('deviceMenuKey', key);
console.log(key, item);
}

30
src/views/monitoring/screen/components/main.vue

@ -67,6 +67,9 @@ import { TableVo } from '@/api/table/types';
import { tableStore } from '@/store/modules/table';
import mitt from '@/plugins/bus';
import socket from '@/utils/socket';
import useStorage from '@/utils/useStorage'
const sessionStorageIns = useStorage('sessionStorage');
// import { uniqueArrayObject } from '@/utils/index';
const tableStoreCounter = tableStore();
// import type { MenuOption } from 'naive-ui'
@ -76,10 +79,11 @@ const tableStoreCounter = tableStore();
const loadingShow = ref(false);
const editModal = ref(false);
const modalTitle = ref('');
const menuKey = ref('');
const menuKey = ref(0);
const tableColumn = ref([]);
const tableData = ref<TableVo[]>();
const tableRef = ref<VxeGridInstance<TableVo>>();
// const waringArrow = ref([])
interface FormDataVO {
url: string;
@ -112,6 +116,7 @@ const formRules = ref<VxeFormPropTypes.Rules>({
const userStorageInfo = sessionStorage.getItem('userInfo')
const userInfo = JSON.parse(userStorageInfo === null ? '' : userStorageInfo);
// const loginIp = userInfo.loginIp.split('.').join('');
// const baseApi = "http://172.1.2.106:9000"//websocket
const baseApi = "http://10.10.10.56:9000"//websocket
// const baseApi = import.meta.env.VITE_APP_BASE_API
const apiUrl = baseApi.replace(/https?:/, '');
@ -189,16 +194,22 @@ mitt.on('treeData', (res: any) => {
mitt.on('tableMessage', (res: any) => {
//
console.log(res);
console.log(res.data);
const $table = tableRef.value;
const index = tableData.value.findIndex((obj) => obj.id === res.id);
if ($table) {
console.log("tableRef--", tableRef.value)
// if (res.code === 'datareal') {
const index = tableData.value.findIndex((obj) => obj.id === res.data.id);
if (index !== -1) {
tableData.value.splice(index, 1, res);
tableData.value.splice(index, 1, res.data);
}
// console.log("tableData:",tableData.value)
// tableStoreCounter.tableDataAction(res.data);
// tableData.value = oldData;
$table.loadData(tableData.value);
}
// } else if (res.code === 'alertDev') {
// waringArrow.value.push(res.data)
// waringArrow.value = uniqueArrayObject(waringArrow.value, "devUuid")
// }
// console.log("waringArrow:", waringArrow.value)
});
function stationInfo() {
@ -263,7 +274,7 @@ function tableHeader() {
// console.log('', gridOptions.value.columns);
emit('tableHeaderData', res.data);
// mitt.emit('tableHeaderData', res.data);
tableDatas();
// tableDatas();
});
}
@ -301,7 +312,7 @@ const formatRole: VxeColumnPropTypes.Formatter<HeaderVo> = ({ cellValue }) => {
//object
// const iconFont=cellValue.changeProp===-1?'<i class="iconfont icon-decline" />':(cellValue.changeProp===1?'<i class="iconfont icon-rise" />':'<i/>')
// const cellData = `<span class="cellClass ${cellValue.alertProp===1?'warning':''}">${cellValue.val}</span>${iconFont}`;
const cellData = `<span class="cellClass ${cellValue.alertProp === 1 ? 'warning' : ''}">${cellValue.val}</span><i class="iconfont ${cellValue.changeProp === -1 ? 'icon-decline' : (cellValue.changeProp === 1 ? 'icon-rise' : '')}" />`;
const cellData = `<span class="cellClass ${cellValue.alertProp === 1 ? 'warning' : ''}">${cellValue.val}</span><i class="iconfont ${cellValue.changeProp === -1 ? 'icon-decline' : (cellValue.changeProp === 1 ? 'icon-rise' : '')}" ></i>${cellValue.canBeControl === '1'?'<i class="iconfont icon-edit-icon"></i>':''}`;
return cellData;
};
@ -326,6 +337,7 @@ const submitEvent: VxeFormEvents.Submit = () => {
function nameClick(row: any) {
//
console.log(row)
sessionStorageIns.setUseStorage('id', row.id);
router.push({ path: '/devicemanage', query: { id: row.id } });
}

2
src/views/monitoring/screen/components/menu.vue

@ -58,7 +58,7 @@ function renderMenuLabel(option: MenuOption) {
function menuUpdateValue(key: string, item: MenuOption) {
//
sessionStorageIns.setUseStorage('deptId', key);
sessionStorageIns.setUseStorage('id', key);
mitt.emit('menuKey', key);
console.log(key, item);
}

7
src/views/monitoring/screen/index.scss

@ -386,6 +386,11 @@
.iconfont.icon-decline {
color: red;
}
.iconfont.icon-edit-icon {
font-size: 16px;
margin-left: 5px;
}
}
}
}
@ -432,7 +437,7 @@
}
.vxe-table--fixed-left-wrapper.scrolling--middle {
background: -webkit-linear-gradient(top, #020e38 0%, #04195b 100%);
background: -webkit-linear-gradient(top, #000825 0%, #000c2b 100%);
box-shadow: inset 0px 0px 10px rgb(36, 90, 124) !important;
}
}

2
src/views/monitoring/screen/index.vue

@ -1,7 +1,7 @@
<template>
<div ref="screenRef" class="screen">
<section ref="titleRef" class="header">
<Header :titleData="titleData" :settingShow="true" :warningShow="false" @showModalClick="showModalClick" @returnClick="returnClick" />
<Header :titleData="titleData" :settingShow="true" :warningShow="true" @showModalClick="showModalClick" @returnClick="returnClick" />
<!-- <div class="title">
<h3>{{ titleData }}</h3>
</div>

2
vite.config.ts

@ -45,7 +45,7 @@ export default defineConfig(({ mode }: ConfigEnv): UserConfig => {
hmr: true,//配置HMR
proxy: {
[env.VITE_APP_BASE_API]: {
// target: 'http://172.1.2.157:9000/',//本地接口地址
// target: 'http://172.1.2.106:9000/',//本地接口地址
// target: 'http://172.1.2.48:9000/',//本地接口地址
target: 'http://10.10.10.56:9000/',//线上接口地址
changeOrigin: true,

Loading…
Cancel
Save