feige
2023-05-17 4efd39b4696db81789d3d92a54d197f1e85ecdf2
ruoyi-ui/src/views/economy/index.vue
@@ -86,7 +86,7 @@
          plain
          icon="el-icon-download"
          size="mini"
          @click="handleExport"
          @click="handleExportTemplate"
          v-hasPermi="['family:note:export']"
        >导入模板下载</el-button>
      </el-col>
@@ -107,8 +107,8 @@
    </el-row>
    <!-- 序号、基金/台账、时间、收入/支出、用途、使用人、现金/自动扣划、余额、电子文件、备注 操作-->
    <!-- 这里有个familyList数组 是在data()中定义的 -->
    <el-table v-loading="loading" :data="economyList"  @selection-change="handleSelectionChange" @row-click="handleCheck" :row-class-name="tableRowClassName" style="background: #FFEFF2;  border-radius: 14px 14px 14px 14px;">
      <el-table-column type="selection" width="55"  align="center" />
    <el-table v-loading="loading" :data="economyList"  :row-key="getRowId" ref="multipleTable" @selection-change="handleSelectionChange" @row-click="handleCheck" :row-class-name="tableRowClassName" style="background: #FFEFF2;  border-radius: 14px 14px 14px 14px;">
      <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"/>
      <el-table-column label="基金/台账" prop="type" sortable width="120" >
        <template slot-scope="scope">
@@ -118,7 +118,6 @@
      <el-table-column label="发生时间" prop="createTime" sortable width="100" align="center">
        <template slot-scope="scope">{{scope.row.createTime? scope.row.createTime: '————'}}</template>
      </el-table-column>
      <el-table-column label="台账" prop="type" sortable width="100" />
      <el-table-column label="收入/支出" prop="price" sortable width="100" />
      <el-table-column label="用途" prop="useFor" sortable width="100" />
@@ -129,6 +128,7 @@
        </template>
      </el-table-column>
      <el-table-column label="余额" prop="balance" sortable width="100" />
            <el-table-column label="备注" prop="remark" sortable width="100" />
      <el-table-column label="电子文件" prop="url" align="center" sortable  width="110" >
        <template slot-scope="scope" >
          <img
@@ -149,7 +149,7 @@
          >
        </template>
      </el-table-column>
      <el-table-column label="备注" prop="remark" 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">
          <el-button
@@ -522,6 +522,10 @@
      this.open = false;
      this.reset();
    },
    getRowId(row)
    {
      return row.id
    },
    // 取消按钮(数据权限)
    cancelDataScope() {
      this.openDataScope = false;
@@ -656,10 +660,24 @@
    },
    /** 导出按钮操作 */
    handleExport() {
      const Ids = this.ids;
      if(Ids.length==0)
      {
      this.download('/zfEconomy/export', {
        ...this.queryParams
      }, `zfEconomy_${new Date().getTime()}.xlsx`)
      }else
      {
        this.download('/zfEconomy/export1/'+Ids, {
        }, `zfEconomy_${new Date().getTime()}.xlsx`)
      }
    }
  ,
  handleExportTemplate(){
      this.download('/zfEconomy/model', {
      }, `zfEconomy_${new Date().getTime()}.xlsx`)
  },
  /** 导入操作*/
  handleEnport(params){
@@ -678,6 +696,7 @@
    }
  }
  }
};
</script>