{"remainingRequest":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\xq-web-bpm\\src\\components\\dict\\DictSelect.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\src\\components\\dict\\DictSelect.vue","mtime":1675071991756},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/web.dom.iterable\";\nimport _toConsumableArray from \"D:/jenkins/workspace/xq-web-bpm/node_modules/@babel/runtime/helpers/esm/toConsumableArray\";\nimport \"core-js/modules/es6.regexp.to-string\";\nimport \"core-js/modules/es6.number.constructor\";\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nimport dictUtils from \"./DictSelectUtils\";\nexport default {\n  name: 'DictSelect',\n  props: {\n    dictCode: String,\n    placeholder: String,\n    triggerChange: Boolean,\n    disabled: Boolean,\n    value: [String, Number, Array],\n    type: String,\n    dictCodeName: Array,\n    isShowInbody: {\n      type: Boolean,\n      default: false\n    },\n    needLabel: Boolean,\n    // 将值和文本都返回\n    hasDefaultOption: {\n      type: Boolean,\n      default: false\n    },\n    // 请选择的默认项,\n    validate: [String, Object],\n    clearable: Boolean,\n    size: String,\n    readonly: {\n      type: Boolean,\n      default: false\n    },\n    permission: {\n      type: String,\n      default: \"w\",\n      validator: function validator(value) {\n        return [\"b\", \"w\", \"r\", \"n\"].indexOf(value) !== -1;\n      }\n    }\n  },\n  data: function data() {\n    return {\n      dictOptions: [],\n      tagType: ''\n    };\n  },\n  watch: {\n    dictCode: {\n      immediate: true,\n      handler: function handler() {\n        this.initDictData();\n      }\n    }\n  },\n  created: function created() {\n    if (!this.type || this.type === 'list') {\n      this.tagType = 'select';\n    } else {\n      this.tagType = this.type;\n    }\n  },\n  computed: {\n    getValue: function getValue() {\n      if (this.type != 'cascader') {\n        return this.value != null ? this.value.toString() : null;\n      } else {\n        return this.value;\n      }\n    }\n  },\n  methods: {\n    focus: function focus() {\n      this.$refs.selectDict.focus();\n    },\n    reloadDict: function reloadDict() {\n      this.initDictData();\n    },\n    initDictData: function initDictData() {\n      if (dictUtils.getDictItemsFromCache(this.dictCode)) {\n        var dictItems = dictUtils.getDictItemsFromCache(this.dictCode);\n\n        if (this.type == 'cascader') {\n          // 级联\n          this.dictOptions = this.formatDictOptions(dictItems, this.dictCodeName[0]);\n        } else {\n          this.dictOptions = dictItems;\n\n          if (this.hasDefaultOption && this.tagType == \"select\") {\n            this.dictOptions.unshift({\n              value: \"请选择\",\n              key: undefined\n            });\n          }\n        }\n      }\n    },\n    // 如果是级联字典,处理字典数据结构\n    formatDictOptions: function formatDictOptions(options, dictName) {\n      var _this = this;\n\n      var tempOpt = _toConsumableArray(options);\n\n      tempOpt.forEach(function (item) {\n        if (item.lowerDic && item.lowerDic[dictName]) {\n          item.children = item.lowerDic[dictName];\n\n          _this.formatDictOptions(item.children, _this.dictCodeName[1]);\n        }\n      }); // console.log(tempOpt, \"tempOpt\");\n\n      return tempOpt;\n    },\n    handleInput: function handleInput(val, selectObj) {\n      this.$emit('input', val, selectObj);\n    },\n    setCurrentDictOptions: function setCurrentDictOptions(dictOptions) {\n      this.dictOptions = dictOptions;\n    },\n    getCurrentDictOptions: function getCurrentDictOptions() {\n      return this.dictOptions;\n    }\n  }\n};",null]}