feige
2023-05-17 4efd39b4696db81789d3d92a54d197f1e85ecdf2
ruoyi-ui/src/views/collection/index.vue
@@ -196,8 +196,8 @@
        <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
      </el-row>
    </div>
    <el-table v-loading="loading" :data="collectionList" @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="collectionList" :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="60"/>
      <el-table-column label="获得时间" prop="happenTime" sortable width="100" align="center">
        <template slot-scope="scope">{{scope.row.happenTime? scope.row.happenTime: '————'}}</template>
@@ -214,7 +214,7 @@
      <el-table-column label="来源" prop="source" sortable width="90" align="center" >
        <template slot-scope="scope">{{scope.row.source? scope.row.source: '————'}}</template>
      </el-table-column>
      <el-table-column label="持有者" prop="owner" sortable width="110" align="center">
      <el-table-column label="拥有者" prop="owner" sortable width="110" align="center">
        <template slot-scope="scope">{{scope.row.owner? scope.row.owner: '————'}}</template>
      </el-table-column>
      <el-table-column label="价值" prop="price" sortable width="90" align="center">
@@ -223,7 +223,10 @@
      <el-table-column label="存放位置" prop="location" sortable width="130" align="center">
        <template slot-scope="scope">{{scope.row.location? scope.row.location: '————'}}</template>
      </el-table-column>
      <el-table-column label="电子文件" prop="url" width="80" >
      <el-table-column label="备注" prop="remark" sortable width="90" align="center">
        <template slot-scope="scope">{{scope.row.remark? scope.row.remark: '————'}}</template>
      </el-table-column>
      <el-table-column label="电子文件" prop="url" width="180" >
        <template slot-scope="scope" >
          <img
            class="el-upload-list__item-thumbnail"
@@ -244,9 +247,7 @@
        </template>
      </el-table-column>
      <el-table-column label="备注" prop="remark" sortable width="90" align="center">
        <template slot-scope="scope">{{scope.row.remark? scope.row.remark: '————'}}</template>
      </el-table-column>
      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" >
        <template slot-scope="scope" v-if="scope.row.roleId !== 1">
          <el-button
@@ -307,8 +308,8 @@
          <el-input v-model="formDat.source" placeholder="请输入来源" clearable :style="{width: '100%'}" >
          </el-input>
        </el-form-item>
        <el-form-item label="持有者" prop="owner">
          <el-input v-model="formDat.owner" placeholder="请输入持有者" clearable :style="{width: '100%'}" >
        <el-form-item label="拥有者" prop="owner">
          <el-input v-model="formDat.owner" placeholder="请输入拥有者" clearable :style="{width: '100%'}" >
          </el-input>
        </el-form-item>
        <el-form-item label="价格" prop="price">
@@ -567,7 +568,10 @@
      this.open = false;
      this.reset();
    },
    getRowId(row)
    {
      return row.id
    },
    //隔行变色
    tableRowClassName({ row, rowIndex }) {
      if (rowIndex % 2 == 0) {
@@ -752,15 +756,23 @@
    },
    /** 导出按钮操作 */
    handleExport() {
      const Ids = this.ids;
      if(Ids.length==0)
      {
      this.download('zfCollection/export', {
        ...this.queryParams
      }, `zfCollection_${new Date().getTime()}.xlsx`)
      }else{
        this.download('zfCollection/export1/'+Ids, {
        }, `zfCollection_${new Date().getTime()}.xlsx`)
      }
    },
    /** 导入模板下载按钮操作 */
    handleExportModel() {
      this.downloadModel('zfCollection/model', {
        ...this.queryParams
      this.download('/zfCollection/model', {
      }, `zfCollection_model_${new Date().getTime()}.xlsx`)
    },