gaoluyang
10 天以前 2c7bb17c8337f237b8e9ac02d404a6ec90123bae
src/views/qualityManagement/rawMaterialInspection/components/filesDia.vue
@@ -46,18 +46,13 @@
        </div>
      </template>
    </el-dialog>
      <filePreview ref="filePreviewRef" />
  </div>
</template>
<script setup>
import {ref} from "vue";
import {getStaffJoinInfo, staffJoinAdd, staffJoinUpdate} from "@/api/personnelManagement/onboarding.js";
import {Search} from "@element-plus/icons-vue";
import {
  qualityInspectParamDel,
  qualityInspectParamInfo,
  qualityInspectParamUpdate
} from "@/api/qualityManagement/qualityInspectParam.js";
import filePreview from '@/components/filePreview/index.vue'
import {ElMessageBox} from "element-plus";
import {getToken} from "@/utils/auth.js";
import {
@@ -88,7 +83,14 @@
        clickFun: (row) => {
          downLoadFile(row);
        },
      }
      },
         {
            name: "预览",
            type: "text",
            clickFun: (row) => {
               lookFile(row);
            },
         }
    ],
  },
]);
@@ -100,6 +102,7 @@
const tableData = ref([]);
const fileList = ref([]);
const tableLoading = ref(false);
const filePreviewRef = ref()
const headers = ref({
  Authorization: "Bearer " + getToken(),
});
@@ -159,6 +162,10 @@
const downLoadFile = (row) => {
  proxy.$download.name(row.url);
}
// 预览附件
const lookFile = (row) => {
   filePreviewRef.value.open(row.url)
}
// 删除
const handleDelete = () => {
  let ids = [];