RuoYi
2025-04-27 2f8a257efd2b64dc40666b0d332edb7824a9768d
src/store/modules/dict.js
@@ -8,16 +8,16 @@
      // 获取字典
      getDict(_key) {
        if (_key == null && _key == "") {
          return null;
          return null
        }
        try {
          for (let i = 0; i < this.dict.length; i++) {
            if (this.dict[i].key == _key) {
              return this.dict[i].value;
              return this.dict[i].value
            }
          }
        } catch (e) {
          return null;
          return null
        }
      },
      // 设置字典
@@ -26,27 +26,27 @@
          this.dict.push({
            key: _key,
            value: value
          });
          })
        }
      },
      // 删除字典
      removeDict(_key) {
        var bln = false;
        var bln = false
        try {
          for (let i = 0; i < this.dict.length; i++) {
            if (this.dict[i].key == _key) {
              this.dict.splice(i, 1);
              return true;
              this.dict.splice(i, 1)
              return true
            }
          }
        } catch (e) {
          bln = false;
          bln = false
        }
        return bln;
        return bln
      },
      // 清空字典
      cleanDict() {
        this.dict = new Array();
        this.dict = new Array()
      },
      // 初始字典
      initDict() {