|
@@ -33,29 +33,9 @@
|
|
<div class="main-wrap">
|
|
<div class="main-wrap">
|
|
<div class="report-action-wrap">
|
|
<div class="report-action-wrap">
|
|
<ul class="top-type-list">
|
|
<ul class="top-type-list">
|
|
- <li class="item">
|
|
|
|
- <img class="icon" src="~@/assets/img/smartReport/icon04.png" alt="">
|
|
|
|
- <span>图库</span>
|
|
|
|
- </li>
|
|
|
|
- <li class="item">
|
|
|
|
- <img class="icon" src="~@/assets/img/smartReport/icon05.png" alt="">
|
|
|
|
- <span>ETA表格</span>
|
|
|
|
- </li>
|
|
|
|
- <li class="item">
|
|
|
|
- <img class="icon" src="~@/assets/img/smartReport/icon06.png" alt="">
|
|
|
|
- <span>统计分析</span>
|
|
|
|
- </li>
|
|
|
|
- <li class="item">
|
|
|
|
- <img class="icon" src="~@/assets/img/smartReport/icon07.png" alt="">
|
|
|
|
- <span>商品价格曲线</span>
|
|
|
|
- </li>
|
|
|
|
- <li class="item">
|
|
|
|
- <img class="icon" src="~@/assets/img/smartReport/icon08.png" alt="">
|
|
|
|
- <span>沙盘图</span>
|
|
|
|
- </li>
|
|
|
|
- <li class="item">
|
|
|
|
- <img class="icon" src="~@/assets/img/smartReport/icon09.png" alt="">
|
|
|
|
- <span>语义分析</span>
|
|
|
|
|
|
+ <li class="item" v-for="item in topTypeList" :key="item.name" @click="handleShowRight(item)">
|
|
|
|
+ <img class="icon" :src="item.icon" alt="">
|
|
|
|
+ <span>{{item.name}}</span>
|
|
</li>
|
|
</li>
|
|
</ul>
|
|
</ul>
|
|
<!-- 公共组件 -->
|
|
<!-- 公共组件 -->
|
|
@@ -131,22 +111,25 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <div class="right-action-wrap" v-show="activeId">
|
|
|
|
- <div class="close-icon" @click="activeId=''">
|
|
|
|
|
|
+ <div class="right-action-wrap" v-show="showRight">
|
|
|
|
+ <div class="close-icon" @click="handleCloseRight">
|
|
<img src="~@/assets/img/smartReport/icon14.png" alt="">
|
|
<img src="~@/assets/img/smartReport/icon14.png" alt="">
|
|
</div>
|
|
</div>
|
|
<TextEdit
|
|
<TextEdit
|
|
- v-if="activeCompType==='text'"
|
|
|
|
|
|
+ v-if="rightType==='text'"
|
|
:key="activeId"
|
|
:key="activeId"
|
|
:content="activeContent"
|
|
:content="activeContent"
|
|
@textChange="handleTextChange"
|
|
@textChange="handleTextChange"
|
|
/>
|
|
/>
|
|
<ImgEdit
|
|
<ImgEdit
|
|
- v-if="activeCompType==='img'"
|
|
|
|
|
|
+ v-if="rightType==='img'"
|
|
:key="activeId"
|
|
:key="activeId"
|
|
:content="activeContent"
|
|
:content="activeContent"
|
|
@imgChange="handleTextChange"
|
|
@imgChange="handleTextChange"
|
|
/>
|
|
/>
|
|
|
|
+ <ETAChart
|
|
|
|
+ v-if="rightType==='etaChart'"
|
|
|
|
+ />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -160,6 +143,8 @@ import ImgComp from './components/ImgComp.vue'
|
|
import _ from 'lodash'
|
|
import _ from 'lodash'
|
|
import TextEdit from './components/TextEdit.vue'
|
|
import TextEdit from './components/TextEdit.vue'
|
|
import ImgEdit from './components/ImgEdit.vue'
|
|
import ImgEdit from './components/ImgEdit.vue'
|
|
|
|
+import ETAChart from './components/ETAChart.vue'
|
|
|
|
+import { getPublicSettingsApi } from '@/api/modules/oldApi';
|
|
export default {
|
|
export default {
|
|
name:"smartReportEdit",
|
|
name:"smartReportEdit",
|
|
components: {
|
|
components: {
|
|
@@ -168,10 +153,43 @@ export default {
|
|
ChartComp,
|
|
ChartComp,
|
|
ImgComp,
|
|
ImgComp,
|
|
TextEdit,
|
|
TextEdit,
|
|
- ImgEdit
|
|
|
|
|
|
+ ImgEdit,
|
|
|
|
+ ETAChart
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+ topTypeList:[
|
|
|
|
+ {
|
|
|
|
+ name:'图库',
|
|
|
|
+ type:'etaChart',
|
|
|
|
+ icon:require('@/assets/img/smartReport/icon04.png')
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ name:'ETA表格',
|
|
|
|
+ type:'etaSheet',
|
|
|
|
+ icon:require('@/assets/img/smartReport/icon05.png')
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ name:'统计分析',
|
|
|
|
+ type:'statisticAnalysis',
|
|
|
|
+ icon:require('@/assets/img/smartReport/icon06.png')
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ name:'商品价格曲线',
|
|
|
|
+ type:'etaPriceChart',
|
|
|
|
+ icon:require('@/assets/img/smartReport/icon07.png')
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ name:'沙盘图',
|
|
|
|
+ type:'etaSandBox',
|
|
|
|
+ icon:require('@/assets/img/smartReport/icon08.png')
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ name:'语义分析',
|
|
|
|
+ type:'semanticAnalysis',
|
|
|
|
+ icon:require('@/assets/img/smartReport/icon09.png')
|
|
|
|
+ }
|
|
|
|
+ ],
|
|
compList:[
|
|
compList:[
|
|
{
|
|
{
|
|
compId:1,
|
|
compId:1,
|
|
@@ -182,14 +200,25 @@ export default {
|
|
compId:2,
|
|
compId:2,
|
|
compType:'img',
|
|
compType:'img',
|
|
icon:require('@/assets/img/smartReport/icon11.png')
|
|
icon:require('@/assets/img/smartReport/icon11.png')
|
|
- }
|
|
|
|
|
|
+ },
|
|
|
|
+ // {
|
|
|
|
+ // compId:3,
|
|
|
|
+ // compType:'chart',
|
|
|
|
+ // },
|
|
|
|
+ // {
|
|
|
|
+ // compId:4,
|
|
|
|
+ // compType:'sheet',
|
|
|
|
+ // }
|
|
|
|
+
|
|
],
|
|
],
|
|
conList:[],
|
|
conList:[],
|
|
activeId:'',
|
|
activeId:'',
|
|
- activeCompType:'',
|
|
|
|
activeContent:'',
|
|
activeContent:'',
|
|
activePindex:'',
|
|
activePindex:'',
|
|
activeCindex:'',
|
|
activeCindex:'',
|
|
|
|
+ showRight:false,
|
|
|
|
+ rightType:''
|
|
|
|
+
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
@@ -214,6 +243,7 @@ export default {
|
|
compId:compData.compId,
|
|
compId:compData.compId,
|
|
compType:compData.compType,
|
|
compType:compData.compType,
|
|
id:this.getCompId(compData.compType),
|
|
id:this.getCompId(compData.compType),
|
|
|
|
+ content:compData.content||'',
|
|
child:[]
|
|
child:[]
|
|
}
|
|
}
|
|
// console.log(tempCompData);
|
|
// console.log(tempCompData);
|
|
@@ -316,7 +346,7 @@ export default {
|
|
console.log('container-remove操作------------------->');
|
|
console.log('container-remove操作------------------->');
|
|
},
|
|
},
|
|
|
|
|
|
- // 富文本编辑组件数据变化
|
|
|
|
|
|
+ // 富文本编辑组件/图片组件数据变化
|
|
handleTextChange(e){
|
|
handleTextChange(e){
|
|
console.log(e);
|
|
console.log(e);
|
|
this.activeContent=e
|
|
this.activeContent=e
|
|
@@ -340,12 +370,33 @@ export default {
|
|
//{item:数据,index:父序号,cindex:子序号}
|
|
//{item:数据,index:父序号,cindex:子序号}
|
|
if(!item.id) return
|
|
if(!item.id) return
|
|
this.activeId=item.id
|
|
this.activeId=item.id
|
|
- this.activeCompType=item.compType
|
|
|
|
|
|
+ this.showRight=true
|
|
|
|
+ this.rightType=item.compType
|
|
this.activeContent=item.content||''
|
|
this.activeContent=item.content||''
|
|
this.activePindex=index
|
|
this.activePindex=index
|
|
this.activeCindex=cindex>=0?cindex:''
|
|
this.activeCindex=cindex>=0?cindex:''
|
|
},
|
|
},
|
|
|
|
|
|
|
|
+ //点击顶部插入图或者图表等类型
|
|
|
|
+ handleShowRight(item){
|
|
|
|
+ this.rightType=item.type
|
|
|
|
+ this.activeId=''
|
|
|
|
+ this.activeContent=''
|
|
|
|
+ this.activePindex=''
|
|
|
|
+ this.activeCindex=''
|
|
|
|
+ this.showRight=true
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ // 关闭右侧
|
|
|
|
+ handleCloseRight(){
|
|
|
|
+ this.activeId=''
|
|
|
|
+ this.activeContent=''
|
|
|
|
+ this.activePindex=''
|
|
|
|
+ this.activeCindex=''
|
|
|
|
+ this.showRight=false
|
|
|
|
+ this.rightType=''
|
|
|
|
+ },
|
|
|
|
+
|
|
getComponentName(item){
|
|
getComponentName(item){
|
|
const temMap=new Map([
|
|
const temMap=new Map([
|
|
['text',TextComp],
|
|
['text',TextComp],
|
|
@@ -357,9 +408,20 @@ export default {
|
|
// 生产随机id
|
|
// 生产随机id
|
|
getCompId(type){
|
|
getCompId(type){
|
|
return type+new Date().getTime()
|
|
return type+new Date().getTime()
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ /* 获取动态配置 外部动态链接 */
|
|
|
|
+ async getPublicSettings() {
|
|
|
|
+ const res = await getPublicSettingsApi();
|
|
|
|
+ if(res.Ret !== 200) return
|
|
|
|
+
|
|
|
|
+ this.$store.commit('SET_DYNAMIC_LINK',res.Data)
|
|
}
|
|
}
|
|
|
|
|
|
},
|
|
},
|
|
|
|
+ created() {
|
|
|
|
+ this.getPublicSettings()
|
|
|
|
+ },
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
|
|
|
|
@@ -528,6 +590,7 @@ div{
|
|
.report-drag-item-wrap_child-wrap{
|
|
.report-drag-item-wrap_child-wrap{
|
|
display: flex;
|
|
display: flex;
|
|
gap: 20px;
|
|
gap: 20px;
|
|
|
|
+ min-height: 10px;
|
|
}
|
|
}
|
|
.report-drag-item-wrap_child_content{
|
|
.report-drag-item-wrap_child_content{
|
|
min-height: 80px;
|
|
min-height: 80px;
|