{"remainingRequest":"D:\\jenkins\\workspace\\reform-fvue\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\reform-fvue\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\reform-fvue\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\reform-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\reform-fvue\\src\\views\\BigScreen\\components\\subComponents\\airTable.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\reform-fvue\\src\\views\\BigScreen\\components\\subComponents\\airTable.vue","mtime":1745582908256},{"path":"D:\\jenkins\\workspace\\reform-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\reform-fvue\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\reform-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\reform-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\reform-fvue\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/web.dom.iterable\";\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nimport $ from 'jquery';\nexport default {\n name: \"list\",\n props: {\n data: {\n type: Array,\n default: function _default() {\n return [];\n }\n },\n tableColumn: {\n type: Array,\n default: function _default() {\n return [];\n }\n },\n lsFd: {\n type: Object,\n default: function _default() {\n // return { A: true, B: true, C: true, D: true, E: true }\n return {\n A: true,\n B: true,\n C: true,\n D: true\n };\n }\n },\n isFirm: {\n type: Boolean,\n default: false\n },\n isSub: {\n type: Boolean,\n default: true\n }\n },\n watch: {\n data: {\n handler: function handler(nv, ov) {\n var _this = this;\n\n this.$nextTick(function () {\n _this.initTableData(nv);\n });\n },\n immediate: true\n }\n },\n mounted: function mounted() {},\n data: function data() {\n return {\n tableData: [],\n tapHei: 32,\n //档类标题高度\n tableHeadHei: 32,\n //表头高度\n maxColLen: 17,\n //每列最大长度\n firstLen: 0,\n //首列长度\n secondLen: 0,\n //第二列长度\n threeLen: 0,\n //第三列长度\n firstHei: 0,\n //首列行高\n secondHei: 0,\n //第二列行高\n threeHei: 0,\n //第三列行高\n mainHeight: 0\n };\n },\n // mounted() {\n // // this.initTableData(this.data)\n // },\n methods: {\n initTableData: function initTableData(data) {\n var _this2 = this;\n\n var comp = this.$route.query.comp;\n\n var _JSON$parse = JSON.parse(sessionStorage.getItem('searchDate')),\n year = _JSON$parse.year,\n quarter = _JSON$parse.quarter;\n\n if (data.length == 0) {\n return;\n }\n\n this.tableData = [];\n var taps = ['A', 'B', 'C', 'D', 'E']; // let taps = ['A', 'B', 'C', 'D']\n // 绿色:#20A367 蓝色:#3877B2 黄色:#E3C428 橙色:#E49317 红色:#B04332\n // let colors = ['rgb(57, 140, 143)', 'rgb(25, 112, 193)', 'rgb(163, 163, 85)', 'rgb(176, 130, 92)', 'rgb(155, 78, 85)']\n\n var colors = ['#20A367', '#3877B2', '#E3C428', '#E49317', '#B04332'];\n var temp = {};\n\n for (var i = 0; i < 3; i++) {\n temp = {\n col: i + 1,\n list: []\n };\n this.tableData.push(temp);\n }\n\n var dataLen = 0;\n data.forEach(function (item, index) {\n if (_this2.lsFd[taps[index]]) {\n dataLen += item.length + 2;\n }\n });\n this.tableData.forEach(function (tableItem, tableIndex) {\n var tempLen = 0;\n var colLen = _this2.isFirm ? 16 : Math.ceil(dataLen / 3);\n\n if (tableItem.col === 1) {\n data.forEach(function (item, index) {\n if (item.length > 0 && tempLen + item.length + 2 < colLen + 1 || tempLen + item.length + 2 === colLen + 1) {\n _this2.pushData(1, taps[index], item, colors[index], taps[index]);\n\n tempLen += item.length + 2;\n } else if (item.length > 0 && tempLen + item.length + 2 > colLen) {\n var overLen = colLen - tempLen;\n\n if (tempLen > 0 && overLen > 2) {\n _this2.pushData(1, taps[index], item.slice(0, overLen - 2), colors[index], taps[index]);\n\n tempLen += overLen;\n } else if (tempLen > 0 && overLen < 3 && overLen > 0) {\n _this2.pushData(1, taps[index], item.slice(0, 1), colors[index], taps[index]);\n\n tempLen += 3;\n } else if (tempLen === 0 && tempLen + item.length + 2 > colLen + 1) {\n _this2.pushData(1, taps[index], item.slice(0, colLen - 2), colors[index], taps[index]);\n\n tempLen += colLen;\n }\n } else if (item.length === 0 && _this2.lsFd[taps[index]] && tempLen + item.length + 2 <= colLen) {\n _this2.pushData(1, taps[index], [], colors[index], taps[index]);\n\n tempLen += item.length + 2;\n }\n });\n } else if (tableItem.col === 2) {\n tempLen = 0;\n colLen = 0;\n\n _this2.tableData[0].list.forEach(function (item) {\n colLen += item.list.length + 2;\n });\n\n var dataIndex = taps.indexOf(_this2.tableData[0].list[_this2.tableData[0].list.length - 1].dc);\n\n if (data[dataIndex].length === _this2.tableData[0].list[_this2.tableData[0].list.length - 1].list.length) {\n data.forEach(function (item, index) {\n if (index > dataIndex) {\n if (item.length > 0 && tempLen + item.length + 2 < colLen + 1 || tempLen + item.length + 2 === colLen + 1) {\n _this2.pushData(2, taps[index], item, colors[index], taps[index]);\n\n tempLen += item.length + 2;\n } else if (item.length > 0 && tempLen + item.length + 2 > colLen) {\n var overLen = colLen - tempLen;\n\n if (tempLen > 0 && overLen > 2) {\n _this2.pushData(2, taps[index], item.slice(0, overLen - 2), colors[index], taps[index]);\n\n tempLen += overLen;\n } else if (tempLen > 0 && overLen < 3 && overLen > 0) {\n _this2.pushData(2, taps[index], item.slice(0, 1), colors[index], taps[index]);\n\n tempLen += 3;\n } else if (tempLen === 0 && tempLen + item.length + 2 > colLen + 1) {\n _this2.pushData(2, taps[index], item.slice(0, colLen - 2), colors[index], taps[index]);\n\n tempLen += colLen;\n }\n } else if (item.length === 0 && _this2.lsFd[taps[index]] && tempLen + item.length + 2 <= colLen) {\n _this2.pushData(2, taps[index], [], colors[index], taps[index]);\n\n tempLen += item.length + 2;\n }\n }\n });\n } else {\n data.forEach(function (item, index) {\n if (index === dataIndex) {\n var lastIndex = 0;\n\n _this2.tableData[0].list[_this2.tableData[0].list.length - 1].list.forEach(function (lItem) {\n lastIndex = item.indexOf(lItem) + 1;\n });\n\n var overLen = item.length - lastIndex;\n\n if (tempLen + overLen + 1 < colLen + 1 || tempLen + overLen + 1 === colLen + 1) {\n _this2.pushData(2, '', item.slice(lastIndex, item.length), colors[index], taps[index]);\n\n tempLen += overLen + 1;\n } else if (item.length > 0 && tempLen + overLen + 1 > colLen) {\n _this2.pushData(2, '', item.slice(lastIndex, _this2.tableData[0].list[_this2.tableData[0].list.length - 1].list.length + colLen - 1), colors[index], taps[dataIndex]);\n\n tempLen += colLen;\n }\n } else if (index > dataIndex) {\n if (item.length > 0 && tempLen + item.length + 2 < colLen + 1 || tempLen + item.length + 2 === colLen + 1) {\n _this2.pushData(2, taps[index], item, colors[index], taps[index]);\n\n tempLen += item.length + 2;\n } else if (item.length > 0 && tempLen + item.length + 2 > colLen) {\n var _overLen = colLen - tempLen;\n\n if (tempLen > 0 && _overLen > 2) {\n _this2.pushData(2, taps[index], item.slice(0, _overLen - 2), colors[index], taps[index]);\n\n tempLen += _overLen;\n } else if (tempLen > 0 && _overLen < 3 && _overLen > 0) {\n _this2.pushData(2, taps[index], item.slice(0, 1), colors[index], taps[index]);\n\n tempLen += 3;\n } else if (tempLen === 0 && tempLen + item.length + 2 > colLen + 1) {\n _this2.pushData(2, taps[index], item.slice(0, colLen - 2), colors[index], taps[index]);\n\n tempLen += colLen;\n }\n } else if (item.length === 0 && _this2.lsFd[taps[index]] && tempLen + item.length + 2 <= colLen) {\n _this2.pushData(2, taps[index], [], colors[index], taps[index]);\n\n tempLen += item.length + 2;\n }\n }\n });\n }\n } else if (tableItem.col === 3) {\n tempLen = 0;\n\n var _dataIndex = taps.indexOf(_this2.tableData[1].list[_this2.tableData[1].list.length - 1].dc);\n\n if (data[_dataIndex].length === _this2.tableData[1].list[_this2.tableData[1].list.length - 1].list.length) {\n data.forEach(function (item, index) {\n if (item.length > 0 && index > _dataIndex) {\n _this2.pushData(3, taps[index], item, colors[index], taps[index]);\n } else if (item.length === 0 && _this2.lsFd[taps[index]]) {\n _this2.pushData(3, taps[index], [], colors[index], taps[index]);\n }\n });\n } else {\n data.forEach(function (item, index) {\n if (index === _dataIndex) {\n var lastIndex = 0;\n\n _this2.tableData[1].list[_this2.tableData[1].list.length - 1].list.forEach(function (lItem) {\n lastIndex = item.indexOf(lItem) + 1;\n });\n\n if (lastIndex < item.length) {\n _this2.pushData(3, '', item.slice(lastIndex, item.length), '', taps[_dataIndex]);\n }\n } else if (index > _dataIndex) {\n if (item.length > 0) {\n _this2.pushData(3, taps[index], item, colors[index], taps[index]);\n } else if (item.length === 0 && _this2.lsFd[taps[index]]) {\n _this2.pushData(3, taps[index], [], colors[index], taps[index]);\n }\n }\n });\n }\n }\n });\n this.firstLen = 0;\n this.secondLen = 0;\n this.threeLen = 0;\n this.firstHei = 0;\n this.secondHei = 0;\n this.threeHei = 0;\n this.mainHeight = $('.airTable').height();\n this.tableData.forEach(function (item, index) {\n if (index === 0) {\n var fds = 0;\n item.list.forEach(function (citem, cindex) {\n fds++;\n _this2.firstLen += citem.list.length + 1;\n });\n _this2.firstHei = (_this2.mainHeight - fds * 32 - (fds - 1) * 12) / _this2.firstLen;\n } else if (index === 1) {\n var _fds = 0;\n var jgs = 0;\n item.list.forEach(function (citem, cindex) {\n jgs++;\n\n if (citem.title !== '') {\n _fds++;\n }\n\n _this2.secondLen += citem.list.length + 1;\n });\n _this2.secondHei = (_this2.mainHeight - _fds * 32 - (jgs - 1) * 12) / _this2.secondLen;\n } else if (index === 2) {\n var _fds2 = 0;\n var _jgs = 0;\n item.list.forEach(function (citem, cindex) {\n _jgs++;\n\n if (citem.title !== '') {\n _fds2++;\n }\n\n _this2.threeLen += citem.list.length + 1;\n });\n _this2.threeHei = (_this2.mainHeight - _fds2 * 32 - (_jgs - 1) * 12) / _this2.threeLen;\n }\n });\n this.$nextTick(function () {\n var getHeights = document.querySelectorAll('.getHeight');\n getHeights.forEach(function (item, index) {\n if (index < 14 || 43 < index < 58) {\n // item.style.height = getHeights[getHeights.length - 1].style.height\n item.style.setProperty('height', getHeights[getHeights.length - 1].style.height, 'important');\n }\n });\n\n _this2.$emit('loadComplete');\n });\n },\n pushData: function pushData(col, title, list, color, dc) {\n var temp1 = {\n title: title,\n list: list,\n color: color,\n dc: dc\n };\n this.tableData.forEach(function (item) {\n if (item.col === col) {\n item.list.push(temp1);\n }\n });\n },\n handleDetail: function handleDetail(unitInfo) {\n var comp = this.$route.query.comp;\n var unitName = unitInfo.unitName,\n unitCode = unitInfo.unitCode;\n var tem = comp == \"mapTarget_1\" || comp == \"mapTarget_2\" || comp == \"mapTarget_4\" ? 'reformPilot' : comp == \"mapTarget_5\" || comp == \"mapTarget_6\" ? 'brandDetail' : '';\n\n if (tem == 'reformPilot') {\n this.$router.push({\n path: '/DetailComponent',\n name: 'DetailComponent',\n query: {\n unitName: unitName,\n unitCode: unitCode,\n comp: tem,\n type: '1',\n numType: comp == \"mapTarget_1\" ? 'nationalNum' : 'nationalAddNum'\n }\n });\n } else if (tem == 'brandDetail' && comp != 'mapTarget_8') {\n this.$router.push({\n path: '/DetailComponent',\n name: 'DetailComponent',\n query: {\n comp: tem,\n code: unitCode,\n type: comp == \"mapTarget_5\" ? '1' : comp == \"mapTarget_6\" ? '2' : comp == \"mapTarget_7\" ? '3' : '',\n title: '品牌创建·' + unitName\n }\n });\n }\n }\n }\n};",null]}