zmc
2023-09-05 c2f95b0b9090a2394b5b068582b932a5e57b86aa
src/views/exception/FlightInspection.vue
@@ -12,12 +12,12 @@
const DustLineChart = defineAsyncComponent(() =>
  import('./components/DustLineChart.vue')
);
import exceptionApi from '@/api/exceptionApi.js';
import dayjs from 'dayjs';
export default {
  components: {
    ExceptionType,
    InputSearch,
    // InputSearch,
    TimeSelectWithShortCuts,
    DustExceptionText,
    DustLineChart,
@@ -42,15 +42,17 @@
      displayData: [],
      // 表格高度
      tableHeight: 400,
      // 表格数据
      // 表格显示
      isTableShow:false,
      // 当前页
      currentPage: 1,
      // 每页条数
      pageSize: 20,
      // 表格的总记录数
      total: 0,
  
      // 表格查询无数据时
      isNoData: false,
      // isNoData: false,
      // 对话框显示
      dialogTableVisible: false,
      // 保存异常对应的店铺名称和设备编号
@@ -86,8 +88,6 @@
      // 站点总数量
      siteTotal: 0,
      // 异常的站点总数量
      // exceptionSiteNum:0,
      // 选中表格当前行的数据
      tableCurrentRowData: null,
@@ -129,8 +129,9 @@
        banTouch:0,
        // 0代表分页,1代表不分页
        originClick:0
      }
      },
      // 条件查询对话框
      conditionDialogVisible:false
    };
  },
  setup() {
@@ -185,10 +186,17 @@
    this.backExceptionDataAWeekAgo();
    // 查询时间段的各异常的站点,查询该时间区间的各异常数量
    this.getShopNames();
    this.getSiteNume()
  },
  methods: {
   // 放回站点总数量
    getSiteNume(){
      exceptionApi.getSitesNum().then(res => {
      this.siteTotal = res.data.data.length
    })
    },
    /**
     * description:点击异常站点名字时 返回的数据
@@ -1098,15 +1106,18 @@
          this.displayData = response.data.data.rows;
          this.loading.queryButton = false
          this.loading.tableLoading = false;
          if (response.data.data.total == 0) {
            ElMessage('该时段无数据');
            this.isNoData = true;
            this.isTableShow = false
            return;
          }
          this.isTableShow = true
          this.total = response.data.data.total;
          // 移除空数据状态
          this.isNoData = false;
        });
      this.conditionDialogVisible = false
    },
    /**
@@ -1134,9 +1145,10 @@
          if (response.data.data.total == 0) {
            ElMessage('该时段无数据');
            this.isNoData = true;
            this.isTableShow = false
            return;
          }
          this.isTableShow = true
          this.total = response.data.data.total;
          this.loading.tableLoading = false;
        });
@@ -1205,7 +1217,16 @@
</script>
<template>
 <el-button type="primary" @click="conditionDialogVisible = true">
    搜索条件
  </el-button>
 
  <el-dialog
    v-model="conditionDialogVisible"
    title="Tips"
    width="30%"
    class="condition-dialog"
  >
  <el-row ref="h1">
    <el-col>
      <el-form :inline="true">
@@ -1213,13 +1234,18 @@
          <el-form-item >
          <AreaAndmonitorType ></AreaAndmonitorType>
          </el-form-item>
          <el-form-item>
          <!-- <el-form-item>
            <InputSearch
              isNeedDefaultSite="0"
              @submit-value="(n) => (form.name = n)"
              @submit-site-Nums="(n) => (siteTotal = n)"
            >
            </InputSearch>
          </el-form-item> -->
          <el-form-item>
            <TimeSelectWithShortCuts timeType="day" @submit-time="giveTime" ></TimeSelectWithShortCuts>
          </el-form-item>
          <el-form-item>
@@ -1228,9 +1254,7 @@
            ></ExceptionType>
          </el-form-item>
          <el-form-item>
            <TimeSelectWithShortCuts @submit-time="giveTime"></TimeSelectWithShortCuts>
          </el-form-item>
        </div>
        <div class="head-container-search">
@@ -1242,6 +1266,24 @@
      </el-form>
    </el-col>
  </el-row>
<!--
    <template #footer>
      <span class="dialog-footer">
        <el-button @click="dialogVisible = false">Cancel</el-button>
        <el-button type="primary" @click="dialogVisible = false">
          Confirm
        </el-button>
      </span>
    </template> -->
  </el-dialog>
  <el-row class="head-describtion-text" ref="h2">
    <el-row>
@@ -1859,8 +1901,8 @@
    </el-col>
  </el-row>
  <el-row>
    <el-col v-show="!isNoData">
  <el-row v-show="isTableShow">
    <el-col >
      <el-table
        ref="table"
        :data="displayData"
@@ -1954,7 +1996,6 @@
    </el-col>
  </el-row>
  <el-empty v-show="isNoData" :image-size="200" />
  <el-dialog v-model="dialogTableVisible" draggable align-center height="300px">
    <!-- 头 -->
@@ -2097,9 +2138,19 @@
</template>
<style lang="scss" scoped>
.el-row {
  margin-left: 10px;
}
/* 下拉菜单开始 */
.example-showcase .el-dropdown-link {
  cursor: pointer;
  color: var(--el-color-primary);
  display: flex;
  align-items: center;
}
/* 下拉菜单结束 */
/* 条件查询模块的样式 */
.head-container-search {