chenhaozhe
2025-11-13 bdebbc1c44f33dead8e87a671542355c354be686
src/views/basic/gyEmployee/gyEmployee.vue
@@ -32,9 +32,9 @@
          >
            <el-option
              v-for="(item, index) in organizationList"
              :key="index"
              :key="item.ID"
              :label="item.Name"
              :value="item.ID"
              :value="item.ID.toString()"
            >
            </el-option>
          </el-select>
@@ -509,6 +509,7 @@
  },
  data() {
    return {
      activeSeach: "",
      HModName: "Gy_Source",
      editShow: false,
      openEdit: false,
@@ -562,7 +563,7 @@
      openData: false, //数据弹窗
      dialogTitle: "",
      zuzhiId: "",
      organizationList: [], //组织列表
      organizationList: JSON.parse(sessionStorage.getItem("organizationList")), //组织列表
      subDisabled: false, //编辑页面保存按钮是否禁用(true禁用,false可用)
      OperationType: null, //保存类型(新增1修改3)
      HInterID: null,
@@ -586,7 +587,7 @@
      dateRange: [],
      // 查询参数
      queryParams: {
        HOrgID: null,
        HOrgID: sessionStorage["OrganizationID"],
        HName: null,
        HNumber: null,
        Comparator1: "",
@@ -649,7 +650,7 @@
    };
  },
  created() {
    this.fetchData();
    this.handleQuery();
    this.riqiChange();
  },
  methods: {
@@ -768,33 +769,6 @@
    deptClickSub() {
      this.dbEmitData(this.deptform, this.dialogTypeNum);
      this.deptform = {};
    },
    fetchData() {
      //登录用户信息
      axios
        .get(
          "http://47.96.97.237/API/Web/GetUser?UserName=001&PassWord=123456&HOrgName=100038"
        )
        .then((response) => {
          let data = response.data.data[0];
          this.zuzhiId = data.HUSEORGID; //根据登录用户获取默认的组织ID
          this.queryParams.HOrgID = data.HUSEORGID;
          this.user = data.Czymc;
          axios
            .get(this.baseURL + "/Web/GetOrganizations", {})
            .then((response) => {
              if (response.data.count == 1) {
                this.organizationList = response.data.data; //组织列表
              }
              this.getList();
            })
            .catch((error) => {
              this.$modal.msgError("接口请求失败!");
            });
        })
        .catch((error) => {
          this.$modal.msgError("接口请求失败!");
        });
    },
    getList() {
      this.tableShow = false;
@@ -1157,10 +1131,10 @@
        this.sWhere += " and " + this.queryParams.ColName2 + " " + com2;
      }
      if (this.queryParams.HNumber) {
        this.sWhere += " and 生产资源代码 like '%" + this.queryParams.HNumber + "%'";
        this.sWhere += " and 职员代码 like '%" + this.queryParams.HNumber + "%'";
      }
      if (this.queryParams.HName) {
        this.sWhere += " and 生产资源名称 like '%" + this.queryParams.HName + "%'";
        this.sWhere += " and 职员名称 like '%" + this.queryParams.HName + "%'";
      }
      if (this.queryParams.HOrgID) {
        this.sWhere += " and HUSEORGID = '" + this.queryParams.HOrgID + "'";