zhouwx
2025-02-19 0dd37d509b9f62a0bc313fbeccd3ca5c7cd36e55
特性、分类信息等修改
已修改2个文件
已添加1个文件
180 ■■■■■ 文件已修改
src/layout/components/Sidebar/menu.js 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/router/index.js 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/hazardousChemicals/avoidWarning/index.vue 157 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/layout/components/Sidebar/menu.js
@@ -130,6 +130,11 @@
            meta: { title: '超期预警',icon: 'peoples',affix: true }
        },
        {
            path: '/avoidWarning',
            name: 'avoidWarning',
            meta: { title: '危化品相忌报警',icon: 'form',affix: true }
        },
        {
            path: '/basicInfo',
            name: 'basicInfo',
            meta: { title: '危化品基础信息',icon: 'monitor',affix: true }
@@ -212,6 +217,11 @@
            meta: { title: '超期预警',icon: 'peoples',affix: true }
        },
        {
            path: '/avoidWarning',
            name: 'avoidWarning',
            meta: { title: '危化品相忌报警',icon: 'form',affix: true }
        },
        {
            path: '/basicInfo',
            name: 'basicInfo',
            meta: { title: '危化品基础信息',icon: 'monitor',affix: true }
src/router/index.js
@@ -183,6 +183,19 @@
    ]
  },
  {
    path: '/avoidWarning',
    component: Layout,
    redirect: '/avoidWarning',
    children: [
      {
        path: '/avoidWarning',
        component: () => import('@/views/hazardousChemicals/avoidWarning/index.vue'),
        name: 'avoidWarning',
        meta: { title: '危化品相忌报警',icon: 'form',  affix: true }
      }
    ]
  },
  {
    path: '/basicInfo',
    component: Layout,
    redirect: '/basicInfo',
src/views/hazardousChemicals/avoidWarning/index.vue
对比新文件
@@ -0,0 +1,157 @@
<template>
  <div class="app-container">
<!--    卡片部分-->
    <div style="margin-bottom: 10px;display: flex;align-items: center;justify-content: space-between">
      <div style="font-weight: 600;font-size: 22px">实时报警状态</div>
      <div style="display: flex;align-items: center">
        <div class="card-item-red title-font">
          <el-icon><WarnTriangleFilled /></el-icon>
          高危报警
        </div>
        <div class="card-item-yellow title-font">
          <el-icon><WarningFilled /></el-icon>
          中等风险
        </div>
      </div>
    </div>
    <el-scrollbar max-height="420px" style="padding-right: 10px;overflow-x: hidden;">
      <el-row :gutter="20" style="margin-top: 5px;margin-left: 5px">
        <el-col v-for="(item,index) in state.dataList" :key="index" :span="8">
          <el-card class="card-item " :class= "item.level == 1 ? 'card-item-red' : 'card-item-yellow' "  shadow="always">{{ item.name }}</el-card>
        </el-col>
      </el-row>
    </el-scrollbar>
<!--    表格部分-->
    <div style="font-weight: 600;font-size: 22px;margin-top: 25px">最近报警记录</div>
    <div style="margin-top: 10px">
      <el-table v-loading="loading" :data="state.tableList" :border="true">
        <el-table-column label="序号" type="index" align="center" width="80" />
        <el-table-column label="时间" prop="name" align="center"  />
        <el-table-column label="相忌试剂" prop="remark" align="center" />
        <el-table-column label="储存位置" prop="remark" align="center" />
        <el-table-column label="风险等级" prop="remark" align="center" />
        <el-table-column label="处理状态" prop="remark" align="center" />
        <el-table-column label="处理人" prop="remark" align="center" />
      </el-table>
      <pagination
          v-show="total > 0"
          :total="total"
          v-model:page="queryParams.pageNum"
          v-model:limit="queryParams.pageSize"
          @pagination="getList"
      />
    </div>
  </div>
</template>
<script setup>
import {reactive, ref, toRefs} from "vue";
import {getWarehouse} from "@/api/hazardousChemicals/warehouse";
import {ElMessage} from "element-plus";
const state = reactive({
  queryParams: {
    pageNum: 1,
    pageSize: 5,
    name: ''
  },
  total: 0,
  dataList: [
    {
      id: 1,
      name: '硫酸与氢氧化钠',
      address: 'S区-1号柜',
      level: 1, //1-低危 2-中危 3-高危
    },
    {
      id: 1,
      name: '硫酸与氢氧化钠',
      address: 'S区-1号柜',
      level: 2, //1-低危 2-中危 3-高危
    },
    {
      id: 1,
      name: '硫酸与氢氧化钠',
      address: 'S区-1号柜',
      level: 1, //1-低危 2-中危 3-高危
    },
    {
      id: 1,
      name: '硫酸与氢氧化钠',
      address: 'S区-1号柜',
      level: 1, //1-低危 2-中危 3-高危
    },
    {
      id: 1,
      name: '硫酸与氢氧化钠',
      address: 'S区-1号柜',
      level: 2, //1-低危 2-中危 3-高危
    },
    {
      id: 1,
      name: '硫酸与氢氧化钠',
      address: 'S区-1号柜',
      level: 1, //1-低危 2-中危 3-高危
    },
    {
      id: 1,
      name: '硫酸与氢氧化钠',
      address: 'S区-1号柜',
      level: 2, //1-低危 2-中危 3-高危
    },
  ],
  tableList: []
});
const { queryParams, total, dataList } = toRefs(state);
const loading = ref(false);
const getList = async () => {
  loading.value = true
  // const res = await getWarehouse(data.queryParams)
  // if(res.code == 200){
  //   data.dataList = res.data.list
  //   data.total = res.data.total
  // }else{
  //   ElMessage.warning(res.message)
  // }
  loading.value = false
}
</script>
<style scoped lang="scss">
.app-container{
  .card-item{
    height: 180px;
    margin-bottom: 10px;
  }
  .title-font{
    display:flex;
    align-items: center;
    padding: 3px 15px;
    font-size: 14px;
    margin-right: 10px;
    border-radius: 5px
  }
  .card-item-red{
    color: #f56c6c;
    background-color: rgb(254, 240.3, 240.3);
    border: 1px solid rgb(253, 225.6, 225.6);
  }
  .card-item-yellow{
    color: #e6a23c;
    background-color: rgb(252.5, 245.7, 235.5);
    border: 1px solid rgb(250, 236.4, 216);
  }
  :deep(.is-horizontal) {
    height: 0;
    left: 0;
    display: none;
  }
  :deep(.el-scrollbar__wrap) {
    overflow-x: hidden;
  }
}
</style>