{"remainingRequest":"D:\\jenkins\\workspace\\cssc-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\cssc-fvue\\src\\components\\eipControl\\EipDic.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\cssc-fvue\\src\\components\\eipControl\\EipDic.vue","mtime":1667804639071},{"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":["//\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 sub_pio_mixin from \"@/sub-permission-mixin.js\";\r\nexport default {\r\n name: \"eip-dic\",\r\n props: [\"validate\", \"value\", \"name\", \"permission\", \"dickey\", \"bind\",\"styles\",\r\n \"filterable\"],\r\n mixins: [sub_pio_mixin],//混入方式引入表单组件中公共属性,处理子表、孙表行内联动(切面修改permission_sub_sub)\r\n data() {\r\n return {\r\n selectlist: [],\r\n defaultProps: {\r\n children: \"children\",\r\n label: \"name\"\r\n },\r\n valueDesc:'',\r\n tagFormatValue: [],\r\n newValidate:null,\r\n writeable: true,\r\n };\r\n },\r\n computed: {\r\n inputVal: {\r\n get: function() {\r\n if(utils.isEmpty(this.value)){\r\n return \"\";\r\n }\r\n return this.value;\r\n },\r\n set: function(val) {\r\n this.$emit(\"input\", val);\r\n }\r\n },\r\n inputWriteable: function() {\r\n return this.writeable ? utils.getWriteable(this.permission_sub):this.writeable;\r\n },\r\n inputValidate: function() {\r\n if(this.newValidate){\r\n return this.newValidate;\r\n }\r\n var validateObj = this.$store.state.index.validate;\r\n return utils.addRequiredOrNot(\r\n this.permission_sub,\r\n this.validate,\r\n validateObj,\r\n this\r\n );\r\n },\r\n inputName: function() {\r\n let labeldesc = \"\";\r\n if(this.$slots && this.$slots.labeldesc && this.$slots.labeldesc[0].children && this.$slots.labeldesc[0].children[0].text){\r\n labeldesc = this.$slots.labeldesc[0].children[0].text;\r\n return this.name ? this.name : utils.getName()+ \"-\" +labeldesc;\r\n }else{\r\n return this.name ? this.name : utils.getName();\r\n }\r\n }\r\n },\r\n methods: {\r\n clear() {\r\n this.filterMethod('');\r\n this.$emit(\"input\", '');\r\n // this.$refs.elTree.setCurrentNode({});\r\n },\r\n handleNodeClick(data) {\r\n this.inputVal = data.key;\r\n this.valueDesc = data.name;\r\n this.$refs.elSelect.blur();\r\n setTimeout(() => {\r\n this.$validator.validate();\r\n });\r\n },\r\n\tfilterNode(value, data) {\r\n\t\tif (!value) return true;\r\n\t\treturn data.name.indexOf(value) !== -1;\r\n },\r\n findDesc(list) {\r\n\t\tif (list && list.length >0) {\r\n list.forEach(l => {\r\n if (l.key == this.value ) {\r\n this.valueDesc = l.name;\r\n return ;\r\n }\r\n if (l.children) {\r\n this.findDesc(l.children);\r\n }\r\n });\r\n }\r\n\t},\r\n\tfilterMethod(query) {\r\n\t\tthis.$refs.elTree.filter(query);\r\n\t}\r\n },\r\n mounted() {\r\n if (this.dickey) {\r\n this.$store\r\n .dispatch(\"menu/getByTypeKeyForComBo\", this.dickey)\r\n .then(res => {\r\n this.selectlist = res;\r\n if ( this.value !== null && this.value !== undefined ) {\r\n this.findDesc(res);\r\n }\r\n });\r\n }\r\n\r\n const _me = this;\r\n const exp = this.bind;\r\n if (exp) {\r\n const pInst = utils.getOnlineFormInstance(_me);\r\n\r\n _me.$watch(\"inputVal\", function(newVal, oldVal) {\r\n if (newVal !== oldVal) {\r\n utils.setValueByPath(pInst, exp, newVal);\r\n }\r\n });\r\n }\r\n\r\n const { subScopeEl, index } = utils.getSubScopeElAndIndex(this.$el);\r\n if (subScopeEl && (subScopeEl.getAttribute(\"row_readonly\") == 'true' || subScopeEl.getAttribute(\"row_readonly\") === true)) {\r\n this.writeable = false;\r\n }\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};\r\n",null]}