zouyu
2025-03-18 bc44c8e3c9d85691ce3fa73ef1300a6fae46e365
src/views/business/reportPreparation/index.vue
@@ -1,4 +1,9 @@
<style scoped>
.reportPreparation {
  width: 100%;
  height: 100%;
}
.title {
  height: 60px;
  line-height: 60px;
@@ -15,7 +20,7 @@
  display: flex;
  align-items: center;
  height: 50px;
  width: 230px;
  width: 210px;
}
.search_label {
@@ -65,8 +70,8 @@
</style>
<template>
  <div class="inspection_order">
    <div style="width: 100%; height: 100%">
  <div>
    <div class="reportPreparation bg-1">
      <div>
        <el-row class="title">
          <el-col :span="12" style="padding-left: 20px; text-align: left"
@@ -196,6 +201,7 @@
                :icon="!more ? 'el-icon-arrow-down' : 'el-icon-arrow-up'"
                style="color: #3a7bfa"
                @click="more = !more"
                v-hasPermi="['bbusiness:reportPreparation:more']"
                >{{ !more ? "更多" : "收起" }}</el-button
              >
              <div class="search_thing" style="padding-left: 20px">
@@ -224,31 +230,31 @@
                      <el-dropdown-item
                        icon="el-icon-download"
                        command="batchDownload"
                        v-hasPermi="['business:reportPreparation:batchDownload']"
                        >批量下载</el-dropdown-item
                      >
                      <el-dropdown-item
                        icon="el-icon-upload"
                        command="batchUpload"
                         v-hasPermi="['business:reportPreparation:batchUpload']"
                        >批量上传</el-dropdown-item
                      >
                      <el-dropdown-item
                        icon="el-icon-s-check"
                        command="oneClickApproval"
                         v-hasPermi="['business:reportPreparation:oneClickApproval']"
                        >一键审批</el-dropdown-item
                      >
                      <el-dropdown-item
                        icon="el-icon-setting"
                        command="approvalConfig"
                         v-hasPermi="['business:reportPreparation:signatureConfiguration']"
                        >审批签名配置</el-dropdown-item
                      >
                    </el-dropdown-menu>
                  </el-dropdown>
                </template>
              </div>
              <!-- <div class="btns">
              <el-button size="small" type="primary" @click="handleDowns" :loading="outLoading" style="margin-right: 16px;">批量下载</el-button>
              <el-button size="small" type="primary" @click="openBatchUploadDia()" :loading="inLoading">批量上传</el-button>
            </div> -->
            </div>
          </el-col>
        </el-row>
@@ -290,7 +296,7 @@
          :tableData="tableData"
          :column="column"
          :tableLoading="tableLoading"
          :height="'calc(100vh - 270px)'"
          :height="tableHeight+''"
          :page="page"
          @pagination="pagination"
        ></lims-table>
@@ -312,13 +318,6 @@
          style="cursor: pointer; font-size: 18px"
          @click="fullscreen = true"
        ></i>
        <!-- <img
          v-else
          alt=""
          src="../../../static/img/no-full.svg"
          style="cursor: pointer"
          @click="fullscreen = false"
        /> -->
      </div>
      <div v-if="viewIssuedVisible" style="height: 80vh">
        <onlyoffice
@@ -342,13 +341,6 @@
          @click="fullscreen = true"
          v-if="!fullscreen"
        ></i>
        <!-- <img
          src="../../../static/img/no-full.svg"
          alt=""
          v-else
          style="cursor: pointer"
          @click="fullscreen = false"
        /> -->
      </div>
      <Word
        style="height: 70vh"
@@ -377,13 +369,6 @@
          @click="fullscreen = true"
          v-if="!fullscreen"
        ></i>
        <!-- <img
          src="../../../static/img/no-full.svg"
          alt=""
          v-else
          style="cursor: pointer"
          @click="fullscreen = false"
        /> -->
      </div>
      <div style="height: 75vh" v-if="issuedVisible">
        <onlyoffice
@@ -448,13 +433,6 @@
          @click="fullscreen = true"
          v-if="!fullscreen"
        ></i>
        <!-- <img
          src="../../../static/img/no-full.svg"
          alt=""
          v-else
          style="cursor: pointer"
          @click="fullscreen = false"
        /> -->
      </div>
      <div style="height: 75vh" v-if="approveVisible">
        <onlyoffice
@@ -513,18 +491,6 @@
      top="5vh"
    >
      <div>
        <!-- <el-upload
            class="upload-demo"
            :action="action"
            :headers="headers"
            :show-file-list="false"
            accept=".doc,.docx"
            :limit="1"
            :before-upload="beforeUpload"
            :on-success="handleSuccess"
            ref="upload"
            :on-error="onError">
          </el-upload> -->
        <el-upload
          ref="upload"
          class="upload-demo custom-upload"
@@ -834,6 +800,8 @@
import { getToken } from "@/utils/auth";
import auth from "@/plugins/auth.js";
export default {
  components: {
    limsTable,
@@ -841,6 +809,7 @@
  },
  data() {
    return {
      tableHeight: "",
      tagField: {
        isUpload: {
          select: [
@@ -1092,12 +1061,18 @@
              disabled: (row) => {
                return row.isExamine != -9;
              },
              showHide: () => {
                return auth.hasPermi("business:reportPreparation:establishment");
              },
            },
            {
              name: "下载",
              type: "text",
              clickFun: (row) => {
                this.download(row);
              },
              showHide: () => {
                return auth.hasPermi("business:reportPreparation:download");
              },
            },
            {
@@ -1115,6 +1090,9 @@
              disabled: (row) => {
                return row.isExamine != -9;
              },
              showHide: () => {
                return auth.hasPermi("business:reportPreparation:upload");
              },
            },
            {
              name: "还原",
@@ -1125,6 +1103,9 @@
              disabled: (row) => {
                return row.isExamine != -9;
              },
              showHide: () => {
                return auth.hasPermi("business:reportPreparation:restore");
              },
            },
            {
              name: "提交",
@@ -1134,6 +1115,9 @@
              },
              disabled: (row) => {
                return row.state != 0;
              },
              showHide: () => {
                return auth.hasPermi("business:reportPreparation:submit");
              },
            },
            {
@@ -1146,6 +1130,9 @@
                return (
                  row.state == null || row.state == 0 || row.isExamine == 1
                );
              },
              showHide: () => {
                return auth.hasPermi("business:reportPreparation:examine");
              },
            },
            {
@@ -1163,6 +1150,9 @@
                  row.isRatify == 1
                );
              },
              showHide: () => {
                return auth.hasPermi("business:reportPreparation:approve");
              },
            },
            {
              name: "撤回",
@@ -1172,6 +1162,9 @@
              },
              disabled: (row) => {
                return row.state == 1;
              },
              showHide: () => {
                return auth.hasPermi("business:reportPreparation:withdraw");
              },
            },
          ],
@@ -1224,7 +1217,7 @@
    this.getAuthorizedPerson();
    this.handleResize();
    // 监听窗口大小改变事件
    window.addEventListener("resize", this.handleResize);
    window.addEventListener("resize", this.handleResize);
  },
  beforeDestroy() {
    if (this.time != null) {
@@ -1244,6 +1237,11 @@
    this.entityCopy = this.HaveJson(this.entity);
    this.getList();
    this.getReportCountInfo();
    this.getTableHeight();
    window.addEventListener('resize', this.calculateTableHeight); // 监听窗口大小变化
  },
  beforeDestroy() {
    window.removeEventListener('resize', this.calculateTableHeight); // 移除监听
  },
  watch: {
    batchUploadDia(newVal) {
@@ -1281,6 +1279,12 @@
    },
  },
  methods: {
    // 获取表格高度
    getTableHeight() {
      const windowHeight =   window.innerHeight; // 浏览器窗口高度
      this.tableHeight = windowHeight - 60 - 80 - 46 - 50 - 32 - 44 -30 - 30;
      console.log('this.tableHeight',this.tableHeight);
    },
    // 返回分页值
    pagination({ page, limit }) {
      this.page.current = page;