feige
2023-05-17 4efd39b4696db81789d3d92a54d197f1e85ecdf2
ruoyi-ui/src/views/clean/index.vue
@@ -93,7 +93,7 @@
              plain
              icon="el-icon-download"
              size="mini"
              @click="handleExport"
              @click="handleExportTemplate"
              v-hasPermi="['family:note:export']"
            >导入模板下载</el-button>
          </el-col>
@@ -114,14 +114,15 @@
        <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
      </el-row>
  
      <el-table v-loading="loading" :data="cleanList" @selection-change="handleSelectionChange" :row-class-name="tableRowClassName">
        <el-table-column type="selection" width="55"  align="center" />
      <el-table v-loading="loading" :data="cleanList" :row-key="getRowId" ref="multipleTable" @selection-change="handleSelectionChange" :row-class-name="tableRowClassName">
        <el-table-column type="selection" :reserve-selection="true"  width="55"  align="center" />
        <el-table-column  label="序号" sortable type="index" :index="(queryParams.pageNum-1)*queryParams.pageSize+1" width="80"/>
        <el-table-column label="类型" prop="kind" sortable width="120" >
          <template slot-scope="scope">
          {{ getSrc1(scope.row.kind) }}
           </template>
          </el-table-column>
        <el-table-column  label="序号" sortable type="index" :index="(queryParams.pageNum-1)*queryParams.pageSize+1" width="120"/>
        <el-table-column label="适用人" prop="suitable" sortable :show-overflow-tooltip="true" width="150" />
        <el-table-column label="类别" prop="type" sortable width="100" />
        <el-table-column label="保洁方法" prop="method" sortable width="100" />
@@ -445,7 +446,10 @@
        this.open = false;
        this.reset();
      },
    getRowId(row)
    {
      return row.id
    },
      //隔行变色
      tableRowClassName({ row, rowIndex }) {
        if (rowIndex % 2 == 0) {
@@ -637,10 +641,25 @@
      },
      /** 导出按钮操作 */
      handleExport() {
        this.download('/zfEconomy/export', {
        const Ids = this.ids;
        if(Ids.length==0)
        {
        this.download('/zfClean/export', {
          ...this.queryParams
        }, `clean_${new Date().getTime()}.xlsx`)
        }else{
          this.download('/zfClean/export1/'+Ids, {
          }, `clean_${new Date().getTime()}.xlsx`)
        }
      },
      handleExportTemplate() {
        this.download('/zfClean/model', {
        }, `clean_${new Date().getTime()}.xlsx`)
      },
      /** 导入操作*/
      handleEnport(params){
      var file = params.file;
@@ -671,4 +690,3 @@
  
  }
  </style>