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