1
chenhaozhe
5 天以前 f16924660f63d8370002519bda805874c27a6af5
1
2个文件已修改
50 ■■■■ 已修改文件
.env.development 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/basic/gyUnit/gyUnit.vue 46 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.env.development
@@ -5,8 +5,8 @@
ENV = 'development'
# 智云迈思L-MOM管理系统/开发环境
# VUE_APP_BASE_API = 'http://localhost:81/API/'
VUE_APP_BASE_API = 'http://47.96.97.237/API/'
VUE_APP_BASE_API = http://localhost:81/API/
# VUE_APP_BASE_API = 'http://47.96.97.237/API/'
# VUE_APP_BASE_API = 'http://220.189.218.155:9010/API/'
# VUE_APP_BASE_API = 'http://localhost:8082/LuBaoAPI/'
# VUE_APP_BASE_API = 'http://192.168.1.11/API/'
src/views/basic/gyUnit/gyUnit.vue
@@ -1,5 +1,5 @@
<template>
  <div style="padding: 10px; position: relative;">
  <div style="padding: 10px; position: relative">
    <el-form
      :model="queryParams"
      ref="queryForm"
@@ -260,8 +260,7 @@
          >编辑</el-button
        >
      </el-col>
      <el-col :span="1.5">
      </el-col>
      <el-col :span="1.5"> </el-col>
      <el-col :span="1.5">
        <el-button
          type="primary"
@@ -314,7 +313,7 @@
          >反禁用</el-button
        >
      </el-col> -->
      <el-col :span="1.5">
        <el-button
          type="primary"
@@ -410,7 +409,7 @@
                  type="text"
                  @click.stop="handleEdit(row, (OperationType = 3))"
                  v-else-if="column.property == '计量单位代码'"
                  >{{ row.计量单位代码}}</el-button
                  >{{ row.计量单位代码 }}</el-button
                >
                <span v-else>{{ row[column.label] }}</span>
              </div>
@@ -633,7 +632,7 @@
      selectedRow: null, // 当前选中的行
      rowForm: {},
      checkedSysZb: [],
      editData: [],
      editData: [],
      activeName: "first",
      searchOpen: false,
      // 弹出层标题
@@ -719,16 +718,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;
@@ -866,13 +865,13 @@
        this.pageSize = 50;
      }
      // 计量单位列表
      try {
        let res = await axios.get(this.baseURL + "/Gy_Unit/list1", {
          params: {
            sWhere: this.sWhere,
            user: sessionStorage["HUserName"],
            Organization:this.getOrgNameById(this.queryParams.HOrgID)
            Organization: this.getOrgNameById(this.queryParams.HOrgID),
          },
        });
        this.tyResList = [...JSON.parse(JSON.stringify(res.data.data))]; //总数据
@@ -1245,7 +1244,7 @@
      // if (this.queryParams.HBeginDate && this.queryParams.HEndDate) {
      //   this.sWhere += `  and CONVERT(varchar(100),日期, 23) >= '${this.queryParams.HBeginDate}' and CONVERT(varchar(100),日期, 23) <= '${this.queryParams.HEndDate}'`;
      // }
      this.sWhere += this.addSWhereByOpenType();
      // this.sWhere += this.getOrgIDByUser();
      this.searchOpen = false;
@@ -1257,9 +1256,10 @@
      var sWhere = "";
      //this.openPage判断是否有值,有代表其它页面通过选择按钮打开
      if (this.openPage || window.parent != window.self) {
        sWhere += " and 禁用标志 != '1' and ISNULL(审核人,'')  != ''";
        sWhere += " and 禁用标记 = '' and ISNULL(审核人,'')  != ''";
        return sWhere;
      }
      return sWhere;
    },
    //根据用户获取用户关联组织的过滤条件
@@ -1350,7 +1350,8 @@
        .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", {
                params: {
@@ -1390,7 +1391,6 @@
        .then((res) => {
          let result = res.data;
          if (result.code == 1) {
            this.handleQuery();
            this.$modal.msgError("错误:" + result.code + result.Message);
          } else {
@@ -1402,8 +1402,6 @@
          this.$modal.msgError("接口请求失败!");
        });
    },
    // 反禁用/禁用数据
    set_De_Stop(num, form) {
@@ -1471,17 +1469,15 @@
    },
    // 假设您有一个组织ID
// 方法1.1:使用 find 方法
    // 方法1.1:使用 find 方法
    getOrgNameById(id) {
      const org = this.organizationList.find(item =>
        item.ID.toString() === id.toString()
      const org = this.organizationList.find(
        (item) => item.ID.toString() === id.toString()
      );
       return org ? org.Name : '';  // 只返回组织名称
      return org ? org.Name : ""; // 只返回组织名称
    },
      // 提交上传文件
    // 提交上传文件
    submitFileForm() {
      this.$refs.upload.submit();
    },