{"remainingRequest":"D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\xq-web-fvue\\src\\components\\eipControl\\EipAutocomplete.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\src\\components\\eipControl\\EipAutocomplete.vue","mtime":1667327529200},{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\babel.config.js","mtime":1667327525434},{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/es6.regexp.constructor\";\nimport \"core-js/modules/es6.regexp.replace\";\nimport \"core-js/modules/es6.regexp.search\";\nimport \"core-js/modules/web.dom.iterable\";\nimport \"core-js/modules/es6.function.name\";\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nimport utils from \"@/utils.js\";\nimport hotentUiUtils from '@/hotent-ui-util.js';\nimport sub_pio_mixin from \"@/sub-permission-mixin.js\";\nexport default {\n  name: \"eip-autocomplete\",\n  props: [\"validate\", \"value\", \"name\", \"permission\", \"autoTiplist\", \"linkage\", \"ganged\", \"styles\", \"placeholder\"],\n  mixins: [sub_pio_mixin],\n  //混入方式引入表单组件中公共属性，处理子表、孙表行内联动（切面修改permission_sub）\n  data: function data() {\n    return {\n      inputValnew: \"\",\n      options: [],\n      config: {},\n      newValidate: null,\n      writeable: true\n    };\n  },\n  computed: {\n    inputVal: {\n      get: function get() {\n        return this.value;\n      },\n      set: function set(val) {\n        this.$emit(\"input\", val);\n      }\n    },\n    inputWriteable: function inputWriteable() {\n      if (!this.writeable) {\n        return this.writeable;\n      }\n\n      var getWriteable = utils.getWriteable(this.permission_sub);\n\n      if (!getWriteable && this.inputVal.length > 0) {\n        var inputValArr = [];\n\n        if (this.inputVal && this.options.length > 0) {\n          for (var a = 0; a < this.options.length; a++) {\n            if (this.options[a].key == this.inputVal) {\n              inputValArr.push(this.options[a].value);\n              break;\n            }\n          }\n        }\n\n        this.inputValnew = inputValArr.join(\",\");\n      }\n\n      return getWriteable;\n    },\n    inputValidate: function inputValidate() {\n      if (this.newValidate) {\n        return this.newValidate;\n      }\n\n      var validateObj = this.$store.state.index.validate;\n      return utils.addRequiredOrNot(this.permission_sub, this.validate, validateObj, this);\n    },\n    inputName: function inputName() {\n      var labeldesc = \"\";\n\n      if (this.$slots && this.$slots.labeldesc && this.$slots.labeldesc[0].children && this.$slots.labeldesc[0].children[0].text) {\n        labeldesc = this.$slots.labeldesc[0].children[0].text;\n        return this.name ? this.name : utils.getName() + \"-\" + labeldesc;\n      } else {\n        return this.name ? this.name : utils.getName();\n      }\n    },\n    calInputVal: function calInputVal() {\n      return this.inputWriteable ? this.inputValnew : this.inputVal;\n    }\n  },\n  mounted: function mounted() {\n    var _me = this;\n\n    var exp = this.linkage;\n\n    var _hotentUiUtils$getSub = hotentUiUtils.getSubScopeElAndIndex(this.$el),\n        subScopeEl = _hotentUiUtils$getSub.subScopeEl,\n        index = _hotentUiUtils$getSub.index;\n\n    if (subScopeEl && (subScopeEl.getAttribute(\"row_readonly\") == 'true' || subScopeEl.getAttribute(\"row_readonly\") === true)) {\n      this.writeable = false;\n    }\n\n    if (exp && exp.length > 0 && this.$parent.isView) {\n      var pInst = utils.getOnlineFormInstance(_me);\n      _me.traces = {};\n      exp.forEach(function (m) {\n        m.effect.forEach(function (m) {\n          var path = \"permission.fields.\".concat(m.target);\n          var oldVal = utils.getValueByPath(pInst, path);\n          _me.traces[path] = oldVal;\n        });\n\n        _me.$watch(\"inputVal\", function (newVal, oldVal) {\n          m.effect.forEach(function (ef) {\n            var p = \"permission.fields.\".concat(ef.target);\n            var val = _me.traces[p];\n\n            _me.$store.dispatch(\"index/delValidate\", ef);\n\n            utils.setValueByPath(pInst, p, val);\n          });\n\n          if (newVal !== oldVal && m.value === newVal) {\n            m.effect.forEach(function (ef) {\n              _me.$store.dispatch(\"index/delValidate\");\n\n              var p = \"permission.fields.\".concat(ef.target);\n              var val = _me.traces[p];\n\n              if (m.value === newVal) {\n                val = ef.type;\n              }\n\n              if (!_me.inputWriteable) {\n                val = val === \"n\" ? val : \"r\";\n              }\n\n              _me.$store.dispatch(\"index/linkageValidate\", ef);\n\n              utils.setValueByPath(pInst, p, val);\n            });\n          }\n        }, {\n          immediate: true\n        });\n      });\n    }\n  },\n  created: function created() {\n    var _this2 = this;\n\n    this.options = this.autoTiplist ? JSON.parse(this.autoTiplist) : [];\n\n    if (this.ganged && this.ganged.alias && this.options.length < 1) {\n      this.$store.dispatch(\"form/getByAliasCq\", this.ganged.alias).then(function (res) {\n        _this2.config = res;\n      });\n    }\n\n    this.$validator = this.$root.$validator;\n  },\n  methods: {\n    querySearchAsync: function querySearchAsync(queryString, cb) {\n      var options = this.options;\n\n      if (this.ganged && this.ganged.alias) {\n        this.search(1, queryString, cb);\n      } else {\n        var results = queryString ? options.filter(this.createStateFilter(queryString)) : options;\n        cb(results);\n      }\n    },\n    createStateFilter: function createStateFilter(queryString) {\n      return function (state) {\n        return state.value.toLowerCase().indexOf(queryString.toLowerCase()) >= 0;\n      };\n    },\n    handleSelect: function handleSelect(item) {},\n    search: function search(currentPage, param, cb) {\n      if (!this.config) return;\n      var str = this.config;\n\n      var _this = this;\n\n      var ganged = this.ganged;\n      var pageBean = {\n        pageBean: {\n          page: currentPage ? currentPage : 1,\n          pageSize: str.pageSize,\n          showTotal: \"true\"\n        }\n      };\n\n      if (param) {\n        if (str.dsType == \"dataSource\") {\n          var Base64 = require(\"js-base64\").Base64;\n\n          str.currentPage = currentPage ? currentPage : 1;\n\n          if (JSON.stringify(ganged.bind) === \"{}\") {\n            str.queryData = Base64.encode(JSON.stringify([{\n              key: ganged.valueBind,\n              value: param\n            }]));\n          } else {\n            var queryData = [];\n\n            for (var key in ganged.bind) {\n              if (ganged.bind[key]) {\n                var pInst = utils.getOnlineFormInstance(_this);\n                var val = utils.getValueByPath(pInst, ganged.bind[key]);\n\n                if (val) {\n                  queryData.push({\n                    key: key,\n                    value: val\n                  });\n                } else {\n                  queryData.push({\n                    key: key,\n                    value: param\n                  });\n                }\n              }\n            }\n\n            str.queryData = Base64.encode(JSON.stringify(queryData));\n          }\n        } else {\n          var templatePa = this.config.dataParam;\n\n          if (this.config.requestType == \"POST\" && templatePa) {\n            var conditionfield = JSON.parse(str.conditionfield);\n            conditionfield.forEach(function (ele) {\n              var pInst = utils.getOnlineFormInstance(_this);\n              var val = utils.getValueByPath(pInst, ganged.bind[ele.field]);\n\n              if (val) {\n                templatePa = templatePa.replace(new RegExp(\"\\\\{\" + ele.field + \"\\\\}\", \"g\"), val);\n              } else {\n                templatePa = templatePa.replace(new RegExp(\"\\\\{\" + ele.field + \"\\\\}\", \"g\"), param);\n              }\n            });\n          }\n\n          str.pageBean = utils.parseToJson(templatePa);\n        }\n      } else {\n        str.pageBean = pageBean;\n        str.currentPage = currentPage ? currentPage : 1;\n        str.queryData = \"\";\n      } //}\n\n\n      this.$store.dispatch(\"form/selectQuery\", str).then(function (res) {\n        _this.total = res.total;\n        _this.options = [];\n        res.rows.forEach(function (m) {\n          var option = {};\n\n          if (_this.ganged.valueBind) {\n            option.value = m[ganged.valueBind];\n          }\n\n          if (_this.ganged.labelBind) {\n            option.key = m[ganged.labelBind];\n          }\n\n          _this.options.push(option);\n        });\n        cb(_this.options);\n      });\n    }\n  }\n};",null]}