spring
2025-03-26 1997d52296ee89f4b7833c19e2e37ea2b5408e22
Merge branch 'radio-frequency-cable' of http://114.132.189.42:9002/r/lims-ruoyi-before into radio-frequency-cable
已修改2个文件
已添加1个文件
143 ■■■■■ 文件已修改
src/api/structural/workshop.js 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/materialOrder/commom/fileList.vue 116 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/materialOrder/customsInspection.vue 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/structural/workshop.js
@@ -36,6 +36,15 @@
  });
}
//获取对象零件号附件列表
export function partFileList(query) {
  return request({
    url: '/workShop/partFileList',
    method: 'get',
    params: query
  })
}
// åˆ é™¤æ–‡ä»¶
export function delFile(query) {
  return request({
src/views/business/materialOrder/commom/fileList.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,116 @@
<template>
    <el-dialog title="查看附件" :visible.sync="fileDialogVisible" width="800px" top="5vh" fullscreen append-to-body
      @close="handleClose">
      <filePreview v-if="lookDialogVisible" :fileUrl="currentInfo.fileMinioUrl" :currentFile="currentInfo"
        style="max-height: 90vh;overflow-y: auto;" />
    </el-dialog>
</template>
<script>
import limsTable from "@/components/Table/lims-table.vue";
import partFileList from "@/api/structural/workshop.js"
import filePreview from "@/components/Preview/filePreview.vue";
export default {
  components: {
    limsTable,
    filePreview,
  },
  props: {
    visible: {
      type: Boolean,
      default: false
    },
    partNo: {
      type: String,
      default: ''
    }
  },
  computed: {},
  data() {
    return {
      columnFile: [
        {
          dataType: 'tag',
          label: '类型',
          prop: 'type',
          formatData: (params) => {
            if (params == 1) {
              return '图片'
            } else if (params == 2) {
              return '文件'
            } else {
              return ''
            }
          },
          formatType: (params) => {
            if (params == 1) {
              return 'success'
            } else if (params == 2) {
              return 'warning'
            } else {
              return ''
            }
          }
        },
        { label: '附件名称', prop: 'fileName' },
        { label: '上传人', prop: 'name' },
        { label: '上传时间', prop: 'createTime' },
        {
          dataType: 'action',
          fixed: 'right',
          label: '操作',
          width: '170px',
          operation: [
            {
              name: '下载',
              type: 'text',
              clickFun: (row) => {
                this.handleDown(row);
              }
            },
            {
              name: '预览',
              type: 'text',
              clickFun: (row) => {
                console.log('预览文件信息:', row)
                this.currentInfo = row
                this.lookDialogVisible = true
              }
            },
          ]
        }
      ],
      tableDataFile: [],
      tableLoadingFile: false,
      lookDialogVisible: false,
      currentInfo: {},
      fileDialogVisible: false,
    }
  },
  mounted() {
    this.getFileList()
  },
  methods: {
    // æŸ¥è¯¢é™„件查看列表回调
    getFileList() {
      this.tableLoadingFile = true
      partFileList({ partNo: this.partNo }).then(res => {
        this.tableLoadingFile = false
        if (res.code === 200) {
          this.tableDataFile = res.data
          console.log('文件列表数据:', this.tableDataFile)
        }
      }).catch(err => {
        this.tableLoadingFile = false
      })
    },
    // ä¸‹è½½é™„件的文件
    handleDown(row) {
      this.$download.saveAs(row.fileUrl, row.fileName);
    },
  }
}
</script>
<style scoped></style>
src/views/business/materialOrder/customsInspection.vue
@@ -162,6 +162,15 @@
                </el-option>
              </el-select>
            </el-form-item>
            <el-form-item label="附件查看:" style="margin-bottom: 6px;margin-top: 6px">
              <el-button type="text" @click="handleFileDialog">
                <i class="el-icon-document"></i>
                é™„件查看
              </el-button>
              <el-dialog :visible.sync="fileDialogVisible" title="附件查看" width="80%">
                <fileList :currentNo="partNo" v-if="fileDialogVisible" />
              </el-dialog>
            </el-form-item>
          </el-form>
        </div>
        <div style="margin-bottom: 6px;margin-top: 6px">
@@ -410,16 +419,19 @@
  selectStandardProductList,
  selectStandardTreeListByPartNo
} from "@/api/business/rawMaterialOrder";
import fileList from "./commom/fileList.vue"
import limsTable from "@/components/Table/lims-table.vue";
export default {
  name: "CustomsInspection",
  dicts: ['check_type', 'urgency_level'],
  components: {},
  components: { limsTable,fileList },
  props: {
  },
  data() {
    return {
      customsInspection: {},
      fileDialogVisible: false,
      orderType: '',
      active: 0,
      currentId: 0,
@@ -618,6 +630,10 @@
  //   this.getInfo() // èŽ·å–æ•°æ®
  // },
  methods: {
    handleFileDialog() {
      this.fileDialogVisible = true
      this.currentNo = addObj.partNo || customsInspection.partNo;
    },
    save1() {
      if (this.bsm1DiaList.length > 0) {
        this.bsm1DiaList.forEach(item => {