{"remainingRequest":"D:\\jenkins\\workspace\\xypm-web-prod\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\xypm-web-prod\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\xypm-web-prod\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\xypm-web-prod\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\xypm-web-prod\\src\\components\\dialog\\ViewDefinedDialog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xypm-web-prod\\src\\components\\dialog\\ViewDefinedDialog.vue","mtime":1710399216032},{"path":"D:\\jenkins\\workspace\\xypm-web-prod\\babel.config.js","mtime":1667333346259},{"path":"D:\\jenkins\\workspace\\xypm-web-prod\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xypm-web-prod\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xypm-web-prod\\node_modules\\babel-loader\\lib\\index.js","mtime":456789000000},{"path":"D:\\jenkins\\workspace\\xypm-web-prod\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xypm-web-prod\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/es6.function.name\";\nimport \"core-js/modules/web.dom.iterable\";\nimport \"core-js/modules/es6.object.keys\";\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//\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//\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//\n//\n//\n//\n//\n//\n//\n//\n//\n\nimport req from '@/request.js';\nexport default {\n data: function data() {\n return {\n dialogVisible: false,\n header: [],\n dataList: [],\n arr_: [],\n arr: [],\n count: 0,\n loading: false,\n searchForm: {\n id: '',\n projectId: '',\n projectName: '',\n projectType: '',\n endMoney: '',\n startMoney: '',\n createTime: ''\n },\n optionYears: [],\n //顶部搜索年份选择数组\n isRefresh: true,\n // 是否刷新数据\n downloading: false // 是否导出加载中\n };\n },\n\n computed: {\n noMore: function noMore() {\n return this.count >= this.arr.length;\n },\n disabled: function disabled() {\n return this.loading || this.noMore;\n }\n },\n mounted: function mounted() {\n this.getYear();\n },\n watch: {\n // 监听json数据变化,重新渲染文件夹内容\n dataList: function dataList(newVal) {\n var _this = this;\n this.isRefresh = false;\n if (true) {\n this.$nextTick(function () {\n // $nextTick 是在 DOM 更新循环结束之后执行延迟回调\n _this.isRefresh = true;\n });\n }\n }\n },\n methods: {\n handleChange: function handleChange(val, obj) {\n if (val) {\n this.searchForm.projectId = val;\n this.searchForm.projectName = obj.projectName;\n }\n },\n handleReset: function handleReset() {\n var _this2 = this;\n this.searchForm.projectId = '';\n this.searchForm.projectName = '';\n this.searchForm.projectType = '';\n this.searchForm.createTime = '';\n this.searchForm.startMoney = '';\n this.searchForm.endMoney = '';\n this.$http.post('${cqxy}/biz/menuFieldTemp/v1/getDataById', this.searchForm).then(function (res) {\n _this2.open(res.data.value);\n });\n },\n handleDownload: function handleDownload() {\n var _this3 = this;\n var search = this.cloneObj(this.searchForm);\n for (var i in search) {\n if (search[i] && typeof search[i] !== 'undefined') {\n if (i == 'createTime') {\n search.startTime = \"\".concat(search[i], \"-01-01\");\n search.endTime = \"\".concat(search[i], \"-12-31\");\n }\n }\n }\n delete search.createTime;\n this.downloading = true;\n req.downloadPostCopy('${cqxy}/biz/menuFieldTemp/v1/exportDataById', search).then(function (res) {\n _this3.downloading = false;\n }).catch(function (res) {\n _this3.downloading = false;\n });\n },\n // 拷贝对象\n cloneObj: function cloneObj(obj) {\n var clone = {};\n for (var _i = 0, _Object$keys = Object.keys(obj); _i < _Object$keys.length; _i++) {\n var i = _Object$keys[_i];\n clone[i] = obj[i];\n }\n return clone;\n },\n handleSearch: function handleSearch() {\n var _this4 = this;\n var search = this.cloneObj(this.searchForm);\n for (var i in search) {\n if (search[i] && typeof search[i] !== 'undefined') {\n if (i == 'createTime') {\n search.startTime = \"\".concat(search[i], \"-01-01\");\n search.endTime = \"\".concat(search[i], \"-12-31\");\n }\n }\n }\n delete search.createTime;\n this.$http.post('${cqxy}/biz/menuFieldTemp/v1/getDataById', search).then(function (res) {\n _this4.open(res.data.value);\n });\n // }\n },\n //获取顶部搜索的年份区间\n getYear: function getYear() {\n var myDate = new Date();\n var startYear = 2006; //起始年份\n var endYear = myDate.getFullYear(); //结束年份\n for (var i = endYear; i >= startYear; i--) {\n this.optionYears.push({\n label: i + '年',\n value: i\n });\n }\n },\n open: function open(data) {\n var _this5 = this;\n if (data.id) {\n this.templeteId = data.id;\n this.searchForm.id = this.templeteId;\n if (data.flag) {\n this.searchForm.projectId = data.projectId;\n this.searchForm.projectName = data.projectName;\n }\n }\n this.arr = [];\n this.dataList = [];\n this.count = 0;\n this.dialogVisible = true;\n this.header = data.header;\n data.dataList.forEach(function (item, index) {\n item.forEach(function (item1) {\n var obj = {\n name: item1,\n showTooltip: false\n };\n _this5.arr_.push(obj);\n });\n _this5.arr.push(_this5.arr_);\n _this5.arr_ = [];\n });\n },\n load: function load() {\n // console.log('44444444')\n this.count += 5;\n this.dataList = this.arr.slice(0, this.count);\n },\n handleClose: function handleClose(done) {\n done();\n },\n isShowTooltip: function isShowTooltip(obj, row) {\n var TemporaryTag = document.createElement('span');\n TemporaryTag.innerText = row.name;\n TemporaryTag.className = 'getTextWidth';\n document.querySelector('body').appendChild(TemporaryTag);\n var currentWidth = document.querySelector('.getTextWidth').offsetWidth;\n document.querySelector('.getTextWidth').remove();\n\n /* cellWidth为表格容器的宽度*/\n var cellWidth = obj.target.offsetWidth;\n /* 当文本宽度小于||等于容器宽度两倍时,代表文本显示未超过两行 可以 cellWidth *2,3,4.... */\n currentWidth <= cellWidth * 2 ? row.showTooltip = false : row.showTooltip = true;\n }\n }\n};",null]}