jwyu 1 рік тому
батько
коміт
89c768c1d1

+ 1 - 1
src/views/smartReport/components/ChartComp.vue

@@ -1,7 +1,7 @@
 <template>
     <div 
         class="report-comp-item chart-comp"
-        style="height:300px"
+        style="height:300px;width:100%;overflow: hidden;"
     >
         <iframe :src="compData.content" style="width:100%;height:100%;border-width:0px; "></iframe>
     </div>

+ 20 - 3
src/views/smartReport/components/ETAChart.vue

@@ -2,8 +2,8 @@
     <div class="eta-chart-wrap">
         <div class="top-box">
             <div class="left-card">
-                <span :class="['item',activeType==='ETA图库'?'active':'']">ETA图库</span>
-                <span :class="['item',activeType==='MyETA'?'active':'']">MyETA</span>
+                <span :class="['item',activeType==='ETA图库'?'active':'']" @click="activeTypeChange('ETA图库')">ETA图库</span>
+                <span :class="['item',activeType==='MyETA'?'active':'']" @click="activeTypeChange('MyETA')">MyETA</span>
             </div>
         </div>
         <div class="main-box" v-infinite-scroll="handleLoadMore" :infinite-scroll-immediate="false">
@@ -11,13 +11,16 @@
                 class="onlyshowme-box"
                 v-model="isShowMe" 
                 @change="handleIsShowMeChange"
+                v-if="activeType==='ETA图库'"
             >只看我的</el-checkbox>
             <draggable
+                v-if="activeType==='ETA图库'"
                 :list="list"
                 :group="{ name: 'component', pull: activeType==='ETA图库'?'clone':false, put: false }"
                 class="chart-list-box"
                 animation="300"
                 :sort="false"
+                dragClass="drag-box"
                 tag="div"
             >
                 <div class="chart-item" :comp-data="getCompData(item)" v-for="item in list" :key="item.UniqueCode">
@@ -88,6 +91,19 @@ export default {
             if(this.finished) return
             this.page++
             this.getETAChartList()
+        },
+
+        activeTypeChange(e){
+            if(this.activeType===e) return
+            this.activeType=e
+            if(this.activeType==='ETA图库'){
+                this.page=1
+                this.finished=false
+                this.list=[]
+                this.getETAChartList()
+            }else{
+                
+            }
         }
     },
 }
@@ -139,7 +155,8 @@ div{
         .onlyshowme-box{
             display: block;
             position: sticky;
-            top: 0;
+            top: -20px;
+            padding: 20px 0;
             background-color: #FFF;
         }
         .chart-list-box{

+ 11 - 1
src/views/smartReport/editReport.vue

@@ -424,7 +424,17 @@ export default {
     },
 }
 </script>
-
+<style lang="scss">
+    .sortable-ghost{
+            width: 200px !important;
+            height: 180px !important;
+            background-color: #fff !important;
+            img{
+                width: 100% !important;
+                height: 100% !important;
+            }
+        }
+</style>
 <style lang='scss' scoped>
 div{
     box-sizing: border-box;