{"remainingRequest":"D:\\jenkins\\workspace\\cssc-fvue\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\cssc-fvue\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\cssc-fvue\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\cssc-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\cssc-fvue\\src\\components\\control\\HtTreeselect.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\cssc-fvue\\src\\components\\control\\HtTreeselect.vue","mtime":1667804638805},{"path":"D:\\jenkins\\workspace\\cssc-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\cssc-fvue\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\cssc-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\cssc-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\cssc-fvue\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/es7.symbol.async-iterator\";\nimport \"core-js/modules/es6.symbol\";\nimport \"core-js/modules/es6.string.iterator\";\nimport \"core-js/modules/es6.array.from\";\nimport \"core-js/modules/es6.regexp.to-string\";\nimport \"core-js/modules/es6.regexp.constructor\";\nimport \"core-js/modules/es6.regexp.replace\";\nimport \"core-js/modules/es6.regexp.split\";\nimport \"core-js/modules/es6.regexp.search\";\nimport \"core-js/modules/web.dom.iterable\";\nimport \"core-js/modules/es6.function.name\";\n\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === \"undefined\" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\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 utils from \"@/utils.js\";\nexport default {\n name: \"ht-select\",\n props: [\"validate\", \"value\", \"name\", \"permission\", \"multiple\", \"selectlist\", \"linkage\", \"ganged\", \"tooltipplacement\", \"filterable\", \"allowCreate\", \"styles\"],\n data: function data() {\n return {\n inputVal: [],\n inputValnew: \"\",\n config: {},\n total: 10,\n pageSize: 5,\n currentPage: 1,\n options: [],\n tempoptions: [],\n defaultProps: {\n children: \"children\",\n label: \"value\"\n }\n };\n },\n watch: {\n inputVal: function inputVal(newVal, oldVal) {\n this.$emit(\"input\", newVal);\n }\n },\n computed: {\n inputWriteable: function inputWriteable() {\n return utils.getWriteable(this.permission);\n },\n inputValidate: function inputValidate() {\n var validateObj = this.$store.state.index.validate;\n return utils.addRequiredOrNot(this.permission, 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 },\n mounted: function mounted() {\n this.options = this.selectlist ? this.selectlist : [];\n\n var _me = this;\n\n var exp = this.linkage;\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 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 _me.$store.dispatch(\"index/linkageValidate\", ef);\n\n utils.setValueByPath(pInst, p, val);\n });\n }\n }, {\n immediate: true\n });\n });\n }\n\n var ganged = this.ganged; //判断是否有参数绑定\n\n if (ganged && ganged.bind && this.config) {\n var bind = ganged.bind;\n var formVm = utils.getOnlineFormInstance(_me);\n formVm.$watch(\"data\", function (newVal, oldVal) {\n for (var key in bind) {\n var _pInst = utils.getOnlineFormInstance(_me);\n\n var val = utils.getValueByPath(_pInst, bind[key]);\n\n _me.search(false, val);\n }\n }, {\n deep: true\n });\n } //回显\n\n\n if (this.inputVal && this.inputVal.constructor == Array && this.inputVal.length > 0 && this.inputValnew == \"\" && this.selectlist) {\n var inputValArr = [];\n\n if (!(this.inputVal instanceof Array)) {\n this.inputVal = this.inputVal.split(\",\");\n }\n\n for (var i = 0; i < this.inputVal.length; i++) {\n for (var a = 0; a < this.selectlist.length; a++) {\n if (this.selectlist[a].key == this.inputVal[i]) {\n inputValArr.push(this.selectlist[a].value);\n break;\n }\n }\n }\n\n this.inputValnew = inputValArr.join(\",\");\n } else {\n if (this.inputVal && this.inputVal.length > 0 && this.inputVal instanceof Array) {\n this.inputVal = this.inputVal.split(\",\");\n } else {\n this.inputValnew = this.inputVal;\n }\n\n if (this.inputVal != \"\" && this.options.length != 0) {\n for (var _i = 0; _i < this.options.length; _i++) {\n if (this.options[_i].key == this.inputVal) {\n this.inputValnew = this.options[_i].value;\n break;\n }\n }\n }\n }\n },\n created: function created() {\n var _this2 = this;\n\n this.options = this.selectlist ? this.selectlist : []; //动态传入\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 _this2.search();\n });\n }\n\n if (this.value && this.value.indexOf(\"[\") == 0) {\n var selectVal = this.value.substr(0, this.value.length - 1);\n selectVal = selectVal.substr(1);\n\n if (selectVal === \"\") {\n this.inputVal = selectVal;\n return;\n }\n\n var selectVal2 = selectVal.split(\",\");\n var selectValnew = [];\n\n for (var i = 0; i < selectVal2.length; i++) {\n selectValnew.push(selectVal2[i].trim());\n }\n\n this.inputVal = selectValnew;\n } else {\n this.inputVal = this.value;\n }\n\n this.$validator = this.$root.$validator;\n },\n methods: {\n clear: function clear() {\n if (this.multiple) {\n this.tempoptions = [];\n this.$nextTick(function () {\n this.$refs.treeselectElTree.setCheckedKeys([], true);\n });\n } else {\n this.$refs.treeselectElTree.setCurrentNode({});\n }\n },\n clickNative: function clickNative() {\n var _this3 = this;\n\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 _this3.config = res;\n\n _this3.search();\n });\n }\n },\n selectBlur: function selectBlur(val) {\n this.search();\n },\n handleCheckChange: function handleCheckChange(data) {\n var checkedNodes = this.$refs.treeselectElTree.getCheckedNodes();\n this.inputVal = [];\n this.tempoptions = checkedNodes;\n\n var _iterator = _createForOfIteratorHelper(checkedNodes),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var _data = _step.value;\n this.inputVal.push(_data.key);\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n },\n handleNodeClick: function handleNodeClick(data) {\n var _this4 = this;\n\n if (!this.multiple) {\n this.inputVal = data.value;\n this.$refs.treeselect.blur();\n setTimeout(function () {\n _this4.$validator.validate();\n });\n }\n },\n filterNode: function filterNode(value, data) {\n if (!value) return true;\n return data.value.indexOf(value) !== -1;\n },\n filterMethod: function filterMethod(query) {\n this.$refs.treeselectElTree.filter(query);\n },\n remoteMethod: function remoteMethod(val) {\n if (val) {\n this.search(false, val);\n } else {\n this.param = \"\";\n this.search();\n }\n },\n handleCurrentChange: function handleCurrentChange(currentPage) {\n this.currentPage = currentPage;\n this.search(currentPage);\n },\n search: function search(currentPage, param) {\n var _this5 = this;\n\n if (!this.config) return;\n var str = this.config;\n\n var _this = this;\n\n var ganged = this.ganged;\n this.pageSize = str.pageSize; // if(str.needPage === 1){\n\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 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 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 } else {}\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 if (_this5.config && _this5.config.dsType === \"restful\") {\n _this.options = res.rows;\n return;\n }\n\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.key = m[ganged.valueBind];\n }\n\n if (_this.ganged.labelBind) {\n option.value = m[ganged.labelBind];\n }\n\n _this.options.push(option);\n });\n\n for (var i = 0; i < _this.options.length; i++) {\n if (_this.inputValnew == _this.options[i].key) {\n _this.inputValnew = _this.options[i].value;\n break;\n }\n }\n });\n }\n }\n};",null]}