fuliqi
2024-03-18 be6a3cc7a91c7258ebb593627fb5d8d6a060979f
src/views/system/car/index.vue
@@ -1,5 +1,39 @@
<template>
  <div class="app-container">
    <el-card class="box-card" >
      <el-row type="flex" align="middle" justify="space-between">
        <el-col :xl="8" :lg="8" :md="10" :sm="8" :xs="6">
          <div class="icon-container" style="background-color: #5599F7">
            <i class="el-icon-truck"></i>
          </div>
        </el-col>
        <el-col :xl="14" :lg="14" :md="12" :sm="14" :xs="16">
          <div class="dashboard">
            <div class="dashboard-item">
              <h3 style="color: #5C9BF8">{{ totalPosts }}</h3>
              <p>设备总数</p >
            </div>
            <div class="dashboard-item">
              <h3 style="color: #3eba45">{{ totalMembers }}</h3>
              <p>正常数</p >
            </div>
            <div class="dashboard-item">
              <h3 style="color: #fe640d">{{ postsPercentage }}</h3>
              <p>异常数</p >
            </div>
            <div class="dashboard-item">
              <h3 style="color: #7868d9">{{ totalViews }}</h3>
              <p>生成异常工单数</p >
            </div>
            <div class="dashboard-item">
              <h3>{{ viewsPercentage }}%</h3>
              <p>设备运行率</p >
            </div>
          </div>
        </el-col>
      </el-row>
    </el-card>
    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
      <el-form-item label="设备名称" prop="name">
        <el-input
@@ -24,30 +58,7 @@
        />
        </el-select>
      </el-form-item>
      <el-form-item label="地址" prop="address">
        <el-input
          v-model="queryParams.address"
          placeholder="请输入行政区域"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="安装时间" prop="installedTime">
        <el-date-picker clearable
          v-model="queryParams.installedTime"
          type="date"
          value-format="yyyy-MM-dd"
          placeholder="请选择安装时间">
        </el-date-picker>
      </el-form-item>
      <el-form-item label="管理单位" prop="managementUnit">
        <el-input
          v-model="queryParams.managementUnit"
          placeholder="请输入管理单位"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
       <el-form-item label="是否生成异常工单" prop="defaultOrder" label-width="130px">
         <el-select
           v-model="queryParams.defaultOrder"
@@ -169,6 +180,12 @@
  dicts: ['sys_normal_disable','platform_yes_no','camera_state'],
  data() {
    return {
      totalPosts: 1156,
      totalMembers: 1000,
      postsPercentage: 156,
      totalViews: 75,
      viewsPercentage: 91.36,
      totalErrors: 0,
      // 遮罩层
      loading: true,
      // 选中数组
@@ -327,3 +344,37 @@
  }
};
</script>
<style lang="scss" scoped>
.box-card {
  background-color: #F5F9FE;
  width: 100%;
  margin-bottom: 20px;
  height: 120px
}
.icon-container {
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 20px;
  width: 20%;
  height: 80px;
  margin-left: 5%;
}
.el-icon-truck {
  font-size: 50px;
  color: #FFFFFF;
}
.dashboard {
  display: flex;
  gap: 10%;
  align-items: center;
  margin-left: -50%;
}
.dashboard-item {
  text-align: center;
}
</style>