Browse Source

智能研报优化

jwyu 1 year ago
parent
commit
80e98bf70e
2 changed files with 41 additions and 16 deletions
  1. 38 13
      src/views/smartReport/editReport.vue
  2. 3 3
      src/views/smartReport/reportDetail.vue

+ 38 - 13
src/views/smartReport/editReport.vue

@@ -81,6 +81,7 @@
                             <div 
                                 v-if="item.child&&!item.child.length"
                                 class="report-drag-item-wrap_content"
+                                style="width:100%;height:100%"
                                 :data-id="item.id"
                             >
                                 <component :is="getComponentName(item)" :compData="item"/>
@@ -354,7 +355,8 @@ export default {
             document.onmousemove=(mouseEl)=>{
                 mouseEl.preventDefault()
                 const h=mouseEl.clientY-startY+targetBoxHeight
-                targetBox.style.minHeight=`${h<50?50:h}px`
+                // targetBox.style.minHeight=`${h<50?50:h}px`
+                targetBox.style.height=`${h}px`
 
                 // 计算宽度
                 const w=mouseEl.clientX-startX+targetBoxWidth
@@ -405,7 +407,8 @@ export default {
                 }
                 // console.log('改变的宽度',computerW);
 
-                targetBox.style.height=`${h<50?50:h}px`
+                // targetBox.style.height=`${h<50?50:h}px`
+                targetBox.style.height=`${h}px`
             }   
             document.onmouseup=(el)=>{
                 if(document.onmousemove){
@@ -448,9 +451,9 @@ export default {
             const LINK_CHART_URL = this.$setting.dynamicOutLinks.ChartViewUrl+'/chartshow';
             // console.log(list);
             let arr=[]
-            // 分成个一组
-            for (let index = 0; index < list.length; index+=3) {
-                const temarr=list.slice(index,index+3)
+            // 分成个一组
+            for (let index = 0; index < list.length; index+=2) {
+                const temarr=list.slice(index,index+2)
                 let resArr={child:[]}
                 if(temarr.length===1){//落单了
                     resArr={
@@ -978,18 +981,35 @@ export default {
 	},
 }
 </script>
+
+<style lang="scss">
+// 拖拽时的样式
+.edit-smart-report-page{
+.sortable-ghost{
+    position: relative !important;
+    &::before{
+        content: '' !important;
+        display: block !important;
+        width: 100% !important;
+        height: 10px !important;
+        background-color: rgba(64, 158, 255, 0.74) !important;
+        position: absolute !important;
+        left: 0 !important;
+        top: 0 !important;
+    }
+    // height: 5px !important;
+    // background-color: #0052D9 !important;
+    // overflow: hidden !important;
+    // padding: 0 !important;
+    // min-height: 0 !important;
+    // border: none !important;
+}
+}
+</style>
 <style lang='scss' scoped>
 div{
     box-sizing: border-box;
 }
-// .sortable-ghost{
-//     height: 5px !important;
-//     background-color: #0052D9 !important;
-//     overflow: hidden !important;
-//     padding: 0 !important;
-//     min-height: 0 !important;
-//     border: none !important;
-// }
 .edit-smart-report-page{
     background: var(--unnamed, #F2F6FA);
     min-width: 100vw;
@@ -1110,6 +1130,11 @@ div{
 
 .main-wrap{
     .report-html-wrap{
+        &::after{
+            content: '';
+            display: block;
+            height: 300px;
+        }
         min-height: 100%;
         .report-drag-item-wrap{
             width: 100%;

+ 3 - 3
src/views/smartReport/reportDetail.vue

@@ -1,13 +1,13 @@
 <template>
     <div class="smart-report-detail">
         <div class="main-box">
-            <div class="top-box">
+            <!-- <div class="top-box">
                 <div class="title">{{reportInfo&&reportInfo.Title}}</div>
                 <div class="flex">
                     <span>{{reportInfo&&reportInfo.Author}}</span>
                     <span>{{reportInfo&&reportInfo.PublishTime}}</span>
                 </div>
-            </div>
+            </div> -->
             <div class="html-wrap" v-html="content"></div>
         </div>
         <div class="right-opt-box" v-if="$route.query.type!=='preview'">
@@ -195,7 +195,7 @@ div{
     }
     .main-box{
         width: 800px;
-        margin: 0 auto;
+        margin: 20px auto;
         border: 1px solid var(--gary-gy-5-line, #C8CDD9);
         border-radius: 4px;
         overflow: hidden;