{"remainingRequest":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\xq-web-bpm\\src\\components\\selector\\EipBoSelector.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\src\\components\\selector\\EipBoSelector.vue","mtime":1675071992225},{"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":["//\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\r\nimport utils from \"@/hotent-ui-util.js\";\r\nimport { setTimeout } from \"timers\";\r\nconst eipBoDialog = () => import(\"@/components/dialog/EipBoDialog.vue\");\r\n\r\nexport default {\r\n name: \"eip-bo-selector\",\r\n props: {\r\n validate: [String, Object],\r\n value: [String,Object,Array],\r\n name: String,\r\n placeholder: {\r\n type: String,\r\n default: \"请输入内容\"\r\n },\r\n permission: {\r\n type: String,\r\n default: \"w\",\r\n validator: function(value) {\r\n return [\"b\", \"w\", \"r\", \"n\"].indexOf(value) !== -1;\r\n }\r\n },\r\n single: {\r\n type: Boolean,\r\n default: false\r\n },\r\n config: Object,\r\n data: {\r\n type: Array,\r\n default: () => {\r\n return [];\r\n }\r\n },\r\n appendToBody: {\r\n type: Boolean,\r\n default: false\r\n }\r\n },\r\n components: {\r\n eipBoDialog\r\n },\r\n data() {\r\n return {\r\n inputName: null,\r\n inputSuffixHeight: 30,\r\n description:\"\",\r\n selectors: [],\r\n dialogVisible: false,\r\n currentDemension: null\r\n };\r\n },\r\n computed: {\r\n inputWriteable: function() {\r\n return utils.getWriteable(this.permission);\r\n },\r\n inputValidate: function() {\r\n return utils.addRequiredOrNot(this.permission, this.validate, this);\r\n }\r\n },\r\n watch: {\r\n // 当所选择的数据发生变化时,同步到v-model中\r\n selectors: function(newVal) {\r\n if(newVal && newVal.length>=0 && newVal[0] && newVal[0].description ){\r\n this.description = newVal[0].description;\r\n }else{\r\n this.description = \"\";\r\n }\r\n }\r\n },\r\n mounted() {\r\n // 组件第一次挂载时,同步value到当前所选数据中\r\n },\r\n created() {\r\n this.inputName = this.name ? this.name : utils.getName();\r\n this.$validator = this.$root.$validator;\r\n },\r\n methods: {\r\n showDialog() {\r\n if (!this.inputWriteable) {\r\n return;\r\n }\r\n this.$refs.eipBoDialog.showDialog(this.selectors);\r\n },\r\n handleClose(done) {\r\n this.$refs.eipBoDialog.handleClose();\r\n done && done();\r\n },\r\n handleDialogSure(data) {\r\n this.selectors = data;\r\n this.$emit(\"input\",this.selectors);\r\n this.handleClose();\r\n },\r\n handleDialogCancel() {\r\n this.handleClose();\r\n },\r\n handleRemove(item) {\r\n this.selectors.remove(item);\r\n },\r\n clear() {\r\n this.selectors = [];\r\n },\r\n // 更新当前输入框的高度来适配已选数据的高度\r\n calacInputSuffixHeight() {\r\n if (!this.$refs.tagSpans) return;\r\n if (this.$refs.tagSpans.offsetHeight) {\r\n this.inputSuffixHeight = this.$refs.tagSpans.offsetHeight + 5;\r\n } else {\r\n this.inputSuffixHeight = 30;\r\n }\r\n }\r\n }\r\n};\r\n",null]}