{"remainingRequest":"D:\\jenkins\\workspace\\cssc-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\cssc-fvue\\src\\components\\eipControl\\EipTag.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\cssc-fvue\\src\\components\\eipControl\\EipTag.vue","mtime":1667804639118},{"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\r\nimport utils from '@/hotent-ui-util.js';\r\nimport portal from '@/api/portal.js';\r\nimport sub_pio_mixin from '@/sub-permission-mixin.js';\r\nimport hotentUiUtils from '@/hotent-ui-util.js';\r\n\r\nexport default {\r\n name: 'eip-tag',\r\n props: {\r\n filterable: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n expand: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n tagKey: String,\r\n value: String,\r\n permission: String | Object,\r\n multiple: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n },\r\n mixins: [sub_pio_mixin], //混入方式引入表单组件中公共属性,处理子表、孙表行内联动(切面修改permission_sub_sub)\r\n data() {\r\n return {\r\n options: [],\r\n pagination: {\r\n pageSize: 5,\r\n page: 1,\r\n total: 0,\r\n },\r\n loading: false,\r\n currentQuery: '',\r\n values: [],\r\n writeable:true,\r\n };\r\n },\r\n methods: {\r\n focusSelectValue() {\r\n if (this.$refs.fuzzySearch.$refs.input) {\r\n this.$refs.fuzzySearch.$refs.input.blur = () => {\r\n this.currentQuery = '';\r\n this.search();\r\n };\r\n }\r\n },\r\n visibleChange(flag) {\r\n //单选时输入框关闭时重新搜索内容\r\n if (!flag && !this.multiple) {\r\n this.currentQuery = '';\r\n this.search();\r\n }\r\n },\r\n remoteMethod(query) {\r\n this.currentQuery = query;\r\n let param = {\r\n pageBean: this.pagination,\r\n querys: [{ property: 'type_key_', value: this.tagKey, group: 'query', operation: 'EQUAL', relation: 'AND' }],\r\n };\r\n if (query) {\r\n param.querys.push({ property: 'name_', value: query, group: 'query', operation: 'LIKE', relation: 'AND' });\r\n }\r\n this.loading = true;\r\n portal\r\n .getTagList(param)\r\n .then((data) => {\r\n this.options = data.rows;\r\n this.pagination = {\r\n pageSize: data.pageSize,\r\n page: data.page,\r\n total: data.total,\r\n };\r\n })\r\n .finally(() => {\r\n this.loading = false;\r\n });\r\n },\r\n currentChange(page) {\r\n this.pagination.page = page;\r\n this.remoteMethod(this.currentQuery);\r\n },\r\n add() {\r\n let param = {\r\n name: this.currentQuery,\r\n typeKey: this.tagKey,\r\n };\r\n portal.saveTag(param).then((data) => {\r\n if (data.state) {\r\n this.$message({ type: 'success', message: '添加成功' });\r\n this.remoteMethod(this.currentQuery);\r\n }\r\n });\r\n },\r\n search() {\r\n let param = {\r\n pageBean: this.pagination,\r\n querys: [{ property: 'type_key_', value: this.tagKey, group: 'query', operation: 'EQUAL', relation: 'AND' }],\r\n };\r\n portal.getTagList(param).then((data) => {\r\n this.options = data.rows;\r\n this.pagination = {\r\n pageSize: data.pageSize,\r\n page: data.page,\r\n total: data.total,\r\n };\r\n });\r\n if (this.value) {\r\n this.values = this.value.split(',');\r\n }\r\n },\r\n },\r\n mounted() {\r\n const { subScopeEl, index } = hotentUiUtils.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 this.search();\r\n },\r\n computed: {\r\n inputName: function() {\r\n let labeldesc = \"\";\r\n if (\r\n this.$slots &&\r\n this.$slots.labeldesc &&\r\n this.$slots.labeldesc[0].children &&\r\n this.$slots.labeldesc[0].children[0].text\r\n ) {\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 inputValidate: function() {\r\n return utils.addRequiredOrNot(this.permission, this.validate, this);\r\n },\r\n inputWriteable: function () {\r\n if(!this.writeable){\r\n return this.writeable;\r\n }\r\n return utils.getWriteable(this.permission_sub);\r\n },\r\n inputVal: {\r\n set(value) {\r\n if (value && this.multiple) {\r\n this.$emit('input', value.join(','));\r\n } else {\r\n this.$emit('input', value);\r\n }\r\n },\r\n get() {\r\n if (this.value && this.multiple) {\r\n this.values = this.value.split(',');\r\n return this.value.split(',');\r\n }\r\n return this.value;\r\n },\r\n },\r\n },\r\n created() {\r\n this.$validator = this.$root.$validator;\r\n },\r\n};\r\n",null]}