d317fee00c20caf7453db8d2b2c46fcd.json 9.9 KB

1
  1. {"remainingRequest":"D:\\HTC\\program\\善行少年\\security-enterprise-admin\\node_modules\\babel-loader\\lib\\index.js!D:\\HTC\\program\\善行少年\\security-enterprise-admin\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\HTC\\program\\善行少年\\security-enterprise-admin\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\HTC\\program\\善行少年\\security-enterprise-admin\\src\\components\\ren-region-tree\\src\\ren-region-tree.vue?vue&type=script&lang=js","dependencies":[{"path":"D:\\HTC\\program\\善行少年\\security-enterprise-admin\\src\\components\\ren-region-tree\\src\\ren-region-tree.vue","mtime":1581948664000},{"path":"D:\\HTC\\program\\善行少年\\security-enterprise-admin\\babel.config.js","mtime":1581948662000},{"path":"D:\\HTC\\program\\善行少年\\security-enterprise-admin\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\HTC\\program\\善行少年\\security-enterprise-admin\\node_modules\\babel-loader\\lib\\index.js","mtime":456789000000},{"path":"D:\\HTC\\program\\善行少年\\security-enterprise-admin\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\HTC\\program\\善行少年\\security-enterprise-admin\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/es6.function.name\";\nimport \"core-js/modules/es6.number.constructor\";\nimport { treeDataTranslate } from '@/utils';\nexport default {\n name: 'RenRegionTree',\n data: function data() {\n return {\n filterText: '',\n visibleTree: false,\n dataList: [],\n showName: '',\n expandedKeys: null,\n defaultProps: {\n children: 'children',\n label: 'name'\n }\n };\n },\n props: {\n value: [Number, String],\n parentName: String,\n placeholder: String\n },\n watch: {\n filterText: function filterText(val) {\n this.$refs.tree.filter(val);\n },\n parentName: function parentName(val) {\n this.showName = val;\n }\n },\n methods: {\n treeDialog: function treeDialog() {\n this.expandedKeys = null;\n if (this.$refs.tree) {\n this.$refs.tree.setCurrentKey(null);\n }\n this.visibleTree = true;\n this.getDataList(this.value);\n },\n filterNode: function filterNode(value, data) {\n if (!value) return true;\n return data.name.indexOf(value) !== -1;\n },\n getDataList: function getDataList(id) {\n var _this = this;\n return this.$http.get('/sys/region/tree').then(function (_ref) {\n var res = _ref.data;\n if (res.code !== 0) {\n return _this.$message.error(res.msg);\n }\n _this.dataList = treeDataTranslate(res.data);\n _this.$nextTick(function () {\n _this.$refs.tree.setCurrentKey(id);\n _this.expandedKeys = [id];\n });\n }).catch(function () {});\n },\n cancelHandle: function cancelHandle() {\n this.visibleTree = false;\n this.dataList = [];\n this.filterText = '';\n },\n clearHandle: function clearHandle() {\n this.$emit('input', '0');\n this.$emit('update:parentName', '');\n this.showName = '';\n this.visibleTree = false;\n this.dataList = [];\n this.filterText = '';\n },\n commitHandle: function commitHandle() {\n var node = this.$refs.tree.getCurrentNode();\n if (!node) {\n this.$message.error(this.$t('choose'));\n return;\n }\n this.$emit('input', node.id);\n this.$emit('update:parentName', node.name);\n this.showName = node.name;\n this.visibleTree = false;\n this.dataList = [];\n this.filterText = '';\n }\n }\n};",{"version":3,"names":["treeDataTranslate","name","data","filterText","visibleTree","dataList","showName","expandedKeys","defaultProps","children","label","props","value","Number","String","parentName","placeholder","watch","val","$refs","tree","filter","methods","treeDialog","setCurrentKey","getDataList","filterNode","indexOf","id","_this","$http","get","then","_ref","res","code","$message","error","msg","$nextTick","catch","cancelHandle","clearHandle","$emit","commitHandle","node","getCurrentNode","$t"],"sources":["src/components/ren-region-tree/src/ren-region-tree.vue"],"sourcesContent":["<template>\r\n <div class=\"ren-region\">\r\n <el-input v-model=\"showName\" :placeholder=\"placeholder\" @focus=\"treeDialog\">\r\n <el-button slot=\"append\" icon=\"el-icon-search\" @click=\"treeDialog\"></el-button>\r\n </el-input>\r\n <el-input :value=\"value\" style=\"display: none\"></el-input>\r\n <el-dialog :visible.sync=\"visibleTree\" width=\"360px\" :modal=\"false\" :title=\"placeholder\" :close-on-click-modal=\"false\" :close-on-press-escape=\"false\">\r\n <el-form size=\"mini\" :inline=\"true\">\r\n <el-form-item :label=\"$t('keyword')\">\r\n <el-input v-model=\"filterText\"></el-input>\r\n </el-form-item>\r\n <el-form-item>\r\n <el-button type=\"default\">{{ $t('query') }}</el-button>\r\n </el-form-item>\r\n </el-form>\r\n <el-tree\r\n class=\"filter-tree\"\r\n :data=\"dataList\"\r\n :default-expanded-keys=\"expandedKeys\"\r\n :props=\"{ label: 'name', children: 'children' }\"\r\n :expand-on-click-node=\"false\"\r\n :filter-node-method=\"filterNode\"\r\n :highlight-current=\"true\"\r\n node-key=\"id\"\r\n ref=\"tree\">\r\n </el-tree>\r\n <template slot=\"footer\">\r\n <el-button type=\"default\" @click=\"cancelHandle()\" size=\"mini\">{{ $t('cancel') }}</el-button>\r\n <el-button type=\"info\" @click=\"clearHandle()\" size=\"mini\">{{ $t('clear') }}</el-button>\r\n <el-button type=\"primary\" @click=\"commitHandle()\" size=\"mini\">{{ $t('confirm') }}</el-button>\r\n </template>\r\n </el-dialog>\r\n </div>\r\n</template>\r\n<style lang=\"scss\">\r\n.ren-region {\r\n .filter-tree {\r\n max-height: 230px;\r\n overflow: auto;\r\n }\r\n .el-dialog__body {\r\n padding: 0px 0px 0px 20px;\r\n }\r\n .el-dialog__footer {\r\n padding: 10px 20px 8px 20px;\r\n }\r\n}\r\n</style>\r\n<script>\r\nimport { treeDataTranslate } from '@/utils'\r\nexport default {\r\n name: 'RenRegionTree',\r\n data () {\r\n return {\r\n filterText: '',\r\n visibleTree: false,\r\n dataList: [],\r\n showName: '',\r\n expandedKeys: null,\r\n defaultProps: {\r\n children: 'children',\r\n label: 'name'\r\n }\r\n }\r\n },\r\n props: {\r\n value: [Number, String],\r\n parentName: String,\r\n placeholder: String\r\n },\r\n watch: {\r\n filterText (val) {\r\n this.$refs.tree.filter(val)\r\n },\r\n parentName (val) {\r\n this.showName = val\r\n }\r\n },\r\n methods: {\r\n treeDialog () {\r\n this.expandedKeys = null\r\n if (this.$refs.tree) {\r\n this.$refs.tree.setCurrentKey(null)\r\n }\r\n this.visibleTree = true\r\n this.getDataList(this.value)\r\n },\r\n filterNode (value, data) {\r\n if (!value) return true\r\n return data.name.indexOf(value) !== -1\r\n },\r\n getDataList (id) {\r\n return this.$http.get('/sys/region/tree').then(({ data: res }) => {\r\n if (res.code !== 0) {\r\n return this.$message.error(res.msg)\r\n }\r\n this.dataList = treeDataTranslate(res.data)\r\n this.$nextTick(() => {\r\n this.$refs.tree.setCurrentKey(id)\r\n this.expandedKeys = [id]\r\n })\r\n }).catch(() => {})\r\n },\r\n cancelHandle () {\r\n this.visibleTree = false\r\n this.dataList = []\r\n this.filterText = ''\r\n },\r\n clearHandle () {\r\n this.$emit('input', '0')\r\n this.$emit('update:parentName', '')\r\n this.showName = ''\r\n this.visibleTree = false\r\n this.dataList = []\r\n this.filterText = ''\r\n },\r\n commitHandle () {\r\n const node = this.$refs.tree.getCurrentNode()\r\n if (!node) {\r\n this.$message.error(this.$t('choose'))\r\n return\r\n }\r\n this.$emit('input', node.id)\r\n this.$emit('update:parentName', node.name)\r\n this.showName = node.name\r\n this.visibleTree = false\r\n this.dataList = []\r\n this.filterText = ''\r\n }\r\n }\r\n}\r\n</script>\r\n"],"mappings":";;AAiDA,SAAAA,iBAAA;AACA;EACAC,IAAA;EACAC,IAAA,WAAAA,KAAA;IACA;MACAC,UAAA;MACAC,WAAA;MACAC,QAAA;MACAC,QAAA;MACAC,YAAA;MACAC,YAAA;QACAC,QAAA;QACAC,KAAA;MACA;IACA;EACA;EACAC,KAAA;IACAC,KAAA,GAAAC,MAAA,EAAAC,MAAA;IACAC,UAAA,EAAAD,MAAA;IACAE,WAAA,EAAAF;EACA;EACAG,KAAA;IACAd,UAAA,WAAAA,WAAAe,GAAA;MACA,KAAAC,KAAA,CAAAC,IAAA,CAAAC,MAAA,CAAAH,GAAA;IACA;IACAH,UAAA,WAAAA,WAAAG,GAAA;MACA,KAAAZ,QAAA,GAAAY,GAAA;IACA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