|
@@ -1,15 +1,89 @@
|
|
<script setup>
|
|
<script setup>
|
|
import {ref} from 'vue'
|
|
import {ref} from 'vue'
|
|
|
|
+import {apiMenuList} from '@/api/user'
|
|
import ETAChart from './ETAChart.vue'
|
|
import ETAChart from './ETAChart.vue'
|
|
import MyETAChart from './MyETAChart.vue'
|
|
import MyETAChart from './MyETAChart.vue'
|
|
import SandTableImg from './SandTableImg.vue'
|
|
import SandTableImg from './SandTableImg.vue'
|
|
import SheetTableChart from './SheetTableChart.vue'
|
|
import SheetTableChart from './SheetTableChart.vue'
|
|
import SemanticsImg from './SemanticsImg.vue'
|
|
import SemanticsImg from './SemanticsImg.vue'
|
|
|
|
+import MaterialImg from './reportMaterial/Index.vue'
|
|
|
|
+import StatisticAnalysis from './StatisticAnalysis.vue'
|
|
|
|
+import PriceChart from './PriceChart.vue'
|
|
|
|
+import BalanceSheet from './BalanceSheet/Index.vue'
|
|
|
|
|
|
const emits=defineEmits(['insert'])
|
|
const emits=defineEmits(['insert'])
|
|
|
|
|
|
-const typeOpt=['图表插入','批量插入','表格插入','沙盘插入','语义分析插入']
|
|
|
|
-const activeType=ref('图表插入')
|
|
|
|
|
|
+// const typeOpt=['素材库','图表插入','批量插入','表格插入','沙盘插入','语义分析插入']
|
|
|
|
+const typeOpt=ref([
|
|
|
|
+ {
|
|
|
|
+ value:'素材库',
|
|
|
|
+ label:'素材库',
|
|
|
|
+ path:'materialList'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ value:'图表插入',
|
|
|
|
+ label:'图库',
|
|
|
|
+ path:''
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ value:'批量插入',
|
|
|
|
+ label:'我的图库',
|
|
|
|
+ path:'mychart'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ value:'表格插入',
|
|
|
|
+ label:'表格',
|
|
|
|
+ path:''
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ value:'平衡表',
|
|
|
|
+ label:'平衡表',
|
|
|
|
+ path:'sheetBalanceList'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ value:'统计分析',
|
|
|
|
+ label:'统计分析',
|
|
|
|
+ path:''
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ value:'商品价格曲线',
|
|
|
|
+ label:'商品价格曲线',
|
|
|
|
+ path:'commordityChartBase'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ value:'沙盘插入',
|
|
|
|
+ label:'逻辑图',
|
|
|
|
+ path:'sandlist'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ value:'语义分析插入',
|
|
|
|
+ label:'语义分析',
|
|
|
|
+ path:'semanticsPage'
|
|
|
|
+ },
|
|
|
|
+])
|
|
|
|
+const activeType=ref('素材库')
|
|
|
|
+async function initTypeOpts(){
|
|
|
|
+ const res=await apiMenuList()
|
|
|
|
+ if(res.Ret===200){
|
|
|
|
+ const menuData=res.Data.List||[]
|
|
|
|
+ let pathArr=[]
|
|
|
|
+ menuData.forEach(item=>{
|
|
|
|
+ if(item.children){
|
|
|
|
+ item.children.forEach(_item=>{
|
|
|
|
+ pathArr.push(_item.path)
|
|
|
|
+ })
|
|
|
|
+ }else{
|
|
|
|
+ pathArr.push(item.path)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ typeOpt.value=typeOpt.value.filter(i=>!i.path||pathArr.includes(i.path))
|
|
|
|
+ if(typeOpt.value.length>0){
|
|
|
|
+ activeType.value=typeOpt.value[0].value
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+initTypeOpts()
|
|
|
|
+
|
|
|
|
|
|
let list=ref([])
|
|
let list=ref([])
|
|
|
|
|
|
@@ -18,14 +92,14 @@ function handleSelectChart(data){
|
|
}
|
|
}
|
|
|
|
|
|
function handleConfirmInsert(){
|
|
function handleConfirmInsert(){
|
|
- if(['图表插入','批量插入'].includes(activeType.value)){
|
|
|
|
|
|
+ if(['图表插入','批量插入','统计分析','商品价格曲线'].includes(activeType.value)){
|
|
console.log(list.value)
|
|
console.log(list.value)
|
|
let filterList = list.value;
|
|
let filterList = list.value;
|
|
|
|
|
|
emits('insert',{list: filterList,type:'iframe',chartType:'chart'})
|
|
emits('insert',{list: filterList,type:'iframe',chartType:'chart'})
|
|
- }else if(activeType.value==='表格插入'){
|
|
|
|
|
|
+ }else if(['平衡表','表格插入'].includes(activeType.value)){
|
|
emits('insert',{list:list.value,type:'iframe',chartType:'sheet'})
|
|
emits('insert',{list:list.value,type:'iframe',chartType:'sheet'})
|
|
- }else if(['沙盘插入','语义分析插入'].includes(activeType.value)){
|
|
|
|
|
|
+ }else if(['沙盘插入','语义分析插入','素材库'].includes(activeType.value)){
|
|
emits('insert',{list:list.value,type:'img',chartType:''})
|
|
emits('insert',{list:list.value,type:'img',chartType:''})
|
|
}
|
|
}
|
|
|
|
|
|
@@ -37,11 +111,11 @@ function handleConfirmInsert(){
|
|
<div class="report-insert-content-wrap">
|
|
<div class="report-insert-content-wrap">
|
|
<ul class="top-type-box">
|
|
<ul class="top-type-box">
|
|
<li
|
|
<li
|
|
- :class="['item',activeType===item&&'active']"
|
|
|
|
|
|
+ :class="['item',activeType===item.value&&'active']"
|
|
v-for="item in typeOpt"
|
|
v-for="item in typeOpt"
|
|
:key="item"
|
|
:key="item"
|
|
- @click="activeType=item;list=[]"
|
|
|
|
- >{{item}}</li>
|
|
|
|
|
|
+ @click="activeType=item.value;list=[]"
|
|
|
|
+ >{{item.label}}</li>
|
|
</ul>
|
|
</ul>
|
|
<div class="main-box">
|
|
<div class="main-box">
|
|
<ETAChart @update="handleSelectChart" v-if="activeType==='图表插入'"/>
|
|
<ETAChart @update="handleSelectChart" v-if="activeType==='图表插入'"/>
|
|
@@ -49,8 +123,13 @@ function handleConfirmInsert(){
|
|
<SheetTableChart @update="handleSelectChart" v-if="activeType==='表格插入'"/>
|
|
<SheetTableChart @update="handleSelectChart" v-if="activeType==='表格插入'"/>
|
|
<SandTableImg @update="handleSelectChart" v-if="activeType==='沙盘插入'"/>
|
|
<SandTableImg @update="handleSelectChart" v-if="activeType==='沙盘插入'"/>
|
|
<SemanticsImg @update="handleSelectChart" v-if="activeType==='语义分析插入'"/>
|
|
<SemanticsImg @update="handleSelectChart" v-if="activeType==='语义分析插入'"/>
|
|
|
|
+ <MaterialImg @update="handleSelectChart" v-if="activeType==='素材库'"/>
|
|
|
|
+ <StatisticAnalysis @update="handleSelectChart" v-if="activeType==='统计分析'"/>
|
|
|
|
+ <PriceChart @update="handleSelectChart" v-if="activeType==='商品价格曲线'"/>
|
|
|
|
+ <BalanceSheet @update="handleSelectChart" @insert="handleConfirmInsert" v-if="activeType==='平衡表'"/>
|
|
|
|
+
|
|
</div>
|
|
</div>
|
|
- <div class="bot-btn">
|
|
|
|
|
|
+ <div class="bot-btn" v-if="activeType!=='平衡表'">
|
|
<van-button type="primary" block @click="handleConfirmInsert" :disabled="list.length===0">插入</van-button>
|
|
<van-button type="primary" block @click="handleConfirmInsert" :disabled="list.length===0">插入</van-button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -73,7 +152,7 @@ function handleConfirmInsert(){
|
|
.item{
|
|
.item{
|
|
padding: 24px 0;
|
|
padding: 24px 0;
|
|
flex: 1;
|
|
flex: 1;
|
|
- min-width: 96PX;
|
|
|
|
|
|
+ min-width: 105PX;
|
|
text-align: center;
|
|
text-align: center;
|
|
border-top-right-radius: var(--van-popup-round-radius);
|
|
border-top-right-radius: var(--van-popup-round-radius);
|
|
border-top-left-radius: var(--van-popup-round-radius);
|
|
border-top-left-radius: var(--van-popup-round-radius);
|