feige
2024-12-17 4b1fbea0d8099259ea7d0ef10bd7633c3bc62f2e
ruoyi-ui/src/views/travel/Info.vue
@@ -1,7 +1,7 @@
<template>
  <div class="app-container" style="opacity: 1;">
    <h2>每日行程</h2>
    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch">
<!--    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch">
      <el-form-item label="时间" >
        <el-date-picker
@@ -28,9 +28,9 @@
        <el-button  size="mini" @click="handleQuery" style=" width: 65px; height: 32px;background: #FFDDE3;border-radius:6px 6px 6px 6px;opacity:1;">搜索</el-button>
        <el-button  size="mini" @click="resetQuery" style=" width: 65px;height: 32px; background: #FFDDE3; border-radius:6px 6px 6px 6px;opacity: 1;">重置</el-button>
      </el-form-item>
    </el-form>
    </el-form> -->
    <el-row :gutter="10" class="mb8">
<!--    <el-row :gutter="10" class="mb8">
      <el-col :span="1.5">
        <el-button
          type="primary"
@@ -73,7 +73,7 @@
          v-hasPermi="['family:note:export']"
        >导入模板下载</el-button>
      </el-col>
      <el-col :span="1.2">
      <el-col :span="1.5">
        <el-upload
          action=""
          class="upload-demo"
@@ -82,74 +82,77 @@
        >
          <el-button size="mini"   type="primary"
                     plain
                     icon="el-icon-plus" >导入</el-button>
                     icon="el-icon-top">导入</el-button>
        </el-upload>
      </el-col>
      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
    </el-row>
    </el-row> -->
    <el-table v-loading="loading" :data="travelBase"  @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-column  label="序号" sortable type="index" :index="(queryParams.pageNum-1)*queryParams.pageSize+1" width="120"/>
      <el-table-column label="时间" prop="happenTime" sortable width="100" align="center">
        <template slot-scope="scope">{{scope.row.happenTime? scope.row.happenTime: '————'}}</template>
      </el-table-column>
      <el-table-column label="地点" prop="address" sortable width="100" />
      <el-table-column label="人物" prop="people" sortable width="100" />
      <el-table-column label="标题" prop="title" sortable width="100" />
      <el-table-column label="旅期" prop="travelPeriod" sortable width="100" />
      <el-table-column label="持证旅游" prop="certificate" sortable width="100" />
      <el-table-column label="费用" prop="totalPrice" sortable width="100" />
      <el-table-column label="公费/自费" prop="self" sortable width="100" >
        <template slot-scope="scope">{{scope.row.self==0?'公费':'自费'}}</template>
      </el-table-column>
      <el-table-column label="电子文件" prop="url" width="160" >
        <template slot-scope="scope" >
          <img
            class="el-upload-list__item-thumbnail"
            src="../../assets/images/deviceLis.png"
            alt=""
            style="width: 35px; height: 35px;"
            fit="cover"
            v-if="scope.row.url !== ','"
          >
          <img
            class="el-upload-list__item-thumbnail"
            src="../../assets/images/deviceA.png"
            alt=""
            style="width: 35px; height: 35px;"
            fit="cover"
            v-if="scope.row.url === ','"
          >
        </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
            size="mini"
            type="text"
            icon="el-icon-edit"
            @click="handleUpdate(scope.row)"
            v-hasPermi="['familymodel:economy:info']"
          >修改</el-button>
          <el-button
            size="mini"
            type="text"
            icon="el-icon-delete"
            @click="handleDelete(scope.row)"
            v-hasPermi="['system:role:remove']"
          >删除</el-button>
        </template>
      </el-table-column>
    </el-table>
    <el-table  v-loading="loading" :data="travelBase"  style="background: #FFEFF2;  border-radius: 14px 14px 14px 14px;" :row-class-name="tableRowClassName1" >
                  <el-table-column  label="序号" sortable type="index" :index="(queryParams.pageNum-1)*queryParams.pageSize+1" width="50px"/>
                  <el-table-column label="时间" prop="happenDate" sortable width="100" align="center" >
                    <template slot-scope="scope">{{scope.row.happenDate? scope.row.happenDate: '————'}}</template>
                  </el-table-column>
                  <el-table-column label="地点" prop="address" sortable width="100" />
                  <el-table-column label="建筑" prop="scenic" sortable width="100" />
                  <!-- <el-table-column label="旅期" prop="travelPeriod" sortable width="100" /> -->
                  <el-table-column label="使用证件" prop="document" sortable width="100" />
                  <el-table-column label="车次/航班" prop="flight" sortable width="120px" />
                  <el-table-column label="餐费" prop="eat" sortable width="70px" />
                  <el-table-column label="住宿费" prop="stay" sortable width="100px" />
                  <el-table-column label="交通" prop="travel" sortable width="70px" />
                  <el-table-column label="门票" prop="entrance" sortable width="70px" />
                 <el-table-column label="其它费用" prop="otherCost" sortable width="120px" />
              <el-table-column label="备注" prop="backInfo" sortable width="120px" />
                  <el-table-column label="电子文件" prop="url" width="160" >
                    <template slot-scope="scope" >
                      <img
                        class="el-upload-list__item-thumbnail"
                        src="../../assets/images/deviceLis.png"
                        alt=""
                        style="width: 35px; height: 35px;"
                        fit="cover"
                        v-if="!(scope.row.url === '' || scope.row.url === ',' || scope.row.url === null)"
                      >
                      <img
                        v-else
                        class="el-upload-list__item-thumbnail"
                        src="../../assets/images/deviceA.png"
                        alt=""
                        style="width: 35px; height: 35px;"
                        fit="cover"
                      >
                    </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" v-if="userId != 2">
                    <template slot-scope="scope" v-if="scope.row.roleId !== 1">
                <!--      <el-button
                        size="mini"
                        type="text"
                        icon="el-icon-edit"
                        @click="handleUpdate1(scope.row)"
                        v-hasPermi="['familymodel:economy:info']"
                      >修改</el-button>
                      <el-button
                        size="mini"
                        type="text"
                        icon="el-icon-delete"
                        @click="handleDelete1(scope.row)"
                        v-hasPermi="['system:role:remove']"
                      >删除</el-button> -->
                      <el-button size="mini" type="text" icon="el-icon-d-arrow-right"  @click="handleCheck1(scope.row)">查看详情</el-button>
                    </template>
                  </el-table-column>
                </el-table>
    <pagination
      v-show="total>0"
