|
@@ -1,10 +1,788 @@
|
|
|
<script setup>
|
|
|
-import { ref } from 'vue'
|
|
|
+import { nextTick, reactive, ref,toRefs } from 'vue'
|
|
|
+import ReportInsertContent from '../components/reportInsert/Index.vue'
|
|
|
+// import ReportPublishTimeSet from './components/ReportPublishTimeSet.vue'
|
|
|
+import apiReport from '@/api/report'
|
|
|
+import {getSystemInfo} from '@/api/common'
|
|
|
+import moment from 'moment'
|
|
|
+import { showToast,showDialog } from 'vant'
|
|
|
+import { useRoute, useRouter } from 'vue-router'
|
|
|
+import {useCachedViewsStore} from '@/store/modules/cachedViews'
|
|
|
+import {usePublicSettingStore} from '@/store/modules/publicSetting'
|
|
|
+import {reportManageBtn,useAuthBtn} from '@/hooks/useAuthBtn'
|
|
|
+import {useReportApprove} from '@/hooks/useReportApprove'
|
|
|
+import {Base64} from 'js-base64'
|
|
|
+import AddReportBaseInfoV2 from '../components/AddReportBaseInfoV2.vue'
|
|
|
+import { useReportHandles } from '../hooks/useReport'
|
|
|
+import draggable from 'vuedraggable'
|
|
|
+import TextComp from './components/TextComp.vue'
|
|
|
+import ChartComp from './components/ChartComp.vue'
|
|
|
+import ImgComp from './components/ImgComp.vue'
|
|
|
+import SheetComp from './components/SheetComp.vue'
|
|
|
|
|
|
+
|
|
|
+const cachedViewsStore=useCachedViewsStore()
|
|
|
+const publicSettingStore = usePublicSettingStore()
|
|
|
+const {isApprove,hasApproveFlow,getEtaConfig,checkClassifyNameArr} = useReportApprove()
|
|
|
+const router=useRouter()
|
|
|
+const route=useRoute()
|
|
|
+const {checkAuthBtn} = useAuthBtn()
|
|
|
+
|
|
|
+// 获取报告详情
|
|
|
+const reportInfo=ref(null)
|
|
|
+const contentChange = ref(false)//内容是否发生变化
|
|
|
+const smartState = reactive({
|
|
|
+ conList: [],//内容列表
|
|
|
+ bgColor:'',//背景色
|
|
|
+ headImg:'',//版头图片
|
|
|
+ endImg:'',//版尾图片
|
|
|
+ headImgId:0,//版头Id
|
|
|
+ endImgId:0,//版尾Id
|
|
|
+ headImgStyle:'',//版头style
|
|
|
+ endImgStyle:'',//版尾style
|
|
|
+ layoutBaseInfo:{
|
|
|
+ 研报标题:'',
|
|
|
+ 研报作者:'',
|
|
|
+ 创建时间:''
|
|
|
+ },
|
|
|
+})
|
|
|
+async function getReportDetail(){
|
|
|
+ const res=await apiReport.getReportDetail({
|
|
|
+ ReportId:Number(route.query.id)
|
|
|
+ })
|
|
|
+ if(res.Ret===200){
|
|
|
+ reportInfo.value=res.Data;
|
|
|
+
|
|
|
+ smartState.conList=res.Data.ContentStruct?JSON.parse(res.Data.ContentStruct):[]
|
|
|
+ smartState.headImg=res.Data.HeadImg
|
|
|
+ smartState.endImg=res.Data.EndImg
|
|
|
+ smartState.headImgId=res.Data.HeadResourceId
|
|
|
+ smartState.endImgId=res.Data.EndResourceId
|
|
|
+ smartState.headImgStyle=res.Data.HeadStyle?JSON.parse(res.Data.HeadStyle):[]
|
|
|
+ smartState.headImgStyle.map(st =>{
|
|
|
+ st.value=st.value || st.label
|
|
|
+ })
|
|
|
+ smartState.endImgStyle=res.Data.EndStyle?JSON.parse(res.Data.EndStyle):[]
|
|
|
+ smartState.endImgStyle.map(st =>{
|
|
|
+ st.value=st.value || st.label
|
|
|
+ })
|
|
|
+ smartState.bgColor=res.Data.CanvasColor
|
|
|
+ smartState.layoutBaseInfo['研报标题']=res.Data.Title
|
|
|
+ smartState.layoutBaseInfo['研报作者']=res.Data.Author
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ reportBaseInfoData.addType=res.Data.AddType
|
|
|
+ reportBaseInfoData.classifyName=[
|
|
|
+ {
|
|
|
+ id:res.Data.ClassifyIdFirst,
|
|
|
+ text:res.Data.ClassifyNameFirst,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id:res.Data.ClassifyIdSecond,
|
|
|
+ text:res.Data.ClassifyNameSecond,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id:res.Data.ClassifyIdThird,
|
|
|
+ text:res.Data.ClassifyNameThird,
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ reportBaseInfoData.author=res.Data.Author ? res.Data.Author.split(',') : ['FICC团队']
|
|
|
+ reportBaseInfoData.frequency=[res.Data.Frequency]
|
|
|
+ reportBaseInfoData.createtime=moment(res.Data.CreateTime).format('YYYY-MM-DD')
|
|
|
+ reportBaseInfoData.title=res.Data.Title
|
|
|
+ reportBaseInfoData.abstract=res.Data.Abstract
|
|
|
+ reportBaseInfoData.cooperationType=res.Data.CollaborateType
|
|
|
+ reportBaseInfoData.cooperationUsers=res.Data.GrandAdminList
|
|
|
+ ? res.Data.GrandAdminList.map(_ => ({
|
|
|
+ NodeId: _.AdminId,
|
|
|
+ NodeName: _.AdminName
|
|
|
+ }))
|
|
|
+ : []
|
|
|
+ reportBaseInfoData.reportLayout=res.Data.ReportLayout
|
|
|
+ reportBaseInfoData.isPublcPublish=res.Data.IsPublicPublish
|
|
|
+
|
|
|
+ nextTick(() => {
|
|
|
+ contentChange.value = false
|
|
|
+ })
|
|
|
+
|
|
|
+ const classify = reportBaseInfoData.classifyName.map(i=>i.id)
|
|
|
+ checkClassifyNameArr(1,classify)
|
|
|
+
|
|
|
+ }
|
|
|
+}
|
|
|
+getReportDetail()
|
|
|
+
|
|
|
+/* map类型对应组件 */
|
|
|
+function getComponentName(item){
|
|
|
+ const temMap=new Map([
|
|
|
+ ['text',TextComp],
|
|
|
+ ['chart',ChartComp],
|
|
|
+ ['img',ImgComp],
|
|
|
+ ['sheet',SheetComp]
|
|
|
+ ])
|
|
|
+ return temMap.get(item.compType)
|
|
|
+}
|
|
|
+
|
|
|
+const isDragResize = ref(false)//是否正在拖动缩放
|
|
|
+// 大盒子的高度缩放
|
|
|
+function handleResizeP(e,index){
|
|
|
+ isDragResize.value=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.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);
|
|
|
+ conList.value[index].style = targetBox.style.cssText
|
|
|
+ el.preventDefault()
|
|
|
+ document.onmousemove=null
|
|
|
+ setTimeout(() => {
|
|
|
+ isDragResize.value=false
|
|
|
+ }, 50);
|
|
|
+
|
|
|
+ }
|
|
|
+}
|
|
|
+// 内部元素的缩放
|
|
|
+function handleResizeC(e,index,cindex,type){
|
|
|
+ this.isDragResize=true
|
|
|
+ e.preventDefault()
|
|
|
+ const parentBox=e.target.parentNode.parentNode
|
|
|
+ const parentBoxWidth=parentBox.offsetWidth
|
|
|
+ console.log(e);
|
|
|
+ const targetBox=e.target.parentNode
|
|
|
+ const targetBoxHeight=targetBox.offsetHeight
|
|
|
+ const targetBoxWidth=targetBox.offsetWidth
|
|
|
+ const startY=e.clientY
|
|
|
+ const startX=e.clientX
|
|
|
+ const initW=targetBoxWidth //拖动前要拖动盒子所占的宽度
|
|
|
+
|
|
|
+ let computerW=0//存放其他兄弟节点要改变的宽度的值
|
|
|
+
|
|
|
+ document.onmousemove=(mouseEl)=>{
|
|
|
+ mouseEl.preventDefault()
|
|
|
+ const h=mouseEl.clientY-startY+targetBoxHeight
|
|
|
+ // 计算宽度
|
|
|
+ const w=type==='rb'?mouseEl.clientX-startX+targetBoxWidth:startX-mouseEl.clientX+targetBoxWidth
|
|
|
+ const resW= (w/parentBoxWidth)*100//计算出的百分比结果值
|
|
|
+ targetBox.style.width=resW+'%'
|
|
|
+ targetBox.style.flex='none'
|
|
|
+
|
|
|
+ // 处理兄弟盒子的宽度
|
|
|
+ const changeW=w-initW //宽度变化值
|
|
|
+ computerW=changeW
|
|
|
+ if(parentBox.childNodes.length===3){
|
|
|
+ computerW=changeW/2
|
|
|
+ }
|
|
|
+ // console.log('改变的宽度',computerW);
|
|
|
+
|
|
|
+ // targetBox.style.height=`${h<50?50:h}px`
|
|
|
+ targetBox.style.height=`${h}px`
|
|
|
+ }
|
|
|
+ document.onmouseup=(el)=>{
|
|
|
+ if(document.onmousemove){
|
|
|
+ parentBox.childNodes.forEach(item=>{
|
|
|
+ if(item!==targetBox){
|
|
|
+ const temw=item.offsetWidth-computerW
|
|
|
+ item.style.width=((temw/parentBoxWidth)*100)+'%'
|
|
|
+ }
|
|
|
+ })
|
|
|
+ // 存储修改的值
|
|
|
+ parentBox.childNodes.forEach((item,idx)=>{
|
|
|
+ this.$set(this.conList[index].child[idx],'style',item.style.cssText)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ el.preventDefault()
|
|
|
+ document.onmousemove=null
|
|
|
+ setTimeout(() => {
|
|
|
+ this.isDragResize=false
|
|
|
+ document.onmouseup=null
|
|
|
+ }, 50);
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+// 点击删除某个
|
|
|
+function handleDelItem(pindex,cindex){
|
|
|
+ if(cindex===-1){
|
|
|
+ conList.value.splice(pindex,1)
|
|
|
+ }else{//删除子盒子
|
|
|
+ conList.value[pindex].child.splice(cindex,1)
|
|
|
+ if(conList.value[pindex].child.length===1){//只剩一个子盒子了则变成一个大盒子
|
|
|
+ const styleArr=conList.value[pindex].child[0].style.split(';').filter(s=>s&&(s.indexOf('width')===-1&&s.indexOf('flex')===-1)).join(';')
|
|
|
+ conList.value[pindex]=conList.value[pindex].child[0]
|
|
|
+ conList.value[pindex].style=styleArr
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+const showPopover = ref(true)
|
|
|
+const showReportInsertPop = ref(false)
|
|
|
+const showInsertCompType=ref(0)
|
|
|
+const compType = [
|
|
|
+ {
|
|
|
+ compId:1,
|
|
|
+ compType:'text',
|
|
|
+ text:'文字',
|
|
|
+ icon:'font-o'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ compId:2,
|
|
|
+ compType:'img',
|
|
|
+ text:'图片',
|
|
|
+ icon:'photo-o'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ compId:3,
|
|
|
+ compType:'chart',
|
|
|
+ text:'图表',
|
|
|
+ icon:'chart-trending-o'
|
|
|
+ },
|
|
|
+]
|
|
|
+function handleOpenComPop(e) {
|
|
|
+ showPopover.value = false
|
|
|
+ console.log(e)
|
|
|
+
|
|
|
+ showInsertCompType.value = e.compId;
|
|
|
+ showReportInsertPop.value = true
|
|
|
+}
|
|
|
+/* 插入图表表格 */
|
|
|
+function handleChartInsert({list,type,chartType}){
|
|
|
+
|
|
|
+ let tempCompDataArr=[]
|
|
|
+
|
|
|
+ if(type==='iframe'){
|
|
|
+ let link=publicSettingStore.publicSetting.ChartViewUrl;
|
|
|
+ if(chartType==='chart'){
|
|
|
+
|
|
|
+ link=link+'/chartshow'
|
|
|
+
|
|
|
+ tempCompDataArr = list.map(item =>({
|
|
|
+ compId:3,
|
|
|
+ compType:'chart',
|
|
|
+ id:getCompId(3),
|
|
|
+ content:`${link}?code=${item}`,
|
|
|
+ titleText: '',
|
|
|
+ style:'height:350px',
|
|
|
+ child:[]
|
|
|
+ }))
|
|
|
+ }else if(chartType==='sheet'){
|
|
|
+ link=link+'/sheetshow'
|
|
|
+ tempCompDataArr = list.map(item =>({
|
|
|
+ compId:4,
|
|
|
+ compType:'sheet',
|
|
|
+ id:getCompId(4),
|
|
|
+ content:`${link}?code=${item}&fromScene=1`,
|
|
|
+ titleText: '',
|
|
|
+ style:'',
|
|
|
+ child:[]
|
|
|
+ }))
|
|
|
+ }
|
|
|
+ }else if(type==='img'){
|
|
|
+
|
|
|
+ tempCompDataArr = list.map(item =>({
|
|
|
+ compId:2,
|
|
|
+ compType:'img',
|
|
|
+ id:getCompId(2),
|
|
|
+ content:``,
|
|
|
+ titleText: item.ExcelName,
|
|
|
+ style:'',
|
|
|
+ child:[]
|
|
|
+ }))
|
|
|
+ }
|
|
|
+
|
|
|
+ conList.value.splice(0,1,...tempCompDataArr)
|
|
|
+ console.log(conList.value)
|
|
|
+ showReportInsertPop.value=false
|
|
|
+}
|
|
|
+//插入文本
|
|
|
+function handleInsertText() {
|
|
|
+
|
|
|
+}
|
|
|
+function getCompId(type) {
|
|
|
+ return type+new Date().getTime()
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+// 报告基本信息
|
|
|
+const showReportBaseInfo=ref(false)
|
|
|
+let reportBaseInfoData={
|
|
|
+ addType:1,
|
|
|
+ classifyName:[],
|
|
|
+ author:['FICC团队'],
|
|
|
+ frequency: ['日度'],
|
|
|
+ createtime:moment().format('YYYY-MM-DD'),
|
|
|
+ title:'',
|
|
|
+ abstract:'',
|
|
|
+ cooperationType:1,
|
|
|
+ cooperationUsers:[],
|
|
|
+ reportLayout: 1,
|
|
|
+ isPublcPublish: 1
|
|
|
+}
|
|
|
+async function handleReportBaseInfoChange(e){
|
|
|
+ reportBaseInfoData={
|
|
|
+ ...e,
|
|
|
+ classifyName:e.classifys,
|
|
|
+ createtime:e.time,
|
|
|
+ }
|
|
|
+
|
|
|
+ const classify = e.classifys.map(i=>i.id)
|
|
|
+ checkClassifyNameArr(1,classify)
|
|
|
+ showReportBaseInfo.value=false
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+const {
|
|
|
+ conList,
|
|
|
+ bgColor,
|
|
|
+ headImg,
|
|
|
+ endImg,
|
|
|
+ headImgId,
|
|
|
+ endImgId,
|
|
|
+ headImgStyle,
|
|
|
+ endImgStyle,
|
|
|
+ layoutBaseInfo
|
|
|
+} = toRefs(smartState)
|
|
|
</script>
|
|
|
<template>
|
|
|
- <div></div>
|
|
|
+ <div class="add-report-page">
|
|
|
+ <div class="main-wrap">
|
|
|
+
|
|
|
+ <div class="report-content-box" id="report-content-box" :style="{backgroundColor:bgColor}">
|
|
|
+ <!-- 版头 -->
|
|
|
+ <div class="html-head-img-box">
|
|
|
+ <div class="opt-btn-box">
|
|
|
+ <div class="del-btn" @click.stop="deleteLayoutPic(1)"></div>
|
|
|
+ </div>
|
|
|
+ <img :src="headImg" alt="" style="display:block;width:100%">
|
|
|
+ <div class="head-layout-item" v-for="item in headImgStyle" :key="item.value"
|
|
|
+ :style="{fontFamily:item.family,fontSize:(item.size*2)+'px',fontWeight:item.weight,textAlign:item.align,color:item.color,
|
|
|
+ width:item.width,height:item.height,left:item.left,top:item.top
|
|
|
+ }">
|
|
|
+ {{ layoutBaseInfo[item.value] }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <draggable
|
|
|
+ :list="conList"
|
|
|
+ :group="{ name: 'component', pull: true, put: true }"
|
|
|
+ class="report-html-wrap"
|
|
|
+ id="report-html-content"
|
|
|
+ animation="300"
|
|
|
+ tag="div"
|
|
|
+ handle=".drag-btn_p"
|
|
|
+ @add="handleParentAdd"
|
|
|
+ @remove="handleParentRemove"
|
|
|
+ :move="handleParentMove"
|
|
|
+ >
|
|
|
+ <template #item="{element,index}">
|
|
|
+ <div
|
|
|
+ :class="[
|
|
|
+ 'report-drag-item-wrap',
|
|
|
+ activeId===element.id?'blue-bg':'',
|
|
|
+ element.child&&!element.child.length?'report-drag-item-out':''
|
|
|
+ ]"
|
|
|
+ :comp-type="element.compType"
|
|
|
+ @click="handleChoose(element,index)"
|
|
|
+ :style="element.style"
|
|
|
+ >
|
|
|
+ <div class="resize-drag-box" @mousedown.stop="handleResizeP($event,index)"></div>
|
|
|
+ <div class="opt-btn-box">
|
|
|
+ <div class="drag-btn drag-btn_p"></div>
|
|
|
+ <!-- <div class="del-btn" @click.stop="handleDelItem(index,-1)"></div> -->
|
|
|
+ <van-icon name="delete-o" @click.stop="handleDelItem(index,-1)"/>
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ v-if="element.child&&!element.child.length"
|
|
|
+ class="report-drag-item-wrap_content"
|
|
|
+ style="width:100%;height:100%"
|
|
|
+ :data-id="element.id"
|
|
|
+ >
|
|
|
+ <component :is="getComponentName(element)" :compData="element"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </draggable>
|
|
|
+
|
|
|
+ <!-- 版尾 -->
|
|
|
+ <div class="html-end-img-box">
|
|
|
+ <div class="opt-btn-box">
|
|
|
+ <div class="del-btn" @click.stop="deleteLayoutPic(2)"></div>
|
|
|
+ </div>
|
|
|
+ <img :src="endImg" alt="" style="display:block;width:100%">
|
|
|
+ <div class="head-layout-item" v-for="item in endImgStyle" :key="item.value"
|
|
|
+ :style="{fontFamily:item.family,fontSize:(item.size*2)+'px',fontWeight:item.weight,textAlign:item.align,color:item.color,
|
|
|
+ width:item.width,height:item.height,left:item.left,top:item.top
|
|
|
+ }">
|
|
|
+ {{ layoutBaseInfo[item.value] }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+
|
|
|
+ <div class="add-comp-wrapper">
|
|
|
+ <van-popover v-model:show="showPopover" @select="handleOpenComPop">
|
|
|
+ <van-grid
|
|
|
+ square
|
|
|
+ clickable
|
|
|
+ :border="false"
|
|
|
+ column-num="3"
|
|
|
+ style="width: 240px;"
|
|
|
+ >
|
|
|
+ <van-grid-item
|
|
|
+ v-for="i in compType"
|
|
|
+ :key="i.id"
|
|
|
+ :text="i.text"
|
|
|
+ :icon="i.icon"
|
|
|
+ @click="handleOpenComPop(i)"
|
|
|
+ />
|
|
|
+ </van-grid>
|
|
|
+ <template #reference>
|
|
|
+ <van-icon name="add-o" size="24" class="add-ico"/>
|
|
|
+ </template>
|
|
|
+ </van-popover>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- 底部操作 -->
|
|
|
+ <div class="bot-action-box">
|
|
|
+ <div class="left-box">
|
|
|
+ <div class="item" @click="showReportBaseInfo=true">
|
|
|
+ <img src="@/assets/imgs/report/icon_info.png" alt="">
|
|
|
+ <span>基础信息</span>
|
|
|
+ </div>
|
|
|
+ <div class="item" @click="handleRefreshAllChart">
|
|
|
+ <img src="@/assets/imgs/report/icon_refresh.png" alt="">
|
|
|
+ <span>刷新</span>
|
|
|
+ </div>
|
|
|
+ <div class="item" @click="handlePreviewReport" >
|
|
|
+ <img src="@/assets/imgs/report/icon_preview.png" alt="">
|
|
|
+ <span>预览</span>
|
|
|
+ </div>
|
|
|
+ <div class="item" @click="autoSaveReportContent('save')">
|
|
|
+ <img src="@/assets/imgs/report/icon_save2.png" alt="">
|
|
|
+ <span>保存</span>
|
|
|
+ </div>
|
|
|
+ <template v-if="!isApprove||!hasApproveFlow">
|
|
|
+ <div class="item" @click="handlePublishReport('dsfb')" >
|
|
|
+ <img src="@/assets/imgs/report/icon_time.png" alt="">
|
|
|
+ <span>定时发布</span>
|
|
|
+ </div>
|
|
|
+ <div class="item" @click="handlePublishReport('fb')">
|
|
|
+ <img src="@/assets/imgs/report/icon_publish3.png" alt="">
|
|
|
+ <span>发布</span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <template v-if="isApprove&&hasApproveFlow">
|
|
|
+ <div class="item" @click="handlePublishReport('submit')" >
|
|
|
+ <img src="@/assets/imgs/report/icon_publish3.png" alt="">
|
|
|
+ <span>提交</span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <div class="item" @click="handlePreviewReport" >
|
|
|
+ <img src="@/assets/imgs/report/icon_preview.png" alt="">
|
|
|
+ <span>更多设置</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- 报告插入数据模块 -->
|
|
|
+ <van-popup
|
|
|
+ v-model:show="showReportInsertPop"
|
|
|
+ position="bottom"
|
|
|
+ round
|
|
|
+ >
|
|
|
+ <ReportInsertContent v-if="showInsertCompType===3" @insert="handleChartInsert"/>
|
|
|
+ </van-popup>
|
|
|
+
|
|
|
+ <!-- 报告基础信息 -->
|
|
|
+ <van-popup
|
|
|
+ v-model:show="showReportBaseInfo"
|
|
|
+ position="bottom"
|
|
|
+ :style="{ height: '100%' }"
|
|
|
+ >
|
|
|
+ <AddReportBaseInfoV2
|
|
|
+ @close="showReportBaseInfo=false"
|
|
|
+ :id="Number(route.query.id)"
|
|
|
+ :defaultData="reportBaseInfoData"
|
|
|
+ @confirm="handleReportBaseInfoChange"
|
|
|
+ />
|
|
|
+ </van-popup>
|
|
|
</template>
|
|
|
<style scoped lang="scss">
|
|
|
+.add-report-page{
|
|
|
+ height: 100dvh;
|
|
|
+ min-height: 95vh;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ overflow: hidden;
|
|
|
+}
|
|
|
+.main-wrap{
|
|
|
+ flex: 1;
|
|
|
+ width: calc(100% - 32PX);
|
|
|
+ margin: 0 auto;
|
|
|
+ overflow-y: auto;
|
|
|
+ margin-top: 30px;
|
|
|
+ border: 1px solid #DCDFE6;
|
|
|
+ pointer-events:auto;
|
|
|
+
|
|
|
+ .report-drag-item-wrap{
|
|
|
+ width: 100%;
|
|
|
+ padding: 6px;
|
|
|
+ min-height: 80px;
|
|
|
+ border: 1px dashed #0052D9;
|
|
|
+ position: relative;
|
|
|
+ margin-bottom: 3px;
|
|
|
+ &:hover{
|
|
|
+ border-style: solid;
|
|
|
+ .opt-btn-box{
|
|
|
+ display: block !important;
|
|
|
+ }
|
|
|
+ .resize-drag-box{
|
|
|
+ display: block;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .opt-btn-box{
|
|
|
+ position: absolute;
|
|
|
+ left: -36px;
|
|
|
+ padding-right: 8px;
|
|
|
+ top: 0;
|
|
|
+ .drag-btn::after{
|
|
|
+ content: '';
|
|
|
+ display: block;
|
|
|
+ width: 28px;
|
|
|
+ height: 28px;
|
|
|
+ background-image: url('~@/assets/img/smartReport/icon12.png');
|
|
|
+ background-size: cover;
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
+ .del-btn::after{
|
|
|
+ content: '';
|
|
|
+ display: block;
|
|
|
+ width: 28px;
|
|
|
+ height: 28px;
|
|
|
+ background-image: url('~@/assets/img/smartReport/icon13.png');
|
|
|
+ background-size: cover;
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .resize-drag-box{
|
|
|
+ position: absolute;
|
|
|
+ right: -4px;
|
|
|
+ bottom: -4px;
|
|
|
+ width: 8px;
|
|
|
+ height: 8px;
|
|
|
+ display: none;
|
|
|
+ border: 1px solid #0052D9;
|
|
|
+ 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;
|
|
|
+ }
|
|
|
+ .report-drag-item-wrap_child_content{
|
|
|
+ min-height: 80px;
|
|
|
+ border: 1px dashed #0052D9;
|
|
|
+ flex: 1;
|
|
|
+ position: relative;
|
|
|
+ &:hover{
|
|
|
+ border-style: solid;
|
|
|
+ .opt-btn-box2{
|
|
|
+ display: block !important;
|
|
|
+ }
|
|
|
+ .resize-drag-box_lt,
|
|
|
+ .resize-drag-box_lb,
|
|
|
+ .resize-drag-box_rt,
|
|
|
+ .resize-drag-box_rb{
|
|
|
+ display: block;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .opt-btn-box2{
|
|
|
+ position: absolute;
|
|
|
+ right: -15px;
|
|
|
+ top: 0;
|
|
|
+ z-index: 10;
|
|
|
+ .drag-btn::after{
|
|
|
+ content: '';
|
|
|
+ display: block;
|
|
|
+ width: 28px;
|
|
|
+ height: 28px;
|
|
|
+ background-image: url('~@/assets/img/smartReport/icon12.png');
|
|
|
+ background-size: cover;
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
+ .del-btn::after{
|
|
|
+ content: '';
|
|
|
+ display: block;
|
|
|
+ width: 28px;
|
|
|
+ height: 28px;
|
|
|
+ background-image: url('~@/assets/img/smartReport/icon13.png');
|
|
|
+ background-size: cover;
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .resize-drag-box_lt,
|
|
|
+ .resize-drag-box_lb,
|
|
|
+ .resize-drag-box_rt,
|
|
|
+ .resize-drag-box_rb{
|
|
|
+ position: absolute;
|
|
|
+ width: 8px;
|
|
|
+ height: 8px;
|
|
|
+ display: none;
|
|
|
+ border: 1px solid #0052D9;
|
|
|
+ }
|
|
|
+ .resize-drag-box_lt{
|
|
|
+ left: -4px;
|
|
|
+ top: -4px;
|
|
|
+ cursor: nw-resize;
|
|
|
+ }
|
|
|
+ .resize-drag-box_lb{
|
|
|
+ left: -4px;
|
|
|
+ bottom: -4px;
|
|
|
+ cursor: ne-resize;
|
|
|
+ }
|
|
|
+ .resize-drag-box_rt{
|
|
|
+ right: -4px;
|
|
|
+ top: -4px;
|
|
|
+ cursor: ne-resize;
|
|
|
+ }
|
|
|
+ .resize-drag-box_rb{
|
|
|
+ right: -4px;
|
|
|
+ bottom: -4px;
|
|
|
+ cursor: nw-resize;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .blue-bg{
|
|
|
+ background: var(--brand-brand-1-light, #ECF2FE);
|
|
|
+ }
|
|
|
+}
|
|
|
+.report-content-box{
|
|
|
+ width: 100%;
|
|
|
+ margin: 0 auto;
|
|
|
+ height: 100%;
|
|
|
+ padding: 20px 20px 20px 44px;
|
|
|
+}
|
|
|
+.add-comp-wrapper {
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ .add-ico {
|
|
|
+ background: $theme-color;
|
|
|
+ color: #fff;
|
|
|
+ border-radius: 50%;
|
|
|
+ }
|
|
|
+}
|
|
|
+.bot-action-box{
|
|
|
+ padding: 20px 16PX;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ .left-box{
|
|
|
+ flex: 1;
|
|
|
+ background: #FFFFFF;
|
|
|
+ box-shadow: 0px 12px 60px 10px rgba(0, 0, 0, 0.05), 0px 32px 48px 4px rgba(0, 0, 0, 0.04), 0px 16px 20px -10px rgba(0, 0, 0, 0.08);
|
|
|
+ border-radius: 100px;
|
|
|
+ height: 112px;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ margin-right: 20px;
|
|
|
+ padding: 0 20px;
|
|
|
+ .item{
|
|
|
+ flex: 1;
|
|
|
+ text-align: center;
|
|
|
+ font-size: 20px;
|
|
|
+ img{
|
|
|
+ width: 40px;
|
|
|
+ height: 40px;
|
|
|
+ display: block;
|
|
|
+ margin: 5px auto;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .right-btn{
|
|
|
+ flex-shrink: 0;
|
|
|
+ position: relative;
|
|
|
+ width: 96px;
|
|
|
+ height: 96px;
|
|
|
+ background-color: $theme-color;
|
|
|
+ border-radius: 50%;
|
|
|
+ box-shadow: 0px 6px 28px 4px rgba(0, 0, 0, 0.05), 0px 16px 20px 2px rgba(0, 0, 0, 0.06), 0px 10px 10px -6px rgba(0, 0, 0, 0.1);
|
|
|
+ svg{
|
|
|
+ width: 27px;
|
|
|
+ height: 27px;
|
|
|
+ position: absolute;
|
|
|
+ top: 50%;
|
|
|
+ left: 50%;
|
|
|
+ transform: translate(-50%,-50%);
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+@media screen and (min-width:$media-width){
|
|
|
+ .add-report-page{
|
|
|
+ height: calc(100dvh - 60px);
|
|
|
+ min-height: calc(95vh - 60px);
|
|
|
+ }
|
|
|
+
|
|
|
+ .bot-action-box{
|
|
|
+ margin: 0 auto;
|
|
|
+ width: 600px;
|
|
|
+ padding: 10px 16px;
|
|
|
+ .left-box{
|
|
|
+ border-radius: 50px;
|
|
|
+ height: 56px;
|
|
|
+ margin-right: 10px;
|
|
|
+ padding: 0 10px;
|
|
|
+ .item{
|
|
|
+ font-size: 12px;
|
|
|
+ img{
|
|
|
+ width: 20px;
|
|
|
+ height: 20px;
|
|
|
+ margin: 3px auto;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .right-btn{
|
|
|
+ width: 48px;
|
|
|
+ height: 48px;
|
|
|
+ svg{
|
|
|
+ width: 14px;
|
|
|
+ height: 14px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .main-wrap{
|
|
|
+ margin-top: 20px;
|
|
|
+ }
|
|
|
+ .report-content-box{
|
|
|
+ max-width: 800px;
|
|
|
+ }
|
|
|
+}
|
|
|
|
|
|
</style>
|