{"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\\HtGangedSelect.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\cssc-fvue\\src\\components\\control\\HtGangedSelect.vue","mtime":1667804638790},{"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/es6.regexp.constructor\";\nimport \"core-js/modules/es6.regexp.replace\";\nimport \"core-js/modules/web.dom.iterable\";\nimport \"core-js/modules/es6.regexp.search\";\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//\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-gangedSelect\",\n props: [\"validate\", \"value\", \"name\", \"permission\", \"ganged\", \"tooltipplacement\"],\n data: function data() {\n return {\n inputValnew: \"\",\n options: [],\n config: {},\n total: 10,\n inputVal: \"\",\n pageSize: 5,\n currentPage: 1\n };\n },\n watch: {\n inputVal: function inputVal(newVal, oldVal) {\n this.$emit(\"input\", newVal.label);\n }\n },\n computed: {\n inputWriteable: function inputWriteable() {\n var getWriteable = utils.getWriteable(this.permission);\n return getWriteable;\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.$refs.select.$refs.reference.$refs.input.onblur = () => {\n // this.search();\n // };\n var _me = this;\n\n var bind = this.ganged.bind;\n\n if (bind && this.config) {\n var formVm = utils.getOnlineFormInstance(_me);\n var keys = \"\";\n\n for (var key in bind) {\n keys = key;\n }\n\n formVm.$watch(_me.ganged.bind[key], function (newVal, oldVal) {\n var _this2 = this;\n\n var _loop = function _loop() {\n var pInst = utils.getOnlineFormInstance(_me);\n var val = utils.getValueByPath(pInst, bind[key]);\n\n _this2.$store.dispatch(\"form/getByAliasCq\", _me.ganged.alias).then(function (res) {\n _me.config = res;\n\n _me.search(false, val);\n });\n };\n\n for (var key in bind) {\n _loop();\n }\n }, {\n deep: true\n });\n }\n },\n created: function created() {\n if (this.value) {\n this.inputVal = this.value;\n }\n\n this.$validator = this.$root.$validator;\n },\n methods: {\n clickNative: function clickNative() {\n var _this3 = this;\n\n if (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 handleCurrentChange: function handleCurrentChange(currentPage) {\n this.currentPage = currentPage;\n this.search(currentPage);\n },\n search: function search(currentPage, param) {\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 _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.label = m[ganged.labelBind];\n }\n\n _this.options.push(option);\n });\n });\n },\n binda: function binda(item) {\n var subIndex = null;\n\n if (this.$el) {\n subIndex = utils.getSomeAttributeFromParentElement(this.$el, \"data-index\");\n }\n\n var _me = this;\n\n var exp = utils.parseToJson(this.ganged.gangedBind);\n var pInst = utils.getOnlineFormInstance(_me);\n\n if (exp && exp[this.ganged.labelBind]) {\n utils.setValueByPath(pInst, \"data.\" + exp[this.ganged.labelBind], item.label, subIndex);\n }\n\n if (exp && exp[this.ganged.valueBind]) {\n utils.setValueByPath(pInst, \"data.\" + exp[this.ganged.valueBind], item.value, subIndex);\n }\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 }\n};",null]}