|
@@ -65,7 +65,11 @@
|
|
|
:move="handleParentMove"
|
|
|
>
|
|
|
<div
|
|
|
- :class="['report-drag-item-wrap',activeId===item.id?'blue-bg':'']"
|
|
|
+ :class="[
|
|
|
+ 'report-drag-item-wrap',
|
|
|
+ activeId===item.id?'blue-bg':'',
|
|
|
+ item.child&&!item.child.length?'report-drag-item-out':''
|
|
|
+ ]"
|
|
|
v-for="item,index in conList"
|
|
|
:key="item.id"
|
|
|
:comp-type="item.compType"
|
|
@@ -81,6 +85,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"/>
|
|
@@ -126,7 +131,7 @@
|
|
|
<img src="~@/assets/img/smartReport/icon14.png" alt="">
|
|
|
</div>
|
|
|
<div style="overflow-x:auto">
|
|
|
- <div style="min-width:600px">
|
|
|
+ <div style="min-width:800px">
|
|
|
<TextEdit
|
|
|
v-if="rightType==='text'"
|
|
|
:key="activeId"
|
|
@@ -154,7 +159,7 @@
|
|
|
<ETASandBox v-if="rightType==='etaSandBox'"/>
|
|
|
<!-- 语义分析 -->
|
|
|
<SemanticAnalysis v-if="rightType==='semanticAnalysis'"/>
|
|
|
- </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -342,13 +347,28 @@ export default {
|
|
|
handleResizeP(e,index){
|
|
|
this.isDragResize=true
|
|
|
e.preventDefault()
|
|
|
+ const parentBox=e.target.parentNode.parentNode
|
|
|
+ const parentBoxWidth=parentBox.offsetWidth
|
|
|
+
|
|
|
const targetBox=e.target.parentNode
|
|
|
const targetBoxHeight=targetBox.offsetHeight
|
|
|
+ const targetBoxWidth=targetBox.offsetWidth
|
|
|
+
|
|
|
const startY=e.clientY
|
|
|
+ const startX=e.clientX
|
|
|
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`
|
|
|
+
|
|
|
+ // 去除minhight
|
|
|
+ targetBox.style.minHeight=`10px`
|
|
|
+
|
|
|
+ // 计算宽度
|
|
|
+ const w=mouseEl.clientX-startX+targetBoxWidth
|
|
|
+ const resW= (w/parentBoxWidth)*100//计算出的百分比结果值
|
|
|
+ targetBox.style.width=`${resW>=100?100:resW}%`
|
|
|
}
|
|
|
document.onmouseup=(el)=>{
|
|
|
console.log(targetBox.style.cssText);
|
|
@@ -394,7 +414,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){
|
|
@@ -437,9 +458,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={
|
|
@@ -447,6 +468,7 @@ export default {
|
|
|
compType:'chart',
|
|
|
content:`${LINK_CHART_URL}?code=${temarr[0].UniqueCode}`,
|
|
|
id:this.getCompId(`chart${temarr[0].UniqueCode}_`),
|
|
|
+ style:'height:350px',
|
|
|
child:[]
|
|
|
}
|
|
|
}else{
|
|
@@ -456,6 +478,7 @@ export default {
|
|
|
compType:'chart',
|
|
|
content:`${LINK_CHART_URL}?code=${e.UniqueCode}`,
|
|
|
id:this.getCompId(`chart${e.UniqueCode}_`),
|
|
|
+ style:'height:350px',
|
|
|
child:[]
|
|
|
})
|
|
|
});
|
|
@@ -507,6 +530,7 @@ export default {
|
|
|
compType:compData.compType,
|
|
|
id:this.getCompId(compData.compType),
|
|
|
content:compData.content||'',
|
|
|
+ style:compData.compType==='chart'?'height:350px':'',
|
|
|
child:[]
|
|
|
}
|
|
|
// console.log(tempCompData);
|
|
@@ -538,6 +562,7 @@ export default {
|
|
|
compType:obj.compType,
|
|
|
id:obj.id,
|
|
|
content:obj.content,
|
|
|
+ style:obj.compType==='chart'?'height:350px':'',
|
|
|
child:[]
|
|
|
},
|
|
|
{
|
|
@@ -545,6 +570,7 @@ export default {
|
|
|
compType:compData.compType,
|
|
|
content:compData.content||'',
|
|
|
id:this.getCompId(compData.compType),
|
|
|
+ style:compData.compType==='chart'?'height:350px':'',
|
|
|
child:[]
|
|
|
}
|
|
|
]
|
|
@@ -567,6 +593,7 @@ export default {
|
|
|
compType:obj.compType,
|
|
|
id:obj.id,
|
|
|
content:obj.content,
|
|
|
+ style:obj.compType==='chart'?'height:350px':'',
|
|
|
child:[]
|
|
|
},
|
|
|
{
|
|
@@ -967,18 +994,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;
|
|
@@ -1087,11 +1131,10 @@ div{
|
|
|
border-radius: 4px;
|
|
|
border: 1px solid var(--gary-gy-5-line, #C8CDD9);
|
|
|
background: #FFF;
|
|
|
- padding: 20px 20px 20px 64px;
|
|
|
+ padding: 20px 20px 20px 44px;
|
|
|
height: calc(100vh - 180px);
|
|
|
position: relative;
|
|
|
overflow-y: auto;
|
|
|
-
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -1099,14 +1142,19 @@ div{
|
|
|
|
|
|
.main-wrap{
|
|
|
.report-html-wrap{
|
|
|
+ &::after{
|
|
|
+ content: '';
|
|
|
+ display: block;
|
|
|
+ height: 300px;
|
|
|
+ }
|
|
|
min-height: 100%;
|
|
|
.report-drag-item-wrap{
|
|
|
width: 100%;
|
|
|
- padding: 20px;
|
|
|
+ padding: 3px;
|
|
|
min-height: 80px;
|
|
|
border: 1px dashed #0052D9;
|
|
|
position: relative;
|
|
|
- margin-bottom: 10px;
|
|
|
+ margin-bottom: 3px;
|
|
|
&:hover{
|
|
|
border-style: solid;
|
|
|
.opt-btn-box{
|
|
@@ -1148,11 +1196,20 @@ div{
|
|
|
height: 8px;
|
|
|
display: none;
|
|
|
border: 1px solid #0052D9;
|
|
|
- cursor: n-resize;
|
|
|
+ cursor: nw-resize;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .report-drag-item-out{
|
|
|
+ .report-drag-item-wrap_child-wrap{
|
|
|
+ position: absolute;
|
|
|
+ width: 40px;
|
|
|
+ right: 0;
|
|
|
+ top: 0;
|
|
|
+ height: 100%;
|
|
|
}
|
|
|
}
|
|
|
.report-drag-item-wrap_child-wrap{
|
|
|
- min-height: 30px;
|
|
|
+ // min-height: 30px;
|
|
|
}
|
|
|
.report-drag-item-wrap_child_content{
|
|
|
min-height: 80px;
|