{"remainingRequest":"D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\xq-web-fvue\\src\\components\\charts\\GanttChart.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\src\\components\\charts\\GanttChart.vue","mtime":1667327528903},{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\babel.config.js","mtime":1667327525434},{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import _defineProperty from \"D:/jenkins/workspace/xq-web-fvue/node_modules/@babel/runtime/helpers/esm/defineProperty.js\";\nimport \"core-js/modules/es6.function.name\";\n//\n//\n//\n//\n//\n//\nimport * as echarts from 'echarts';\nexport default {\n mounted: function mounted() {\n this.draw();\n },\n methods: {\n draw: function draw() {\n var _xAxis;\n\n var chartDom = document.getElementById('mainGantt');\n var myChart = echarts.init(chartDom);\n var option;\n var xAxisData = [];\n var dataX = [[], [], [], [], [], [], [], [], [], [], [], [], []];\n var data = ['W分区H4路(一期)', 'W分区2号路', '西科四路', '师牛路工程', '西永大道拓宽改造', 'M分区A4路', 'M分区B2路', 'M分区B5路', 'W分区Z3路', 'L分区永源路', 'W分区H7路'];\n\n for (var i = 0; i < 10; i++) {\n xAxisData.push(data[i]);\n\n if (i < 1) {\n for (var j = 0; j < 13; j++) {\n if (j == 9) {\n dataX[j].push(4);\n } else {\n dataX[j].push(0.5);\n }\n }\n } else if (i < 2) {\n for (var _j = 0; _j < 12; _j++) {\n if (_j == 9) {\n dataX[_j].push(4);\n } else {\n dataX[_j].push(0.5);\n }\n }\n } else if (i < 3) {\n for (var _j2 = 0; _j2 < 11; _j2++) {\n if (_j2 == 9) {\n dataX[_j2].push(4);\n } else {\n dataX[_j2].push(0.5);\n }\n }\n } else if (i < 4) {\n for (var _j3 = 0; _j3 < 10; _j3++) {\n if (_j3 == 9) {\n dataX[_j3].push(4);\n } else {\n dataX[_j3].push(0.5);\n }\n }\n } else if (i < 5) {\n for (var _j4 = 0; _j4 < 9; _j4++) {\n if (_j4 == 9) {\n dataX[_j4].push(4);\n } else {\n dataX[_j4].push(0.5);\n }\n }\n } else if (i < 6) {\n for (var _j5 = 0; _j5 < 8; _j5++) {\n if (_j5 == 9) {\n dataX[_j5].push(4);\n } else {\n dataX[_j5].push(0.5);\n }\n }\n } else if (i < 7) {\n for (var _j6 = 0; _j6 < 7; _j6++) {\n if (_j6 == 9) {\n dataX[_j6].push(4);\n } else {\n dataX[_j6].push(0.5);\n }\n }\n } else if (i < 8) {\n for (var _j7 = 0; _j7 < 6; _j7++) {\n if (_j7 == 9) {\n dataX[_j7].push(4);\n } else {\n dataX[_j7].push(0.5);\n }\n }\n } else if (i < 9) {\n for (var _j8 = 0; _j8 < 5; _j8++) {\n if (_j8 == 9) {\n dataX[_j8].push(4);\n } else {\n dataX[_j8].push(0.5);\n }\n }\n } else {\n for (var _j9 = 0; _j9 < 4; _j9++) {\n if (_j9 == 9) {\n dataX[_j9].push(4);\n } else {\n dataX[_j9].push(0.5);\n }\n }\n }\n }\n\n var emphasisStyle = {\n itemStyle: {\n shadowBlur: 10,\n shadowColor: 'rgba(0,0,0,0.3)'\n }\n };\n option = {\n tooltip: {\n axisPointer: {\n type: ''\n },\n formatter: function formatter(value) {\n var kg = '2020-05-06';\n var jg = '2021-07-09';\n var hh = '
';\n return value.name + hh + value.marker + '项目状态:' + value.seriesName + hh + value.marker + '开工时间:' + kg + hh + value.marker + '竣工时间:' + jg;\n }\n },\n xAxis: (_xAxis = {\n name: '项目状态',\n nameTextStyle: {\n color: '#9FA1A7',\n fontSize: 16\n },\n type: 'value',\n axisTick: {\n // y轴刻度线\n show: false\n }\n }, _defineProperty(_xAxis, \"type\", 'value'), _defineProperty(_xAxis, \"interval\", 0.5), _defineProperty(_xAxis, \"min\", 0), _defineProperty(_xAxis, \"max\", 10), _defineProperty(_xAxis, \"axisLabel\", {\n show: true,\n textStyle: {\n color: '#9FA1A7'\n },\n fontSize: 16,\n rotate: 30,\n // 这里重新定义就可以\n formatter: function formatter(value) {\n var texts = [];\n\n if (value === 0.5 || value === '0.5') {\n texts.push('立项');\n } else if (value === 1 || value === '1') {\n texts.push('可研');\n } else if (value === 1.5 || value === '1.5') {\n texts.push('规划');\n } else if (value === 2 || value === '2') {\n texts.push('初设');\n } else if (value === 2.5 || value === '2.5') {\n texts.push('概算');\n } else if (value === 3 || value === '3') {\n texts.push('施工图设计');\n } else if (value === 3.5 || value === '3.5') {\n texts.push('招投标');\n } else if (value === 4 || value === '4') {\n texts.push('合同');\n } else if (value === 4.5 || value === '4.5') {\n texts.push('施工许可');\n } else if (value === 7 || value === '7') {\n texts.push('工程施工');\n } else if (value === 9 || value === '9') {\n texts.push('竣工验收');\n } else if (value === 9.5 || value === '9.5') {\n texts.push('结算');\n } else if (value === 10 || value === '10') {\n texts.push('决算');\n }\n\n return texts;\n }\n }), _defineProperty(_xAxis, \"axisLine\", {\n lineStyle: {\n type: 'solid',\n color: 'rgba(255, 255, 255, 0.37)' // 左边线的颜色\n\n }\n }), _xAxis),\n yAxis: {\n data: xAxisData,\n name: '项目名称',\n nameTextStyle: {\n fontSize: 16\n },\n axisLine: {\n onZero: true\n },\n splitLine: {\n show: false\n },\n splitArea: {\n show: false\n },\n triggerEvent: true,\n axisLabel: {\n fontSize: 16,\n formatter: function formatter(a) {\n return a.substring(0, 4) + '...';\n }\n }\n },\n grid: {\n bottom: 100\n },\n series: [{\n name: '立项',\n type: 'bar',\n stack: 'one',\n emphasis: emphasisStyle,\n data: dataX[0],\n itemStyle: {\n normal: {\n // barBorderRadius: [0, 10, 10, 0],\n color: new echarts.graphic.LinearGradient(1, 0, 0, 1, [{\n offset: 0,\n color: '#5470c6'\n }, {\n offset: 1,\n color: '#50c48f'\n }])\n }\n }\n }, {\n name: '可研',\n type: 'bar',\n stack: 'one',\n emphasis: emphasisStyle,\n data: dataX[1],\n itemStyle: {\n normal: {\n // barBorderRadius: [0, 10, 10, 0],\n color: new echarts.graphic.LinearGradient(1, 0, 0, 1, [{\n offset: 0,\n color: '#91cc75'\n }, {\n offset: 1,\n color: '#26ccd8'\n }])\n }\n }\n }, {\n name: '规划',\n type: 'bar',\n stack: 'one',\n emphasis: emphasisStyle,\n data: dataX[2],\n itemStyle: {\n normal: {\n // barBorderRadius: [0, 10, 10, 0],\n color: new echarts.graphic.LinearGradient(1, 0, 0, 1, [{\n offset: 0,\n color: '#fac858'\n }, {\n offset: 1,\n color: '#3685fe'\n }])\n }\n }\n }, {\n name: '初设',\n type: 'bar',\n stack: 'one',\n emphasis: emphasisStyle,\n data: dataX[3],\n itemStyle: {\n normal: {\n // barBorderRadius: [0, 10, 10, 0],\n color: new echarts.graphic.LinearGradient(1, 0, 0, 1, [{\n offset: 0,\n color: '#9977ef'\n }, {\n offset: 1,\n color: '#ee6666'\n }])\n }\n }\n }, {\n name: '概算',\n type: 'bar',\n stack: 'one',\n emphasis: emphasisStyle,\n data: dataX[4],\n itemStyle: {\n normal: {\n // barBorderRadius: [0, 10, 10, 0],\n color: new echarts.graphic.LinearGradient(1, 0, 0, 1, [{\n offset: 0,\n color: '#73c0de'\n }, {\n offset: 1,\n color: '#f5616f'\n }])\n }\n }\n }, {\n name: '施工图设计',\n type: 'bar',\n stack: 'one',\n emphasis: emphasisStyle,\n data: dataX[5],\n itemStyle: {\n normal: {\n // barBorderRadius: [0, 10, 10, 0],\n color: new echarts.graphic.LinearGradient(1, 0, 0, 1, [{\n offset: 0,\n color: '#3ba272'\n }, {\n offset: 1,\n color: '#f7b13f'\n }])\n }\n }\n }, {\n name: '招投标',\n type: 'bar',\n stack: 'one',\n emphasis: emphasisStyle,\n data: dataX[6],\n itemStyle: {\n normal: {\n // barBorderRadius: [0, 10, 10, 0],\n color: new echarts.graphic.LinearGradient(1, 0, 0, 1, [{\n offset: 0,\n color: '#fc8452'\n }, {\n offset: 1,\n color: '#f9e264'\n }])\n }\n }\n }, {\n name: '合同',\n type: 'bar',\n stack: 'one',\n emphasis: emphasisStyle,\n data: dataX[7],\n itemStyle: {\n normal: {\n // barBorderRadius: [0, 10, 10, 0],\n color: new echarts.graphic.LinearGradient(1, 0, 0, 1, [{\n offset: 0,\n color: '#9a60b4'\n }, {\n offset: 1,\n color: '#f47a75'\n }])\n }\n }\n }, {\n name: '施工许可',\n type: 'bar',\n stack: 'one',\n emphasis: emphasisStyle,\n data: dataX[8],\n itemStyle: {\n normal: {\n // barBorderRadius: [0, 10, 10, 0],\n color: new echarts.graphic.LinearGradient(1, 0, 0, 1, [{\n offset: 0,\n color: '#ea7ccc'\n }, {\n offset: 1,\n color: '#009db2'\n }])\n }\n }\n }, {\n name: '工程施工',\n type: 'bar',\n stack: 'one',\n emphasis: emphasisStyle,\n data: dataX[9],\n itemStyle: {\n normal: {\n // barBorderRadius: [0, 10, 10, 0],\n color: new echarts.graphic.LinearGradient(1, 0, 0, 1, [{\n offset: 0,\n color: '#f89588'\n }, {\n offset: 1,\n color: '#7cd6cf'\n }])\n }\n }\n }, {\n name: '竣工验收',\n type: 'bar',\n stack: 'one',\n emphasis: emphasisStyle,\n data: dataX[10],\n itemStyle: {\n normal: {\n // barBorderRadius: [0, 10, 10, 0],\n color: new echarts.graphic.LinearGradient(1, 0, 0, 1, [{\n offset: 0,\n color: '#91cc75'\n }, {\n offset: 1,\n color: '#0780cf'\n }])\n }\n }\n }, {\n name: '结算',\n type: 'bar',\n stack: 'one',\n emphasis: emphasisStyle,\n data: dataX[11],\n itemStyle: {\n normal: {\n // barBorderRadius: [0, 10, 10, 0],\n color: new echarts.graphic.LinearGradient(1, 0, 0, 1, [{\n offset: 0,\n color: '#fac858'\n }, {\n offset: 1,\n color: '#765005'\n }])\n }\n }\n }, {\n name: '决算',\n type: 'bar',\n stack: 'one',\n emphasis: emphasisStyle,\n data: dataX[12],\n itemStyle: {\n normal: {\n barBorderRadius: [0, 10, 10, 0],\n color: new echarts.graphic.LinearGradient(1, 0, 0, 1, [{\n offset: 0,\n color: '#ee6666'\n }, {\n offset: 1,\n color: '#63b2ee'\n }])\n }\n }\n }]\n };\n myChart.on('brushSelected', function (params) {\n var brushed = [];\n var brushComponent = params.batch[0];\n\n for (var sIdx = 0; sIdx < brushComponent.selected.length; sIdx++) {\n var rawIndices = brushComponent.selected[sIdx].dataIndex;\n brushed.push('[Series ' + sIdx + '] ' + rawIndices.join(', '));\n }\n\n myChart.setOption({\n title: {\n backgroundColor: '#333',\n text: '数据: \\n' + brushed.join('\\n'),\n bottom: 0,\n right: '10%',\n width: 100,\n textStyle: {\n fontSize: 12,\n color: '#fff'\n }\n }\n });\n });\n option && myChart.setOption(option); // //提示泡\n // myChart.on('mouseover', function(params) {\n // if(params.componentType === 'yAxis') {\n // let offsetX = params.event.event.offsetX\n // let offsetY = params.event.event.offsetY\n // let xAxisTip= document.querySelector('.x-axis-tip')\n // xAxisTip.innerHTML = params.value.split('#')[0]\n // xAxisTip.style.left = offsetX + 'px'\n // xAxisTip.style.top = offsetY + 'px'\n // xAxisTip.style.display = 'block'\n // }\n // })\n // myChart.on('mousemove', function(params) {\n // if(params.componentType === 'yAxis') {\n // let offsetX = params.event.event.offsetX\n // let offsetY = params.event.event.offsetY\n // let xAxisTip= document.querySelector('.x-axis-tip')\n // xAxisTip.innerHTML = params.value.substring(0,2)\n // xAxisTip.style.left = offsetX + 30 + 'px'\n // xAxisTip.style.top = offsetY + 10 + 'px'\n // xAxisTip.style.display = 'block'\n // }\n // })\n // myChart.on('mouseout', function(params) {\n // let xAxisTip = document.querySelector('.x-axis-tip')\n // xAxisTip.style.display = 'none'\n // })\n }\n }\n};",null]}