@@ -356,8 +359,16 @@
      deptNodeAll: false,
      // 日期范围
      dateRange: [],
     queryParams: {
       pageNum: 1,
       pageSize: 10,
     },
      // 数据范围选项
      fot:[".jpg",".jif"],
    // 数据范围选项
    fot:['.bmp','.jpg','.jpeg','.png','.tif','.gif','.pcx','.tga','.exif','.fpx',
      '.svg','.psd','.cdr','.pcd','.dxf','.ufo','.eps','.ai','.aw','.WMF','.webp','.apng'],
      fileList:[
      ],
      fileListOther:[
@@ -513,7 +524,7 @@
    const id = this.$route.params && this.$route.params.id;
    this.getList1();
  //  this.getList1();
    this.getList(id);
  },
@@ -558,18 +569,20 @@
    getList(fid) {
      this.loading = true;
      this.queryParams.fid = fid
      this.queryParams.happenStartTime = this.dateRange.length > 0 && this.dateRange[0]
      this.queryParams.happenEndTime = this.dateRange.length > 0 && this.dateRange[1]
      // this.queryParams.happenStartTime = this.dateRange.length > 0 && this.dateRange[0]
      // this.queryParams.happenEndTime = this.dateRange.length > 0 && this.dateRange[1]
      // console.log(this.queryParams)
      let _this = this
      // // console.log(this.queryParams)
      //  listProperty(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
      listTravelBase(this.queryParams).then(response => {
      listTravelBase(fid).then(response => {
          //  alert(123)
          //   console.log(response.data)
          this.travelBase = response.data.data;
        console.log(response.data)
         //   console.log(response.data.data)
          _this.travelBase = response.data;
          // console.log(this.travelBase)
          this.total = response.data.total;
          this.loading = false;
          _this.loading = false;
        }
      );
@@ -585,7 +598,7 @@
          this.loading = false;
          const detailList = filteredData.detailList;
          // console.log(detailList);
          resolve(detailList);
       //   resolve(detailList);
        }).catch(error => {
          console.error("请求错误:", error);
          reject(error);
@@ -635,7 +648,7 @@
          deptCheckStrictly: true,
          remark: undefined
        };
      this.resetForm("form");
      this.resetForm("elForm");
    },
    /** 搜索按钮操作 */
    handleQuery() {
@@ -858,6 +871,19 @@
//         this.$modal.msgSuccess("删除成功");
//       }).catch(() => {});
//     },
    //隔行变色
    tableRowClassName1({ row, rowIndex }) {
      if (rowIndex % 2 == 0) {
        return "statistics-warning-row1";
      } else {
        return "statistics-warning-row";
      }
    },
    handleCheck1(row){
      const id = row.id;
    // alert(id)
      this.$router.push("/self/travel/travelInfo/" + id);
    },
    /** 导出按钮操作 */
    handleExport() {
      const Ids = this.ids;