linwenling
2023-04-11 25ddd158fa9be7784c5b513bd3f7f8290e372b7f
ruoyi-ui/src/views/device/index.vue
@@ -5,7 +5,7 @@
        <el-form-item label="时间">
          <el-date-picker
            v-model="dateRange"
            style="width: 240px"
          style="width: 240px;"
            value-format="yyyy-MM-dd HH-MM"
            type="daterange"
            range-separator="-"
@@ -43,8 +43,11 @@
            />
          </el-form-item>
        <el-form-item>
          <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
          <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
        <el-button  size="mini" @click="handleQuery" style=" width: 65px; height: 32px;background: #FFDDE3;
          border-radius: 6px 6px 6px 6px;opacity:1;">搜索</el-button>
        <el-button  size="mini" @click="resetQuery" style=" width: 65px;height: 32px; background: #FFDDE3;
          border-radius: 6px 6px 6px 6px;
          opacity: 1;">重置</el-button>
        </el-form-item>
      </el-form>
@@ -84,21 +87,23 @@
        <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
      </el-row>
      <!-- 序号、设备名称、时间、购买人、事项内容、存放地点、电子文件、备注 操作-->
      <!-- 这里有个equipmentList数组 是在data()中定义的 -->
      <el-table v-loading="loading" :data="equipmentList" @selection-change="handleSelectionChange">
    <!-- 这里有个familyList数组 是在data()中定义的 -->
    <el-table v-loading="loading" :data="equipmentList"  @selection-change="handleSelectionChange" :row-class-name="tableRowClassName" style="background: #FFEFF2;  border-radius: 14px 14px 14px 14px;">
        <el-table-column type="selection" width="55"  align="center" />
        <el-table-column label="序号" prop="id" sortable width="120" />
        <el-table-colun label="设备名称" prop="name" sortable width="180"/>
      <el-table-column label="设备名称" prop="name" sortable width="120" />
        <el-table-column label="时间" align="center" sortable prop="createDate" width="180">
          <template slot-scope="scope">
            <span>{{ parseTime(scope.row.createDate) }}</span>
          </template>
        </el-table-column>
        <el-table-column label="购买人" prop="buyer" sortable width="100" />
        <el-table-column label="事项内容" prop="content" sortable :show-overflow-tooltip="true" width="150" />
        <el-table-column label="存放地点" prop="location" sortable width="100" />
        <el-table-column label="备注" prop="remark" sortable width="100" />
        <!-- <el-table-colum label="电子文件" prop="fujian" sortable width="100"/> -->
      <el-table-column label="电子文件" prop="url" sortable width="180" />
        <el-table-column label="家庭号" prop="familyId" sortable width="100" />
        <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
          <template slot-scope="scope" v-if="scope.row.roleId !== 1">
@@ -130,6 +135,7 @@
        :page.sync="queryParams.pageNum"
        :limit.sync="queryParams.pageSize"
        @pagination="getList"
      style="background: #FEF7FC;"
      />
      <!-- 添加或修改资产信息配置对话框 -->
@@ -382,8 +388,18 @@
        this.reset();
      },
    //隔行变色
    tableRowClassName({ row, rowIndex }) {
      if (rowIndex % 2 == 0) {
        return "statistics-warning-row1";
      } else {
        return "statistics-warning-row";
      }
    },
      /** 查询角色列表 */
      //列表显示家大事记
      getList() {
        this.loading = true;
@@ -547,3 +563,13 @@
  };
  </script>
<style>
.el-table__row.statistics-warning-row {
  background: #E0EEFE;
}
.el-table__row.statistics-warning-row1 {
  background: #FFEFF2;
}
</style>