Browse Source

master echarts 修改

jiayufei 3 năm trước cách đây
mục cha
commit
8e90106a4d

+ 4 - 1
src/views/modules/Statistics/Statistics.vue

@@ -118,7 +118,7 @@ p{
           :activeTabKey="noTitleKey"
           @tabChange="key => onTabChange(key, 'noTitleKey')"
         >
-          <div id="chart" style="width:100%;height:500px"></div>
+          <div id="chart" style="width:100%;height:500px" :style="{ width: clientWidth - 48 - 24 + 'px' }"></div>
           <a-button class="duibi" type='primary'  @click="visible = true">数据对比</a-button>
         </a-card>
       </a-col>
@@ -363,6 +363,7 @@ export default {
 
   data: function() {
     return {
+      clientWidth: 0,
       loading: true,
       columns: [
         { title: '时间', dataIndex: 'statDate', align: 'center' },
@@ -1484,6 +1485,7 @@ export default {
       chart.clear()
       chart.setOption(option, true)
       window.onresize = function() {
+			  this.clientWidth = document.documentElement.clientWidth - 224;
         chart.resize()
       }
       // this.chart.on('click', param => {
@@ -1507,6 +1509,7 @@ export default {
   },
   activated: function() {
     this.$nextTick(() => {
+			this.clientWidth = document.documentElement.clientWidth - 224;
         postAction('/v1/api/file/getFileListByPage',{page: 1,size: 10}).then(res=>{
             console.log(res)
         })

+ 3 - 0
src/views/modules/Statistics/materialReport/materialReport.vue

@@ -167,6 +167,7 @@
                                 class="accountIndexEchart"
                                 style="width:100%; height:50px; margin:0 auto;"
                                 ref="accountIndexEchart"
+								:style="{ width: (clientWidth / 24) * 6 - 48 - 24 + 'px' }"
                             >
                             </div>
 						</div>
@@ -191,6 +192,7 @@
                                 id="effectiveVideoEcharts"
                                 style="width:100%; height:50px; margin:0 auto;"
                                 ref="effectiveVideoEcharts"
+								:style="{ width: (clientWidth / 24) * 6 - 48 - 24 + 'px' }"
                             >
                             </div>
 						</div>
@@ -215,6 +217,7 @@
                                 id="popularVideoEcharts"
                                 style="width:100%; height:50px; margin:0 auto;"
                                 ref="popularVideoEcharts"
+								:style="{ width: (clientWidth / 24) * 6 - 48 - 24 + 'px' }"
                             >
                             </div>
 						</div>

+ 2 - 2
vue.config.js

@@ -80,13 +80,13 @@ module.exports = {
 				// target: 'http://192.168.1.219:8081', //请求本地 需要jeecg-boot后台项目  赵西安
 				// target: 'http://192.168.1.193:8080', //请求本地 需要jeecg-boot后台项目  李煜一
 				// target: 'http://192.168.1.193:31012', //请求本地 需要jeecg-boot后台项目  李煜一
-				//  target: 'http://api.tjyourong.com.cn', //请求本地 需要jeecg-boot后台项目
+				 target: 'http://api.tjyourong.com.cn', //请求本地 需要jeecg-boot后台项目
 				// target: 'https://trac.tjyourong.com.cn', //请求本地 需要jeecg-boot后台项目
 				// target: 'http://39.106.184.70:8088/', //请求本地 需要jeecg-boot后台项目
 				//  target: 'http://adsp.tjyourong.com.cn/', //请求本地 需要jeecg-boot后台项目
 				// target: 'http://192.168.1.251/', //请求本地 需要jeecg-boot后台项目
 				// target:'http://118.24.244.213:8804',
-				target: 'http://192.168.1.43:9090', // 子安
+				// target: 'http://192.168.1.43:9090', // 子安
 				// target: 'http://192.168.1.8:8806', // 学超
 				// target:'http://139.186.165.84:8806', //测试
 				// target:'http://apipre.tjyourong.com.cn', //预生产