duhe
2026-01-16 dcd3a56969008bfad73dda1ec94e91408fdaa032
src/views/basic/gyUnit/gyUnit.vue
@@ -447,16 +447,16 @@
      this.editGyClose(); // 组件内的方法绑定到windows
    };
    this.queryParams.HOrgID = sessionStorage["OrganizationID"];
    this.riqiChange();
    this.handleQuery();
  },
  beforeDestroy() {
    // 组件销毁时清理全局方法,避免内存泄漏
    delete window.editGyClose;
  },
  created() {
    this.riqiChange();
    this.handleQuery();
  },
  created() {},
  methods: {
    onDateScanOptionChangerHandler(e) {
      this.queryParams.timeSpan = e;
@@ -498,7 +498,7 @@
    defaintOperationByCompanyName() {
      var result = false;
      axios
        .get(this.baseURL + "/Xt_getInfo/getCompanyName")
        .get(this.$baseUrl + "/Xt_getInfo/getCompanyName")
        .then((res) => {
          var data1 = res.data;
          if (data1.count == 1) {
@@ -596,7 +596,7 @@
      // 计量单位列表
      try {
        let res = await axios.get(this.baseURL + "/Gy_Unit/list1", {
        let res = await axios.get(this.$baseUrl + "/Gy_Unit/list1", {
          params: {
            sWhere: this.sWhere,
            user: sessionStorage["HUserName"],
@@ -700,7 +700,7 @@
    DisPlay_HideColumn(HModName, user, option, dataOption) {
      this.totalNameList = [];
      axios
        .get(this.baseURL + "/Xt_grdAlignment_WMES/grdAlignmentWMESList", {
        .get(this.$baseUrl + "/Xt_grdAlignment_WMES/grdAlignmentWMESList", {
          params: {
            HModName: HModName,
            user: user,
@@ -858,7 +858,7 @@
    },
    //选中行高亮样式
    rowStyle({ row, rowIndex }) {
      if (this.ids.includes(row.hmainid)) {
      if (this.ids.includes(row.HItemID)) {
        return { background: "#ecf5ff" };
      }
    },
@@ -880,14 +880,25 @@
      }
      this.handleEdit(row, this.OperationType);
    },
    // 多选框选中数据
   // 多选框选中数据
    handleSelectionChange(selection) {
      // this.rowForm = {}
      this.ids = selection.map((item) => item.hmainid);
      this.single = selection.length != 1;
      this.multiple = !selection.length;
      if (!this.single) {
      if (this.openPage) {
        //列表单选
        if (selection.length > 1) {
          const del_row = selection.shift();
          this.$refs.tableData.toggleRowSelection(del_row, false); //设置这一行取消选中
        }
        this.rowForm = {};
        this.ids = selection.map((item) => item.HItemID);
        this.rowForm = selection[0];
      } else {
        this.ids = selection.map((item) => item.HItemID);
        this.single = selection.length != 1;
        this.multiple = !selection.length;
        if (!this.single) {
          this.rowForm = selection[0];
        }
      }
    },
    //打开侧边搜索弹窗
@@ -994,13 +1005,14 @@
        sWhere += " and 禁用标记 = '' and ISNULL(审核人,'')  != ''";
        return sWhere;
      }
      return sWhere;
    },
    //根据用户获取用户关联组织的过滤条件
    getOrgIDByUser() {
      var res = "";
      axios
        .get(this.baseURL + "/Xt_User/getOrgIDListByUser", {
        .get(this.$baseUrl + "/Xt_User/getOrgIDListByUser", {
          params: {
            HModName: this.HModName,
            user: sessionStorage["HUserName"],
@@ -1084,9 +1096,10 @@
        .confirm("确认要删除吗,删除后不能恢复")
        .then(() => {
          if (!this.rowForm.审核人) {
            const InterID = this.rowForm.hmainid || this.rowForm.HItemID || this.rowForm.HInterID;
            const InterID =
              this.rowForm.hmainid || this.rowForm.HItemID || this.rowForm.HInterID;
            axios
              .get(this.baseURL + "DeltetGy_Unit", {
              .get(this.$baseUrl + "DeltetGy_Unit", {
                params: {
                  HItemID: InterID,
                  user: sessionStorage["HUserName"],
@@ -1114,7 +1127,7 @@
      var InterID = form.HItemID || form.HInterID || form.hmainid;
      //逻辑审核方法
      axios
        .get(this.baseURL + "/Gy_Unit/AuditGy_Unit", {
        .get(this.$baseUrl + "/Gy_Unit/AuditGy_Unit", {
          params: {
            HInterID: InterID,
            Type: num,
@@ -1136,15 +1149,15 @@
          this.$modal.msgError("接口请求失败!");
        });
    },
    // 反禁用/禁用数据
    set_De_Stop(num, form) {
      var InterID = form.HItemID || form.HInterID;
      //逻辑审核方法
      axios
        .get(this.baseURL + "/Gy_Unit/StopGy_Unit", {
        .get(this.$baseUrl + "/Gy_Unit/StopGy_Unit", {
          params: {
            HInterID: InterID,
            IsStop: num,
@@ -1214,7 +1227,6 @@
      return org ? org.Name : '';  // 只返回组织名称
    },
    // 提交上传文件
    submitFileForm() {
      this.$refs.upload.submit();
@@ -1230,7 +1242,7 @@
      var sMainSub = sSubStr + "&和" + sessionStorage["HUserName"];
      axios({
        method: "post",
        url: this.baseURL + "/Gy_Source/Gy_Source_btnSave",
        url: this.$baseUrl + "/Gy_Source/Gy_Source_btnSave",
        data: {
          sMainSub: sMainSub,
        },