spring
2025-02-21 1309d6a2a55fc1cf07de57da3891a8d3230b2db8
src/views/business/materialOrderComponents/materialOrder/filesLookVisible.vue
@@ -3,23 +3,20 @@
    <el-dialog title="附件查看" :visible.sync="isShow" width="80%" @closed="$emit('closeFilesLook')">
      <div style="display: flex;justify-content: space-between;">
        <ul class="tab">
          <li v-for="(m,i) in dataVisibleTitle" :key="i" :class="{active:i===dataVisibleIndex}" @click="handleDataVisibleTab(m,i)">{{m.label}}</li>
          <li v-for="(m, i) in dataVisibleTitle" :key="i" :class="{ active: i === dataVisibleIndex }"
            @click="handleDataVisibleTab(m, i)">{{ m.label }}</li>
        </ul>
        <el-upload :action="action"
                   :auto-upload="true"
        <el-upload :action="action" :auto-upload="true"
                   :data="{orderId: dataVisibleIndex === 0 ? filesLookInfo.enterOrderId : filesLookInfo.quarterOrderId}"
                   :on-success="handleSuccessUp" :show-file-list="false"
                   accept='.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar' :headers="headers"
                   :before-upload="beforeUpload"
                   style="width: 80px !important;"
                   :on-error="onError" ref='upload'>
          :before-upload="beforeUpload" style="width: 80px !important;" :on-error="onError" ref='upload'>
          <el-button size="small" type="primary" style="height: 38px">附件上传</el-button>
        </el-upload>
      </div>
      <div v-if="filesDialogVisible">
        <lims-table :tableData="tableDataFile" :column="columnFile"
                    @pagination="paginationFile" height="500px" key="tableDataFile"
                    :page="pageFile" :tableLoading="tableLoadingFile"></lims-table>
        <lims-table :tableData="tableDataFile" :column="columnFile" @pagination="paginationFile" height="500px"
          key="tableDataFile" :page="pageFile" :tableLoading="tableLoadingFile"></lims-table>
      </div>
    </el-dialog>
  </div>
@@ -30,7 +27,7 @@
import file from "@/utils/file";
import limsTable from "@/components/Table/lims-table.vue";
import {delfile, downFile, getFileList} from "@/api/business/rawMaterialOrder";
import { getToken } from "@/utils/auth";
export default {
  name: "filesLookVisible",
  // import 引入的组件需要注入到对象中才能使用
@@ -226,7 +223,7 @@
  computed: {
    headers() {
      return {
        'token': sessionStorage.getItem('token')
        'Authorization': "Bearer " + getToken()
      }
    },
    action() {