瀏覽代碼

数据图表版本

zhengjinyi 1 年之前
父節點
當前提交
89a6b83b8c

+ 4 - 1
src/main/resources/static/css/supplier-center/encyclopedia/charts.css

@@ -97,7 +97,10 @@
   .header-title p{line-height: 10vw;font-size: 4vw;color: #333333;font-weight: bold;float: left;}
   .header-title p.small{font-size: 3.4vw;color: #666666;font-weight: normal;}
   .header-time{width: 100%;height:100%;float: left;box-sizing: border-box; }
-  .chart-content{width: 100%;margin: 0 auto;padding-top: 33vw;}
+  .chart-content{width: 100%;margin: 0 auto;padding-top: 30vw;}
+  .chart-content-empty{ width: 100%;height: 180vw; box-sizing: border-box;padding: 50vw 0;text-align: center;color: #4A4F58;background: #FFF; }
+  .chart-content-empty img{ width: 40vw;height: auto; }
+  .chart-content-empty p{color: #999999; line-height: 10vw;font-size:3.2vw;}
   .chart-title{ width: 100%;float: left; line-height: 8vw;font-size: 4.6vw;color: #333333;font-weight: bold;box-sizing: border-box;padding: 0 3vw;background: #FFFFFF;}
   .chart-title span{line-height: 8vw;font-size: 3.4vw;color: #333333;font-weight: normal;}
   .chart-content-text{ min-height: 60vw;width: 100%;box-sizing: border-box;padding: 3vw;background: #FFFFFF;float: left;margin-bottom: 4vw; }

+ 0 - 14
src/main/resources/static/js/supplier-center/encyclopedia/charts.js

@@ -22,20 +22,6 @@ const chartContent = new Vue({
             marketReportId:'',
             startTime:'',
             endTime:''
-        },
-
-        pickerOptions1: {
-            disabledDate(time) {
-                // 获取时间选择器的月份信息
-                const timeYear = time.getFullYear(); // 获取时间选择器的年份
-                let timeMonth = time.getMonth() + 1; // 获取时间选择器的月份
-                if (timeMonth >= 1 && timeMonth <= 9) {
-                    timeMonth = "0" + timeMonth; // 如果月份小于10,前面补0
-                }
-                const elTimeData = timeYear.toString() + timeMonth.toString(); // 组合年份和月份字符串
-                // 根据需要禁用多个月份,这里禁用了2021年的10月和11月作为选择范围
-                return elTimeData === "202210" || elTimeData === "202211" || elTimeData === "202312";
-            }
         }
     },
     computed: {

+ 17 - 0
src/main/resources/static/js/supplier-center/encyclopedia/mixins/chartsMixin.js

@@ -8,6 +8,23 @@ const chartsMixin = function () {// 通知消息
             }
         },
         computed:{
+            pickerOptionsH5(){
+                const _self = this
+                return {
+                    disabledDate(time) {
+                        // 获取时间选择器的年份信息
+                        const timeYear = time.getFullYear(); // 获取时间选择器的年份
+                        // 获取时间选择器的月份信息
+                        let timeMonth = time.getMonth() + 1; // 获取时间选择器的月份
+                        if (timeMonth >= 1 && timeMonth <= 9) {
+                            timeMonth = "0" + timeMonth; // 如果月份小于10,前面补0
+                        }
+                        const elTimeData = timeYear.toString() + timeMonth.toString(); // 组合年份和月份字符串
+                        // 根据需要禁用多个月份,这里禁用了2021年的10月和11月作为选择范围
+                        return _self.yearMonth.includes(elTimeData)
+                    }
+                }
+            },
             pickerOptions(){
                 const _self = this
                 return {

+ 2 - 2
src/main/resources/templates/supplier-center/encyclopedia/charts.html

@@ -58,7 +58,7 @@
                                 value-format="yyyy-MM"
                                 style="width: 150px"
                                 @change="shopChartPreview"
-                                :picker-options="pickerOptions1"
+                                :picker-options="pickerOptionsH5"
                                 placeholder="选择开始月份">
                         </el-date-picker>
@@ -69,7 +69,7 @@
                                 format="yyyy-MM"
                                 value-format="yyyy-MM"
                                 style="width: 150px"
-                                :picker-options="pickerOptions1"
+                                :picker-options="pickerOptionsH5"
                                 @change="shopChartPreview"
                                 placeholder="选择结束月份">
                         </el-date-picker>