wangyi
2026-04-02 74feb99b1b4e2eb3706bbb503d07fb087ca39d4a
src/views/scMould/basicModeling/Gy_MouldFileList.vue
@@ -237,6 +237,7 @@
  components: { RowSettings, Edit, BtnSettings },
  props: {
    openPage: { type: String, },
    multiple: { type: Boolean, default: false },
  },
  data() {
    return {
@@ -475,6 +476,7 @@
    },
    //列表数据
    getList() {
      this.clearData()
      this.pageSize = 50
      this.tableShow = false
      this.loading = true
@@ -759,17 +761,19 @@
      }
    },
    // 多选框选中数据
    handleSelectionChange(selection) {
      // this.rowForm = {}
      handleSelectionChange(selection) {
      if (this.openPage) {
        //列表单选
        if (selection.length > 1) {
        if (!this.multiple && selection.length > 1) {
          const del_row = selection.shift()
          this.$refs.tableData.toggleRowSelection(del_row, false) //设置这一行取消选中
          this.$refs.tableData.toggleRowSelection(del_row, false)
        }
        this.rowForm = {}
        this.ids = selection.map(item => item.hmainid)
        this.rowForm = selection[0]
        if (this.multiple) {
          this.ids = selection.map(item => item.hmainid)
          this.rowForm = selection
        } else {
          this.ids = selection.map(item => item.hmainid)
          this.rowForm = selection[0]
        }
      } else {
        this.ids = selection.map(item => item.hmainid)
        this.single = selection.length != 1
@@ -1096,6 +1100,15 @@
        this.uploadData = this.getPage(this.uploadPage, this.alluploadList)
      }, 100)
    },
         //清除选中数据的缓存
        clearData() {
            this.ids = []
            this.multiple = true
            this.single = true
            this.OperationType = 0
            this.copyType = 0
        },
  }
};
</script>