forked from zhurui/management
1 line
12 KiB
JSON
1 line
12 KiB
JSON
{"remainingRequest":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\src\\views\\modules\\building\\building-tree.vue?vue&type=script&lang=js&","dependencies":[{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\src\\views\\modules\\building\\building-tree.vue","mtime":1614735254000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\babel-loader\\lib\\index.js","mtime":499162500000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/es7.object.get-own-property-descriptors\";\nimport \"core-js/modules/web.dom.iterable\";\nimport \"core-js/modules/es6.object.keys\";\nimport _defineProperty from \"C:\\\\Users\\\\27446\\\\Desktop\\\\up\\\\front\\\\dkha-web-sz-main\\\\node_modules\\\\@babel\\\\runtime-corejs2/helpers/esm/defineProperty\";\nimport \"core-js/modules/es6.function.name\";\nimport \"core-js/modules/es6.number.constructor\";\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\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 { 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 buildType: String,\n placeholder: String,\n purpose: 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\n if (this.$refs.tree) {\n this.$refs.tree.setCurrentKey(null);\n }\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\n // id -1全部 0学生宿舍 1教师宿舍 2教学楼\n return this.$http.get('/system/scdormitoryfloor/tree/-1').then(function (_ref) {\n var res = _ref.data;\n\n if (res.code !== 0) {\n return _this.$message.error(res.msg);\n }\n\n var list = res.data.map(function (item) {\n return _objectSpread({}, item, {\n name: item.df_floorname,\n id: item.df_floorid,\n pid: item.df_parentid\n });\n });\n _this.dataList = treeDataTranslate(list); // this.$nextTick(() => {\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.$emit('update:buildType', '');\n this.$emit('update:purpose', '');\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\n if (!node) {\n this.$message.error(this.$t('choose'));\n return;\n }\n\n this.$emit('input', node.id);\n this.$emit('update:parentName', node.name);\n this.$emit('update:buildType', String(node.df_type + 1));\n this.$emit('update:purpose', String(node.df_purpose));\n this.showName = node.name;\n this.visibleTree = false;\n this.dataList = [];\n this.filterText = '';\n }\n }\n};",{"version":3,"sources":["building-tree.vue"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiDA,SAAA,iBAAA,QAAA,SAAA;AACA,eAAA;AACA,EAAA,IAAA,EAAA,eADA;AAEA,EAAA,IAFA,kBAEA;AACA,WAAA;AACA,MAAA,UAAA,EAAA,EADA;AAEA,MAAA,WAAA,EAAA,KAFA;AAGA,MAAA,QAAA,EAAA,EAHA;AAIA,MAAA,QAAA,EAAA,EAJA;AAKA,MAAA,YAAA,EAAA,IALA;AAMA,MAAA,YAAA,EAAA;AACA,QAAA,QAAA,EAAA,UADA;AAEA,QAAA,KAAA,EAAA;AAFA;AANA,KAAA;AAWA,GAdA;AAeA,EAAA,KAAA,EAAA;AACA,IAAA,KAAA,EAAA,CAAA,MAAA,EAAA,MAAA,CADA;AAEA,IAAA,UAAA,EAAA,MAFA;AAGA,IAAA,SAAA,EAAA,MAHA;AAIA,IAAA,WAAA,EAAA,MAJA;AAKA,IAAA,OAAA,EAAA;AALA,GAfA;AAsBA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BA,KAjBA,CAiBA,YAAA,CAAA,CAjBA,CAAA;AAkBA,KAlCA;AAmCA,IAAA,YAnCA,0BAmCA;AACA,WAAA,WAAA,GAAA,KAAA;AACA,WAAA,QAAA,GAAA,EAAA;AACA,WAAA,UAAA,GAAA,EAAA;AACA,KAvCA;AAwCA,IAAA,WAxCA,yBAwCA;AACA,WAAA,KAAA,CAAA,OAAA,EAAA,GAAA;AACA,WAAA,KAAA,CAAA,mBAAA,EAAA,EAAA;AACA,WAAA,KAAA,CAAA,kBAAA,EAAA,EAAA;AACA,WAAA,KAAA,CAAA,gBAAA,EAAA,EAAA;AACA,WAAA,QAAA,GAAA,EAAA;AACA,WAAA,WAAA,GAAA,KAAA;AACA,WAAA,QAAA,GAAA,EAAA;AACA,WAAA,UAAA,GAAA,EAAA;AACA,KAjDA;AAkDA,IAAA,YAlDA,0BAkDA;AACA,UAAA,IAAA,GAAA,KAAA,KAAA,CAAA,IAAA,CAAA,cAAA,EAAA;;AACA,UAAA,CAAA,IAAA,EAAA;AACA,aAAA,QAAA,CAAA,KAAA,CAAA,KAAA,EAAA,CAAA,QAAA,CAAA;AACA;AACA;;AACA,WAAA,KAAA,CAAA,OAAA,EAAA,IAAA,CAAA,EAAA;AACA,WAAA,KAAA,CAAA,mBAAA,EAAA,IAAA,CAAA,IAAA;AACA,WAAA,KAAA,CAAA,kBAAA,EAAA,MAAA,CAAA,IAAA,CAAA,OAAA,GAAA,CAAA,CAAA;AACA,WAAA,KAAA,CAAA,gBAAA,EAAA,MAAA,CAAA,IAAA,CAAA,UAAA,CAAA;AACA,WAAA,QAAA,GAAA,IAAA,CAAA,IAAA;AACA,WAAA,WAAA,GAAA,KAAA;AACA,WAAA,QAAA,GAAA,EAAA;AACA,WAAA,UAAA,GAAA,EAAA;AACA;AAhEA;AA9BA,CAAA","sourcesContent":["<template>\n <div class=\"ren-region\">\n <el-input v-model=\"showName\" :placeholder=\"placeholder\" @focus=\"treeDialog\">\n <el-button slot=\"append\" icon=\"el-icon-search\" @click=\"treeDialog\"></el-button>\n </el-input>\n <el-input :value=\"value\" style=\"display: none\"></el-input>\n <el-dialog :visible.sync=\"visibleTree\" width=\"360px\" :modal=\"false\" :title=\"placeholder\" :close-on-click-modal=\"false\" :close-on-press-escape=\"false\">\n <el-form size=\"mini\" :inline=\"true\">\n <el-form-item :label=\"$t('keyword')\">\n <el-input v-model=\"filterText\"></el-input>\n </el-form-item>\n <el-form-item>\n <el-button type=\"default\">{{ $t('query') }}</el-button>\n </el-form-item>\n </el-form>\n <el-tree\n class=\"filter-tree\"\n :data=\"dataList\"\n :default-expanded-keys=\"expandedKeys\"\n :props=\"{ label: 'name', children: 'children' }\"\n :expand-on-click-node=\"false\"\n :filter-node-method=\"filterNode\"\n :highlight-current=\"true\"\n node-key=\"id\"\n ref=\"tree\">\n </el-tree>\n <template slot=\"footer\">\n <el-button type=\"default\" @click=\"cancelHandle()\" size=\"mini\">{{ $t('cancel') }}</el-button>\n <el-button type=\"info\" @click=\"clearHandle()\" size=\"mini\">{{ $t('clear') }}</el-button>\n <el-button type=\"primary\" @click=\"commitHandle()\" size=\"mini\">{{ $t('confirm') }}</el-button>\n </template>\n </el-dialog>\n </div>\n</template>\n<style lang=\"scss\">\n.ren-region {\n .filter-tree {\n max-height: 230px;\n overflow: auto;\n }\n .el-dialog__body {\n padding: 0px 0px 0px 20px;\n }\n .el-dialog__footer {\n padding: 10px 20px 8px 20px;\n }\n}\n</style>\n<script>\nimport { treeDataTranslate } from '@/utils'\nexport default {\n name: 'RenRegionTree',\n 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 buildType: String,\n placeholder: String,\n purpose: String\n },\n watch: {\n filterText (val) {\n this.$refs.tree.filter(val)\n },\n parentName (val) {\n this.showName = val\n }\n },\n methods: {\n 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 (value, data) {\n if (!value) return true\n return data.name.indexOf(value) !== -1\n },\n getDataList (id) {\n // id -1全部 0学生宿舍 1教师宿舍 2教学楼\n\n return this.$http.get('/system/scdormitoryfloor/tree/-1').then(({ data: res }) => {\n if (res.code !== 0) {\n return this.$message.error(res.msg)\n }\n let list=res.data.map(item=>{\n return {\n ...item,\n name:item.df_floorname,\n id:item.df_floorid,\n pid:item.df_parentid\n }\n })\n this.dataList = treeDataTranslate(list)\n // this.$nextTick(() => {\n // this.$refs.tree.setCurrentKey(id)\n // this.expandedKeys = [id]\n // })\n }).catch(() => {})\n },\n cancelHandle () {\n this.visibleTree = false\n this.dataList = []\n this.filterText = ''\n },\n clearHandle () {\n this.$emit('input', '0')\n this.$emit('update:parentName', '')\n this.$emit('update:buildType', '')\n this.$emit('update:purpose', '')\n this.showName = ''\n this.visibleTree = false\n this.dataList = []\n this.filterText = ''\n },\n commitHandle () {\n const 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.$emit('update:buildType',String(node.df_type+1))\n this.$emit('update:purpose',String(node.df_purpose))\n this.showName = node.name\n this.visibleTree = false\n this.dataList = []\n this.filterText = ''\n }\n }\n}\n</script>\n"],"sourceRoot":"src/views/modules/building"}]} |