feige
2023-05-17 4efd39b4696db81789d3d92a54d197f1e85ecdf2
ruoyi-ui/src/views/note/index.vue
@@ -106,7 +106,7 @@
          plain
          icon="el-icon-download"
          size="mini"
          @click="handleExport"
          @click="handleExportTemplate"
          v-hasPermi="['family:note:export']"
        >导入模板下载</el-button>
      </el-col>
@@ -127,8 +127,8 @@
      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
    </el-row>
    <el-table v-loading="loading" :data="propertyList" @selection-change="handleSelectionChange" :row-class-name="tableRowClassName">
      <el-table-column type="selection" width="55"  align="center" />
    <el-table v-loading="loading" :data="propertyList" :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="120"/>
@@ -432,7 +432,10 @@
      this.open = false;
      this.reset();
    },
    getRowId(row)
    {
      return row.id
    },
    //隔行变色
    tableRowClassName({ row, rowIndex }) {
      if (rowIndex % 2 == 0) {
@@ -612,8 +615,22 @@
    },
    /** 导出按钮操作 */
    handleExport() {
      const Ids = this.ids;
      if(Ids.length==0)
      {
      this.download('family/property/export', {
        ...this.queryParams
      }, `property_${new Date().getTime()}.xlsx`)
      }else{
        this.download('family/property/export1/'+Ids, {
          ...this.queryParams
        }, `property_${new Date().getTime()}.xlsx`)
      }
    },
    handleExportTemplate(){
      this.download('family/property/model', {
      }, `property_${new Date().getTime()}.xlsx`)
    },
    /** 导入操作*/
@@ -622,7 +639,7 @@
    var formData = new FormData();
    formData.append('excelImport', file);
    let _this = this
    alert(file)
    enload(formData).then(response => {
       _this.getList();
      Message({ message: "导入成功", type: 'warning' })