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"/>
@@ -146,6 +146,7 @@
      </el-table-column>
      <el-table-column label="电子文件" prop="url" width="160" >
           <template slot-scope="scope" >
             <div  @click="handleCheck(scope.row)">
             <img
               class="el-upload-list__item-thumbnail"
               src="../../assets/images/deviceLis.png"
@@ -161,7 +162,7 @@
               style="width: 35px; height: 35px;"
               fit="cover"
                v-if="scope.row.url === null"
             >
      ></div>
           </template>
        </el-table-column>
      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
@@ -432,7 +433,10 @@
      this.open = false;
      this.reset();
    },
    getRowId(row)
    {
      return row.id
    },
    //隔行变色
    tableRowClassName({ row, rowIndex }) {
      if (rowIndex % 2 == 0) {
@@ -612,8 +616,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 +640,7 @@
    var formData = new FormData();
    formData.append('excelImport', file);
    let _this = this
    alert(file)
    enload(formData).then(response => {
       _this.getList();
      Message({ message: "导入成功", type: 'warning' })