feige
2023-05-17 4efd39b4696db81789d3d92a54d197f1e85ecdf2
ruoyi-ui/src/views/contacts/index.vue
@@ -120,7 +120,7 @@
            plain
            icon="el-icon-download"
            size="mini"
            @click="handleExport"
            @click="handleExportTemplate"
            v-hasPermi="['family:note:export']"
          >导入模板下载</el-button>
        </el-col>
@@ -144,8 +144,8 @@
      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
    </el-row>
  </div>
    <el-table v-loading="loading" :data="contactList"  @selection-change="handleSelectionChange"  :row-class-name="tableRowClassName" style="background: #FFEFF2;  border-radius: 14px 14px 14px 14px;">
      <el-table-column type="selection" width="25"  align="center" />
    <el-table v-loading="loading" :data="contactList"  :row-key="getRowId" ref="multipleTable"  @selection-change="handleSelectionChange"  :row-class-name="tableRowClassName" style="background: #FFEFF2;  border-radius: 14px 14px 14px 14px;">
      <el-table-column type="selection" :reserve-selection="true" width="25"  align="center" />
      <el-table-column  label="序号" sortable type="index" :index="(queryParams.pageNum-1)*queryParams.pageSize+1" width="80"/>
      <el-table-column label="成员姓名" prop="myName" sortable width="100" >
@@ -549,7 +549,10 @@
      this.open = false;
      this.reset();
    },
    getRowId(row)
    {
      return row.id
    },
    //隔行变色
    tableRowClassName({ row, rowIndex }) {
      if (rowIndex % 2 == 0) {
@@ -734,9 +737,22 @@
    },
    /** 导出按钮操作 */
    handleExport() {
      const Ids = this.ids;
      if(Ids.length==0)
      {
      this.download('zfContact/export', {
        ...this.queryParams
      }, `zfContact_${new Date().getTime()}.xlsx`)
      }else{
        this.download('zfContact/export1/'+Ids, {
        }, `zfContact_${new Date().getTime()}.xlsx`)
      }
    },
    handleExportTemplate(){
      this.download('zfContact/model', {
        ...this.queryParams
      }, `zfContact_${new Date().getTime()}.xlsx`)
    },
    /** 导入操作*/
    handleEnport(params){