陈婷婷
昨天 a4989ac2090626b23c630a097f5f773f08f8f949
src/views/system/user/GyDriver.vue
@@ -437,9 +437,11 @@
        );
        if (userRes.data.data && userRes.data.data[0]) {
          const userData = userRes.data.data[0];
          this.user = userData.Czymc || "admin";
          this.user = sessionStorage["HUserName"] ;
          this.Organization = userData.HUSEORGID;
          this.queryParams.HUSEORGID = userData.HUSEORGID;
          const orgId = sessionStorage["OrganizationID"];
          this.queryParams.HUSEORGID = orgId ? Number(orgId) : null;
          this.$forceUpdate();
        }
        const orgRes = await axios.get(`${this.$baseUrl}/Web/GetOrganizations`);
@@ -460,7 +462,8 @@
    async getList() {
      this.tableShow = false;
      this.loading = true;
      console.log("获取列表数据...", this.sWhere);
      this.sWhere=this.sWhere+"and 使用组织 ="+sessionStorage["OrganizationID"]
      await this.set_ModCheck("GyDriver_SUPQuery")
      try {
        const params = {
          sWhere: this.sWhere || "",
@@ -617,8 +620,27 @@
        console.error("加载列配置失败:", error);
      }
    },
   async set_ModCheck(ModRightNameCheck)
        {
            var Permission = false;
            const res=await axios.get(this.$baseUrl + '/LMES/getReportByModRightNameCheck', {
                params: {
                    "ModRightNameCheck": ModRightNameCheck,
                    "user": sessionStorage["HUserName"],
                },
            }).then(result=>{
                if (result.data.count != 1) {
                   Permission = true;
                   this.sWhere=this.sWhere+"and 所属公司ID ="+sessionStorage["HSupID"]
                }
            }).catch(error => {
                this.$modal.msgError("接口请求失败!");
            });
        },
    handleQuery() {
  async handleQuery() {
      this.sWhere = "";
      const conditions = [];
@@ -628,9 +650,9 @@
      if (this.queryParams.HName) {
        conditions.push(`驾驶员名称 like '%${this.queryParams.HName}%'`);
      }
      // if (this.queryParams.HUSEORGID) {
      //   conditions.push(`HUSEORGID = '${this.queryParams.HUSEORGID}'`);
      // }
      if (this.queryParams.HUSEORGID) {
        conditions.push(`使用组织 = '${this.queryParams.HUSEORGID}'`);
      }
      if (this.queryParams.ColName !== "0" && this.queryParams.Comparator !== "0") {
@@ -707,7 +729,7 @@
    resetQuery() {
      this.queryParams = {
        HUSEORGID: this.Organization,
        HUSEORGID: sessionStorage["OrganizationID"],
        HName: "",
        HNumber: "",
        HSyncNumber: "",