Browse Source

排序修改

develop
fuguobin 1 year ago
parent
commit
ef2cd8fec3
  1. BIN
      src/assets/images/device02.jpg
  2. BIN
      src/assets/images/device03.jpg
  3. 1
      src/styles/index.scss
  4. 11
      src/views/monitoring/components/header.vue
  5. 7
      src/views/monitoring/screen/components/main.vue
  6. 18
      src/views/monitoring/screen/components/showTree.vue
  7. 4
      vite.config.ts

BIN
src/assets/images/device02.jpg

Binary file not shown.

Before

Width:  |  Height:  |  Size: 713 KiB

BIN
src/assets/images/device03.jpg

Binary file not shown.

Before

Width:  |  Height:  |  Size: 815 KiB

1
src/styles/index.scss

@ -114,6 +114,7 @@
padding: 80px;
.waringTable {
--el-table-border-color:none;
background-color: transparent;
border: 1px solid #053872;

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

@ -82,9 +82,16 @@
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="alertName" label="告警级别" align="center">
<template #default="scope">
<span class="level">{{ scope.row.alertName }}</span>
</template>
</el-table-column>
<el-table-column prop="totalCounts" label="告警累计" align="center" />
<el-table-column prop="alertFirstTime" label="首次告警时间" align="center" />
<el-table-column label="报警时间" align="center">
<el-table-column prop="alertFirstTime" label="首次告警时间" align="center" />
<el-table-column prop="alertLastTime" label="末次告警时间" align="center" />
</el-table-column>
<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>

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

@ -247,11 +247,12 @@ function tableHeader() {
//
const tableCessText = [
{
id: 1,
title: '设备名称',
field: 'deviceuuid',
id: 0,
title: 'ID',
field: 'id',
type: 'html',
formatter: formatRole,
visible:false
},
];
console.log(tableCessText)

18
src/views/monitoring/screen/components/showTree.vue

@ -21,11 +21,11 @@
</template>
<script lang="ts" setup>
import { getCurrentInstance } from 'vue';
import { getCurrentInstance,ComponentInternalInstance } from 'vue';
import mitt from '@/plugins/bus';
const { proxy } = getCurrentInstance();
const { proxy } = getCurrentInstance() as ComponentInternalInstance
const defaultCheckedKeys = ref([]); //
const checkList = ref([]); //
const checkList = ref<TreeVo[]>([]); //
interface TreeVo {
id?: number;
@ -33,7 +33,7 @@ interface TreeVo {
colType: string;
field: string;
fixed?: string;
show: boolean;
visible: boolean;
title: string;
width: number;
controlValue?: number;
@ -51,9 +51,9 @@ const props: any = defineProps({
onMounted(() => {
treeData.value = props.headerData;
const checkData = [];
const checkData:any = [];
props.headerData.map((item: TreeVo) => {
if (item.show) {
if (item.visible) {
checkData.push(item.id);
checkList.value.push(item);
if (item.children && item.children.length) {
@ -255,7 +255,7 @@ const defaultProps = {
// },
// ];
function allowDrop(draggingNode, dropNode, type) {
function allowDrop(draggingNode:any, dropNode:any, type:any) {
//
if (type !== 'inner') {
let control = draggingNode.level === dropNode.level ? true : false;
@ -266,14 +266,14 @@ function allowDrop(draggingNode, dropNode, type) {
const treeCheckChange = (data: TreeVo, checked: boolean, indeterminate: boolean) => {
//
console.log(data, checked, indeterminate);
data.show = checked;
data.visible = checked;
console.log(treeData.value);
};
const nodeDrop = () => {
//
nextTick(() => {
proxy.$refs.tree.setCheckedKeys(defaultCheckedKeys.value);
proxy?.$refs.tree.setCheckedKeys(defaultCheckedKeys.value);
});
};

4
vite.config.ts

@ -45,9 +45,9 @@ export default defineConfig(({ mode }: ConfigEnv): UserConfig => {
hmr: true,//配置HMR
proxy: {
[env.VITE_APP_BASE_API]: {
// target: 'http://172.1.2.106:9000/',//本地接口地址
target: 'http://172.1.2.106:9000/',//本地接口地址
// target: 'http://172.1.2.48:9000/',//本地接口地址
target: 'http://board.heatiot.cn:8001/prod-api/',//线上接口地址
// target: 'http://board.heatiot.cn:8001/prod-api/',//线上接口地址
changeOrigin: true,
rewrite: path =>
path.replace(new RegExp('^' + env.VITE_APP_BASE_API), '')

Loading…
Cancel
Save