{"remainingRequest":"D:\\jenkins\\workspace\\damDance-fvue\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\damDance-fvue\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\damDance-fvue\\node_modules\\eslint-loader\\index.js??ref--13-0!D:\\jenkins\\workspace\\damDance-fvue\\src\\mixins\\tableMixin.js","dependencies":[{"path":"D:\\jenkins\\workspace\\damDance-fvue\\src\\mixins\\tableMixin.js","mtime":1697190651909},{"path":"D:\\jenkins\\workspace\\damDance-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\damDance-fvue\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\damDance-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\damDance-fvue\\node_modules\\eslint-loader\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/es6.regexp.replace\";\nimport req from '@/request.js';\nimport utils from '@/utils.js'; // import sat from '@/api/satisfaction/satisfaction'\n// import pilot from '@/api/pilotprojects'\n\nvar portal = window.context.portal;\nexport var TableMixin = {\n data: function data() {\n return {\n tableMaxHeight: 600,\n showMore: false,\n header: {\n Authorization: \"Bearer \".concat(this.$store.state.login.currentUser.token)\n },\n pageResult: {\n page: 1,\n pageSize: 20,\n total: 0\n },\n deleteIds: '',\n tableData: [],\n loading: false\n };\n },\n mounted: function mounted() {// this.calcTableHeight()\n // this.$root.$on('resize', () => {\n // this.calcTableHeight(500)\n // })\n },\n created: function created() {},\n methods: {\n //添加\n handleAdd: function handleAdd() {\n this.$refs.formDialog.open();\n },\n handleEdit: function handleEdit(row) {\n this.$refs.formDialog.open(row, 'edit');\n },\n handleDetail: function handleDetail(row) {\n this.$refs.formDialog.open(row, 'detail');\n },\n //获取删除数据id集合\n handleSelectionChange: function handleSelectionChange(val) {\n var arr = val.map(function (item) {\n return item.id;\n });\n this.deleteIds = arr.join(',');\n },\n // 获取字典值翻译\n getDictName: function getDictName(code, value) {\n return utils.getDictName(code, value);\n },\n calcTableHeight: function calcTableHeight(delay) {\n var _this = this;\n\n // 动态计算表格的高度,自适应当前容器\n setTimeout(function () {\n if (!_this.$refs.contentPanel) {\n return;\n } // 容器高度 - 内边距\n\n\n var contentPanel = 0;\n var contentPanelHeight = _this.$refs.contentPanel.clientHeight || _this.$refs.contentPanel.$el.clientHeight;\n var contentPanelPaddingT = getComputedStyle(_this.$refs.contentPanel.$el).getPropertyValue('padding-top').replace('px', '');\n var contentPanelPaddingB = getComputedStyle(_this.$refs.contentPanel.$el).getPropertyValue('padding-bottom').replace('px', '');\n var contentPanelPadding = parseInt(contentPanelPaddingT, 10) + parseInt(contentPanelPaddingB, 10);\n contentPanel = contentPanelHeight - contentPanelPadding; //按钮高度 + 下外边距\n\n var btnPanelHeight = 10,\n btnPanel,\n btnPanelMarginB = 0;\n\n if (_this.$refs.btnPanel.clientHeight) {\n btnPanelHeight = _this.$refs.btnPanel.clientHeight;\n btnPanel = _this.$refs.btnPanel;\n } else if (_this.$refs.btnPanel.$el && _this.$refs.btnPanel.$el.clientHeight) {\n btnPanel = _this.$refs.btnPanel.$el;\n btnPanelHeight = _this.$refs.btnPanel.$el.clientHeight;\n }\n\n if (btnPanel) {\n btnPanelMarginB = getComputedStyle(btnPanel).getPropertyValue('margin-bottom').replace('px', '');\n btnPanelHeight = btnPanelHeight + parseInt(btnPanelMarginB, 10);\n } //分页高度 + 上外边距\n\n\n var paginationPanelHeight = 0,\n paginationPanelMarginT = 0;\n\n if (_this.$refs.paginationPanel.$el && _this.$refs.paginationPanel.$el.clientHeight) {\n paginationPanelHeight = _this.$refs.paginationPanel.$el.clientHeight;\n paginationPanelMarginT = getComputedStyle(_this.$refs.paginationPanel.$el).getPropertyValue('margin-top').replace('px', '');\n }\n\n paginationPanelHeight = paginationPanelHeight + parseInt(paginationPanelMarginT, 10); // console.log(contentPanel, btnPanelHeight, paginationPanelHeight)\n\n _this.tableMaxHeight = contentPanel - btnPanelHeight - paginationPanelHeight;\n }, delay || 0);\n },\n commonPageClick: function commonPageClick() {\n if (this.showMore) {\n this.showMore = false;\n }\n },\n // 展开高级搜索\n advanced: function advanced() {\n var _this2 = this;\n\n this.isAdvanced = !this.isAdvanced;\n this.$nextTick(function () {\n _this2.calcTableHeight(500);\n });\n },\n clearSearchForm: function clearSearchForm() {\n this.advanced();\n this.isAdvanced = false;\n this.searchForm = {};\n\n if (this.slefClearMethods) {\n this.slefClearMethods();\n }\n\n this.handleSearch(1);\n },\n // 分页\n handleCurrentChange: function handleCurrentChange(page) {\n this.reqData.pageBean.page = page;\n this.getTableData();\n },\n handleSizeChange: function handleSizeChange(pageSize) {\n this.reqData.pageBean.pageSize = pageSize;\n this.getTableData(1);\n }\n }\n};",null]}