1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651 |
- <script setup>
- import {ref,nextTick, reactive,computed} from 'vue'
- import apiChart from '@/api/chart'
- import apiETAChart from '@/api/chart'
- import apiFutureChart from '@/api/futureChart'
- import apiCorrelationChart from '@/api/correlationChart'
- import apiLineEquationChart from '@/api/lineEquationChart'
- import apiStatisticFeatureChart from '@/api/statisticFeatureChart'
- import apiCrossVarietyChart from '@/api/crossVarietyChart'
- import apiMyETAChart from '@/api/myETA'
- import apiDataEDB from '@/api/dataEDB'
- import apiSheet from '@/api/sheet'
- import apiIntervalAnalysis from '@/api/intervalAnalysis'
- import apiETAForum from '@/api/etaForum'
- import { useRoute, useRouter } from 'vue-router'
- import {useChartRender} from '@/hooks/chart/render'
- import {yearSelectOpt,sameOptionType} from '@/hooks/chart/config'
- import EDBInfo from './components/EDBInfo.vue'
- import moment from 'moment'
- import { showToast,showDialog} from 'vant'
- import ChartSaveOther from './components/ChartSaveOther.vue'
- import _ from 'lodash';
- import { useWindowSize } from '@vueuse/core'
- import {setClipboardData} from '@/hooks/common'
- import { getChartShareExpireToken } from '@/views/chartETA/hooks/useChartSharedToken'
- import SetChartEnName from '@/components/SetChartEnName.vue'
- import {useCachedViewsStore} from '@/store/modules/cachedViews'
- import AddChartToMyETA from '@/views/chartETA/components/AddChartToMyETA.vue'
- import { setExtremumDate } from '@/hooks/chart/commonFun.js'
- import {myETABtn,useAuthBtn} from '@/hooks/useAuthBtn'
- import {usePublicSettingStore} from '@/store/modules/publicSetting'
- import { useNoAuth } from '@/hooks/useNoAuth'
- import SaveToMaterial from '@/components/SaveToMaterial.vue'
- const {checkAuthBtn} = useAuthBtn()
- const publicSettingStore = usePublicSettingStore()
- const isMoreActionShow = computed(()=>{
- return checkAuthBtn(myETABtn.myChart_refresh)
- || checkAuthBtn(myETABtn.myChart_share)
- || checkAuthBtn(myETABtn.myChart_move)
- || checkAuthBtn(myETABtn.myChart_copyTo)
- || checkAuthBtn(myETABtn.myChart_otherSave)
- || (checkAuthBtn(myETABtn.myChart_copyWechat)&&checkAuthBtn(myETABtn.myChart_copyOffice))
- || checkAuthBtn(myETABtn.myChart_enNameSetting)
- || checkAuthBtn(myETABtn.myChart_del)
- })
- const { width, height } = useWindowSize()
- const cachedViewsStore=useCachedViewsStore()
- const {options,axisLimitState,chartRender,setLimitData,isUseSelfLimit}=useChartRender()
- const route=useRoute()
- const router=useRouter()
- let chartCode=route.query.code
- const isETAForumChart=ref(route.query.isETAForumChart=='true'?true:false)
- let CHARTINS=null//图表实例
- // 获取当前图表所在分类下的所有图表数据 用于上一张下一张切换
- let allChartList=ref([])
- async function getAllChartList(){
- // 如果是从ETA指标库的指标关联的图列表跳转来的
- if(route.query.from==='edbRelationChart'){
- const res=await apiDataEDB.edbRelationChartList({
- PageSize:1000000,
- CurrentIndex:1,
- EdbInfoId:route.query.edbInfoId
- })
- if(res.Ret===200){
- allChartList.value=res.Data.List||[]
- }
- return
- }
- // 我的图库列表跳转来的
- if(!route.query.cid) return
- const res=await apiMyETAChart.myChartList({
- CurrentIndex:1,
- PageSize:1000000,
- MyChartClassifyId:Number(route.query.cid)
- })
- if(res.Ret===200){
- allChartList.value=res.Data.List||[]
- }
- }
- getAllChartList()
- // 切换图上一张下一张
- function handleSwitchChart(type){
- const index=allChartList.value.findIndex((item)=>item.UniqueCode==chartCode)
- let item=null
- if(type==='prev'){
- item=index===0?allChartList.value[allChartList.value.length-1]:allChartList.value[index-1]
- }else{
- item=index===allChartList.value.length-1?allChartList.value[0]:allChartList.value[index+1]
- }
- chartCode=item.UniqueCode
- getChartInfo()
- }
- // 是否面积图堆叠百分比
- function isChartHeap(info){
- let tag=true
- if(info.ChartType==3&&info.ExtraConfig){
- let ExtraConfig=JSON.parse(info.ExtraConfig)
- tag=ExtraConfig.HeapWay==2?false:true
- }
- return tag
- }
- // 获取图详情
- let chartInfoData=null
- let chartInfo=ref(null)
- let edbList=ref([])//指标数据
- async function getChartInfo(){
- const res=isETAForumChart.value?await apiETAForum.getChartDetail({UniqueCode:chartCode}) : await apiETAChart.chartInfoByCode({UniqueCode:chartCode})
- if(res.Ret!==200) return
- chartInfoData=res.Data
- chartInfo.value=res.Data.ChartInfo
- if(!res.Data.ChartInfo.HaveOperaAuth) return
- if([2,5].includes(res.Data.ChartInfo.Source)){
- edbList.value=[res.Data.EdbInfoList[0]]
- }else{
- edbList.value=res.Data.EdbInfoList
- }
- // 设置 起始日期 和 最新日期
- const extremumDate= setExtremumDate(edbList.value)
- minDate = new Date(extremumDate.earliestDate)
- earliestDate.value = extremumDate.earliestDate
- latestDate.value = extremumDate.latestDate
- chartState.yearVal=res.Data.ChartInfo.DateType
- if(res.Data.ChartInfo.DateType===5){
- chartState.startTime=res.Data.ChartInfo.StartDate
- chartState.endTime=res.Data.ChartInfo.EndDate
- temStartTime.value=res.Data.ChartInfo.StartDate.split('-')
- temEndTime.value=res.Data.ChartInfo.EndDate.split('-')
- }
- if(res.Data.ChartInfo.DateType===6){
- chartState.startTime=res.Data.ChartInfo.StartDate
- temStartTime.value=res.Data.ChartInfo.StartDate.split('-')
- }
- if(res.Data.ChartInfo.DateType===20){
- // 最近几年
- let latestYear = parseInt(latestDate.value.substring(0,4))
- chartState.startTime = `${latestYear-chartState.startYear+1}-01-01`
- chartState.endTime = `${latestYear}-12-31`
- chartState.startTime=res.Data.ChartInfo.StartDate
- chartState.endTime=res.Data.ChartInfo.EndDate
- temStartTime.value=chartState.startTime.split('-')
- temEndTime.value=chartState.endTime.split('-')
- }
- //仅ETA图库图表需要初始化上下限
- if(res.Data.ChartInfo.Source===1&&![7,10,11,12].includes(res.Data.ChartInfo.ChartType)){
- isUseSelfLimit.value = true
- setLimitData(res.Data)
- }else{
- isUseSelfLimit.value = false
- }
- nextTick(()=>{
- CHARTINS=chartRender({
- data:res.Data,
- renderId:'chart-box',
- lang:'zh',
- changeLangIsCheck:false,
- showChartTitle:false,
- shouldUseSelfLimit:true,
- })
- })
- }
- function openDateSelect(){
- // 回显
- switch (chartState.yearVal) {
- case 3:
- temStartTime.value = [2015,1,1]
- temEndTime.value = latestDate.value.split('-')
- break;
- case 9:
- temStartTime.value = [2020,1,1]
- temEndTime.value = latestDate.value.split('-')
- break;
- case 4:
- temStartTime.value = [2021,1,1]
- temEndTime.value = latestDate.value.split('-')
- break;
- case 11:
- temStartTime.value = [2022,1,1]
- temEndTime.value = latestDate.value.split('-')
- break;
- case '':
- temStartTime.value = earliestDate.value.split('-')
- temEndTime.value = latestDate.value.split('-')
- break;
- default:
- temStartTime.value = chartState.startTime.split('-')
- temEndTime.value = chartState.endTime.split('-')
- break;
- }
- chartState.showTimePop=true
- }
- getChartInfo()
- // 选择项发生变化时 非配置项 获取新的图表数据
- async function reloadChartInfo(){
- const params=sameOptionType.includes(chartInfo.value.ChartType)?{
- ChartInfoId: chartInfo.value.ChartInfoId,
- DateType: chartState.yearVal,
- StartDate: chartState.startTime,
- EndDate: chartState.endTime,
- }:{
- ChartInfoId: chartInfo.value.ChartInfoId,
- DateType: chartState.yearVal,
- Calendar: chartState.calendarType,//this.calendar_type
- StartDate: chartState.startTime,
- EndDate:chartState.endTime ,
- }
- const res=await apiETAChart.chartInfoById(params)
- if(res.Ret!==200) return
- chartInfo.value=res.Data.ChartInfo
- CHARTINS=chartRender({
- data:{
- ...res.Data,
- ChartInfo:{
- ...res.Data.ChartInfo,
- Calendar:chartState.calendarType||'公历'
- }
- },
- renderId:'chart-box',
- lang:'zh',
- changeLangIsCheck:false,
- showChartTitle:false,
- shouldUseSelfLimit:true,
- })
- }
- let minDate=new Date(1970, 0, 1)
- const maxDate=new Date(2050, 11, 31)
- const cYear=moment().format('YYYY')
- const cMonth=moment().format('MM')
- const cDay=moment().format('dd')
- let temStartTime=ref([cYear,cMonth,cDay])
- let temEndTime=ref([cYear,cMonth,cDay])
- const earliestDate=ref('')
- const latestDate=ref('')
- let chartState=reactive({
- showTimePop:false,
- startTime:'',
- endTime:'',
- yearVal:'',
- calendarType:'公历',
- startYear:5
- })
- // 切换年份选项
- function handleYearChange(item){
- chartState.yearVal=item.value
- chartState.startTime=''
- chartState.endTime=''
- reloadChartInfo()
- }
- // 确定日期筛选
- function handleTimeChange(){
- chartState.startTime=temStartTime.value.join('-')
- chartState.endTime=temEndTime.value.join('-')
- chartState.yearVal=5
- reloadChartInfo()
- chartState.showTimePop=false
- }
- // 季节图公历\农历切换
- function handleSeasonTypeChange(type){
- chartState.calendarType=type
- reloadChartInfo()
- }
- // 上下限调整
- let showLimitPop=ref(false)
- let axisLimitDataTem=reactive({//左右轴极值
- min:'-99999999999999999',
- leftMin:0,
- leftMax:0,
- rightMin:0,
- rightMax:0,
- rightTwoMin:0,
- rightTwoMax:0,
- xMin:0,
- xMax:0,
- })
- function handleShowAxisLimitOpt(){
- axisLimitDataTem.leftMin=axisLimitState.leftMin
- axisLimitDataTem.leftMax=axisLimitState.leftMax
- axisLimitDataTem.rightMin=axisLimitState.rightMin
- axisLimitDataTem.rightMax=axisLimitState.rightMax
- axisLimitDataTem.rightTwoMin=axisLimitState.rightTwoMin
- axisLimitDataTem.rightTwoMax=axisLimitState.rightTwoMax
- axisLimitDataTem.xMin=axisLimitState.xMin
- axisLimitDataTem.xMax=axisLimitState.xMax
- showLimitPop.value=true
- }
- // 极限修改确定
- function handleConfirmLimitChange(){
- const data=_.cloneDeep(chartInfoData)
- // 修改左轴极限
- if(axisLimitState.hasLeftAxis){
- if(axisLimitState.leftIndex!==-1){
- axisLimitState.leftMin = axisLimitDataTem.leftMin
- axisLimitState.leftMax = axisLimitDataTem.leftMax
- }else{
- // 柱形图 取的ChartInfo中的极值
- if(data.ChartInfo.ChartType ===7){
- data.ChartInfo.LeftMin=axisLimitDataTem.leftMin
- data.ChartInfo.LeftMax=axisLimitDataTem.leftMax
- }
- // 商品价格曲线
- if([2,5].includes(data.ChartInfo.Source)){
- data.ChartInfo.LeftMin=axisLimitDataTem.leftMin
- data.ChartInfo.LeftMax=axisLimitDataTem.leftMax
- }
- // 截面散点 取的DataResp
- if(data.ChartInfo.ChartType ===10){
- data.DataResp.YMinValue=axisLimitDataTem.leftMin
- data.DataResp.YMaxValue=axisLimitDataTem.leftMax
- }
- // 跨品种分析
- if(data.ChartInfo.Source===10){
- data.ChartInfo.LeftMin = axisLimitDataTem.leftMin
- data.ChartInfo.LeftMax = axisLimitDataTem.leftMax
- }
- }
- }
- // 修改右轴极限
- if(axisLimitState.hasRightAxis){
- if(axisLimitState.rightIndex!==-1){
- axisLimitState.rightMin = axisLimitDataTem.rightMin
- axisLimitState.rightMax = axisLimitDataTem.rightMax
- }
- }
- //修改右2轴极限
- if(axisLimitState.hasRightTwoAxis){
- if(axisLimitState.rightTwoIndex!==-1){
- axisLimitState.rightMin = axisLimitDataTem.rightTwoMin
- axisLimitState.rightMax = axisLimitDataTem.rightTwoMax
- }
- }
- // 修改X轴极限
- if(axisLimitState.hasXAxis){
- // 截面散点 取的DataResp
- if(data.ChartInfo.ChartType ===10){
- data.DataResp.XMinValue=axisLimitDataTem.xMin
- data.DataResp.XMaxValue=axisLimitDataTem.xMax
- }
- // 跨品种分析
- if(data.ChartInfo.Source===10){
-
- data.ChartInfo.XMin = axisLimitDataTem.xMin
- data.ChartInfo.XMax = axisLimitDataTem.xMax
- }
- }
- CHARTINS=chartRender({
- data:data,
- renderId:'chart-box',
- lang:'zh',
- changeLangIsCheck:false,
- showChartTitle:false,
- shouldUseSelfLimit:true,
- })
- showLimitPop.value=false
- }
- // 显示指标详情
- let showEDB=ref(false)
- let showEDBData=ref({})
- function handleShowEDBInfo(item){
- showEDBData.value=item
- showEDB.value=true
- }
- // 获取指标数据
- async function getItemEDBInfo(item){
- const params={
- EdbInfoId: item.EdbInfoId,
- DateType: chartState.yearVal,
- StartDate: chartState.startTime,
- EndDate: chartState.endTime,
- EdbInfoType: item.EdbInfoType,
- LeadValue: item.EdbInfoType ? 0 : item.LeadValue,
- LeadUnit: item.EdbInfoType ? '' : item.LeadUnit,
- }
- return apiETAChart.EDBInfo(params)
- }
- // 指标配置项修改更新图
- async function handleUpdateRender(val,isEdit){
-
- const index=edbList.value.findIndex(_=>_.EdbInfoId==val.EdbInfoId)
-
- // 如果修改过 领先指标\标准指标则重新获取指标数据
- if(isEdit){
- edbList.value[index]=val
- const asyncTasks=edbList.value.map(_item=> getItemEDBInfo(_item))
- const results=await Promise.all(asyncTasks)
- console.log(results);
- results.forEach((item,index)=>{
- if(item.Ret==200){
- edbList.value[index].DataList=item.Data.EdbInfo.DataList
- if(item.Data.EdbInfo.EdbInfoCategoryType===1){
- edbList.value[index].LatestDate=item.Data.EdbInfo.LatestDate
- }
- }
- })
- }else{
- edbList.value[index]=val
- }
- CHARTINS=chartRender({
- data:{
- ...chartInfoData,
- EdbInfoList:edbList.value
- },
- renderId:'chart-box',
- lang:'zh',
- changeLangIsCheck:false,
- showChartTitle:false,
- shouldUseSelfLimit:true,
- })
- showEDB.value=false
- showEDBData.value={}
- }
- // 更多操作弹窗
- let showMoreAction=ref(false)
- // 复制到
- let myChartClassifyList=[]//我的图库中的所有分类
- async function getMyChartClassifyList(){
- const res=await apiMyETAChart.myClassifyList()
- if(res.Ret===200){
- myChartClassifyList=res.Data.List||[]
- }
- }
- getMyChartClassifyList()
- let showCopyTo=ref(false)
- let copyToOpt=ref([])
- async function handleShowCopyTo(){
- const res=await apiMyETAChart.chartInMyClassifyList({ChartInfoId:chartInfo.value.ChartInfoId})
- if(res.Ret===200){
- const arr=res.Data||[]
- copyToOpt.value=myChartClassifyList.map(e=>{
- return {
- ...e,
- select:false
- }
- }).filter((x) => !arr.includes(x.MyChartClassifyId))
- showCopyTo.value=true
- }
- }
- async function handleConfirmCopy(){
- const arr=[]
- copyToOpt.value.map(item=>{
- if(item.select){
- arr.push(item.MyChartClassifyId)
- }
- })
- if(arr.length===0){
- showToast('请选择分类')
- return
- }
- const res=await apiMyETAChart.chartAddToClassify({
- ChartInfoId:chartInfo.value.ChartInfoId,
- MyChartClassifyId:arr
- })
- if(res.Ret===200){
- showToast('复制成功')
- showCopyTo.value=false
- }
- }
- // 移除图表
- function handleRemoveChart(){
- if(!route.query.cid){
- showToast('当前图表所属多个分类,请选中具体分类移出')
- return
- }
- showDialog({
- title: '提示',
- message: '是否确认移出?',
- showCancelButton:true
- }).then(() => {
- // on close
- apiMyETAChart.myChartRemove({
- MyChartClassifyId:Number(route.query.cid),
- MyChartId:chartInfo.value.MyChartId
- }).then(res=>{
- if(res.Ret===200){
- showToast('移出成功')
- cachedViewsStore.removeCaches('MyETAIndex')
- cachedViewsStore.removeCaches('MyETASearchList')
- setTimeout(() => {
- router.back()
- }, 1500)
- }
- })
- }).catch(()=>{})
- }
- //删除图表
- function handleDeleteChart(){
- showDialog({
- title: '提示',
- message: '删除后该图表将不能再引用,确认删除吗?',
- showCancelButton:true
- }).then(async () => {
- // on close
- const res=chartInfo.value.Source===11?await apiSheet.balanceSheetChartDel({
- ChartInfoId:chartInfo.value.ChartInfoId
- }):await apiMyETAChart.chartDel({
- ChartInfoId:chartInfo.value.ChartInfoId
- })
- if(res.Ret===200){
- showToast('删除成功')
- cachedViewsStore.removeCaches('MyETAIndex')
- cachedViewsStore.removeCaches('MyETASearchList')
- setTimeout(() => {
- router.back()
- }, 1500)
- }
- }).catch(()=>{})
- }
- // 另存为
- let showSaveChartOther=ref(false)
- // 刷新
- async function handleChartRefresh(){
- const { Source,ChartInfoId,UniqueCode } = chartInfo.value
- let res=null
- if(Source===1){
- res= await apiETAChart.chartRefresh({ ChartInfoId })
- }else if([2,5].includes(Source)){
- res=await apiFutureChart.refreshChart({ ChartInfoId })
- }else if([3,4].includes(Source)){
- res=await apiCorrelationChart.refreshChart({ ChartInfoId })
- }else if(Source===6){
- res=await apiLineEquationChart.refreshChart({ ChartInfoId })
- }else if([7,8,9].includes(Source)) {
- res=await apiStatisticFeatureChart.refreshChart({ ChartInfoId })
- }else if(Source===10) {
- res=await apiCrossVarietyChart.refreshChart({ ChartInfoId })
- }else if(Source===11){
- res=await apiSheet.sheetRefresh({ChartInfoId})
- }else if(Source===12){
- res=await apiIntervalAnalysis.chartRefresh({ChartInfoId})
- }
- if(res.Ret!==200)return
- showToast('刷新成功')
- showMoreAction.value=false
- Source===1?reloadChartInfo():getChartInfo()
- }
- //分享
- async function handleChartShare(){
- // const url=import.meta.env.VITE_CHART_LINK+`?code=${chartInfo.value.UniqueCode}&fromType=share&lang=ch`
- //临时权限token
- const res = await getChartShareExpireToken(chartInfo.value.UniqueCode);
- if(res.Ret !== 200) return
- const url=publicSettingStore.publicSetting.ChartViewUrl+`/chartshow?code=${chartInfo.value.UniqueCode}&fromType=share&lang=ch&authToken=${res.Data}`
- setClipboardData(url)
- }
- //保存图表:目前myETA里能保存的只有ETA图库的图和商品价格曲线图
- function handleChartSave(){
- const sourceMap = {
- 1: saveChartHandle,
- 2: saveCommodityChart,//商品价格曲线
- 5: saveCommodityChart,//利润曲线
- 10: saveCrossVarietyChart
- }
- sourceMap[chartInfo.value.Source]&&sourceMap[chartInfo.value.Source]();
- }
- function saveChartHandle(){
- //获取每条线的指标配置
- let arr = edbList.value.map((item)=>{
- return {
- ChartColor: item.ChartColor,
- PredictChartColor: item.PredictChartColor,
- ChartStyle: item.ChartStyle,
- ChartWidth: Number(item.ChartWidth),
- EdbInfoId: item.EdbInfoId,
- EdbInfoType: item.EdbInfoType,
- IsAxis: item.IsAxis,
- IsOrder: item.IsOrder,
- LeadUnit: item.EdbInfoType ? '' : item.LeadUnit,
- LeadValue: item.EdbInfoType ? 0 : Number(item.LeadValue),
- MaxData: Number(item.MaxData),
- MinData: Number(item.MinData),
- }
- })
- //所有图表的公共参数
- let public_param = {
- ChartClassifyId: chartInfo.value.ChartClassifyId,
- ChartInfoId: chartInfo.value.ChartInfoId,
- ChartEdbInfoList: arr,
- }
- //根据ChartType决定剩余参数
- let type_param = {}
- switch(chartInfo.value.ChartType){
- case 2:
- type_param = {
- DateType: chartState.yearVal,
- StartYear:chartState.startYear || 0,
- Calendar: chartState.calendarType,
- StartDate: chartState.startTime||'',
- EndDate: chartState.endTime||'',
- }
- break
- case 7:
- case 11:
- type_param = {
- DateType: 6,
- LeftMin: String(axisLimitState.leftMin),
- LeftMax: String(axisLimitState.leftMax),
- }
- break
- case 10:
- type_param = {
- DateType: 6,
- Calendar: "公历",
- ExtraConfig: JSON.stringify({
- ...JSON.parse(chartInfo.value.ExtraConfig),
- XMinValue: String(axisLimitState.xMin),
- XMaxValue: String(axisLimitState.xMax),
- YMinValue: String(axisLimitState.leftMin),
- YMaxValue: String(axisLimitState.leftMax),
- })
- }
- break
- }
- if(sameOptionType.includes(chartInfo.value.ChartType)){
- type_param = {
- DateType: chartState.yearVal,
- StartYear:chartState.startYear || 0,
- StartDate:chartState.yearVal === 5 || chartState.yearVal === 6
- ? chartState.startTime
- : '',
- EndDate: chartState.yearVal === 5 ? chartState.endTime : '',
- }
- }
- let params = {...public_param,...type_param}
- if(![7,10,11].includes(chartInfo.value.ChartType)){
- params = {
- ...params,
- LeftMin:axisLimitState.leftMin+'',
- LeftMax:axisLimitState.leftMax+'',
- RightMin:axisLimitState.rightMin+'',
- RightMax:axisLimitState.rightMax+'',
- Right2Min:axisLimitState.rightTwoMin+'',
- Right2Max:axisLimitState.rightTwoMax+'',
- //手动保存视为更改过上下限
- MinMaxSave:1
- }
- }
- //保存
- apiChart.chartSave(params).then(async res=>{
- if(res.Ret!==200) return
- showToast("保存成功")
- setChartImage()
- })
- }
- function saveCommodityChart(){
- apiMyETAChart.myETASaveChart({
- ChartInfoId:chartInfo.value.ChartInfoId,
- LeftMin:String(axisLimitState.leftMin),
- LeftMax:String(axisLimitState.leftMax),
- }).then(res=>{
- if(res.Ret!==200) return
- showToast("保存成功")
- setChartImage()
- })
- }
- function saveCrossVarietyChart() {
- apiCrossVarietyChart.myETASaveChart({
- ChartInfoId:chartInfo.value.ChartInfoId,
- LeftMin:String(axisLimitState.leftMin),
- LeftMax:String(axisLimitState.leftMax),
- XMin: String(axisLimitState.xMin),
- XMax: String(axisLimitState.xMax),
- }).then(res=>{
- if(res.Ret!==200) return
- showToast("保存成功")
- setChartImage()
- })
- }
- //更新缩略图
- async function setChartImage(){
- //打开保存图片弹窗
- const svgData = CHARTINS.getSVG({
- chart: {
- width: 340,
- height: 230,
- }
- })
- let form = new FormData();
- form.append('Img', svgData);
- let {Data,Ret} = await apiETAChart.uploadChartImg(form)
- if(Ret!==200||!Data) return
- await apiETAChart.setChartImg({
- ChartInfoId:Number(chartInfo.value.ChartInfoId),
- ImageUrl:Data.ResourceUrl
- })
- }
- //保存图片
- let savePicDialogShow = ref(false)
- let savePicSrc = ref('')
- function handleChartSavePicture(){
- const {chartWidth,chartHeight} = CHARTINS
- const svgData = CHARTINS.getSVG({
- chart: {
- width: chartWidth,
- height: chartHeight,
- }
- })
- console.log(chartWidth,chartHeight);
- const canvas = document.createElement('canvas')
- const ctx = canvas.getContext('2d')
- canvas.width = chartWidth*2
- canvas.height = chartHeight*2
- const image = new Image()
- image.src = 'data:image/svg+xml;charset=utf-8,'+encodeURIComponent(svgData)
- image.onload = ()=>{
- ctx.drawImage(image, 0, 0,chartWidth*2,chartHeight*2);
- savePicSrc.value = canvas.toDataURL('image/png');
- savePicDialogShow.value = true
- }
- }
- // 显示修改英文名称弹窗
- let showEidtEnName=ref(false)
- function handleShowEditEnName(){
- showEidtEnName.value=true
- }
- function handleEditEnNameSuccess(){
- chartInfo.value.Source===1?reloadChartInfo():getChartInfo()
- }
- // 加入我的图库
- const isShowAddToMyETADialog=ref(false)
- // 保存至素材库
- const showSaveToMaterial=ref(false)
- </script>
- <template>
- <div class="chart-detail-page" v-if="chartInfo">
- <template v-if="chartInfo.HaveOperaAuth">
-
- <div
- class="chart-title"
- :style="chartInfo.ChartThemeStyle?`
- text-align:${JSON.parse(chartInfo.ChartThemeStyle).titleOptions.align};
- font-size:${JSON.parse(chartInfo.ChartThemeStyle).titleOptions.style.fontSize}px;
- color:${JSON.parse(chartInfo.ChartThemeStyle).titleOptions.style.color}
- `:''"
- >
- {{chartInfo.ChartName}}
- </div>
- <!-- 一般曲线图选择时间区间或者季节图选择日期 -->
- <div
- class="select-time-box"
- v-if="!isETAForumChart&&((sameOptionType.includes(chartInfo.ChartType)&& chartInfo.Source===1)||chartInfo.ChartType===2)"
- @click="openDateSelect"
- >
- <img class="left-icon" src="@/assets/imgs/icon_calendar.png" alt="">
- <span :class="['val-box',!chartState.startTime?'val-box_grey':'']">{{chartState.startTime||'开始日期'}} ~ {{chartState.startTime&&!chartState.endTime?'至今':chartState.endTime||'结束日期'}}</span>
- <van-icon class="right-icon" name="arrow" />
- </div>
- <!-- pad端时间和操作按钮模块 -->
- <div class="pad-time-action-wrap" v-if="!isETAForumChart">
- <div class="left-time-box" >
- <template v-if="sameOptionType.includes(chartInfo.ChartType)&& chartInfo.Source===1">
- <span :class="['item',chartState.yearVal==''?'active':'']" @click="handleYearChange({value:''})">全部</span>
- <span
- :class="['item',chartState.yearVal==item.value?'active':'']"
- v-for="item in yearSelectOpt"
- :key="item.value"
- @click="handleYearChange(item)"
- >{{item.name}}</span>
- </template>
- <span
- class="time-box"
- v-if="(sameOptionType.includes(chartInfo.ChartType)&& chartInfo.Source===1)||chartInfo.ChartType===2"
- @click="openDateSelect"
- >{{chartState.startTime?chartState.startTime+'~'+(chartState.endTime?chartState.endTime:'至今'):'请选择时间段'}}</span>
- </div>
- <div class="right-action-box">
- <div class="item" @click="handleShowAxisLimitOpt" v-if="[1,2,5,10,12].includes(chartInfo.Source)&&checkAuthBtn(myETABtn.myChart_editLimit)&&isChartHeap(chartInfo)">
- <img src="@/assets/imgs/myETA/icon_limit2.png" alt="">
- <span>上下限设置</span>
- </div>
- <div class="item" @click="showMoreAction=true" v-if="isMoreActionShow||$route.query.from==='edbRelationChart'">
- <img src="@/assets/imgs/chartETA/more-icon.png" alt="">
- <span>更多设置</span>
- </div>
- </div>
- </div>
- <!-- 图渲染区域 -->
- <div class="chart-render-wrap">
- <!-- pad 切换上一张\下一张 -->
- <img class="pad-change-chart-btn" src="@/assets/imgs/icon_arrow2.png" alt="" @click="handleSwitchChart('prev')" v-if="allChartList.length>0">
- <img class="pad-change-chart-btn pad-change-chart-next-btn" src="@/assets/imgs/icon_arrow2.png" alt="" @click="handleSwitchChart('next')" v-if="allChartList.length>0">
- <div class="chart-box" id="chart-box"></div>
- <!-- 底部来源,图表说明 -->
- <div class="chart-bottom-insruction-info"
- v-if="(chartInfo.SourcesFrom&&JSON.parse(chartInfo.SourcesFrom).isShow) || (chartInfo.Instructions&&JSON.parse(chartInfo.Instructions).isShow)">
- <div
- class="chart-source"
- v-if="chartInfo.SourcesFrom&&JSON.parse(chartInfo.SourcesFrom).isShow"
- :style="`
- color: ${ JSON.parse(chartInfo.SourcesFrom).color };
- font-size: ${ JSON.parse(chartInfo.SourcesFrom).fontSize }px;
- `"
- >
- 数据来源:{{JSON.parse(chartInfo.SourcesFrom).text}}
- </div>
- <!-- 图表说明 -->
- <div
- class="chart-instruction text_oneLine"
- v-if="chartInfo.Instructions&&JSON.parse(chartInfo.Instructions).isShow"
- v-text="JSON.parse(chartInfo.Instructions).text"
- :style="`
- color: ${JSON.parse(chartInfo.Instructions).color};
- font-size: ${ JSON.parse(chartInfo.Instructions).fontSize }px
- `"
- ></div>
- </div>
- </div>
- <!-- 一般曲线图选择时间区间 -->
- <div class="select-year-box" v-if="!isETAForumChart&&sameOptionType.includes(chartInfo.ChartType)&& chartInfo.Source===1">
- <span :class="['item',chartState.yearVal==''?'active':'']" @click="handleYearChange({value:''})">全部</span>
- <span
- :class="['item',chartState.yearVal==item.value?'active':'']"
- v-for="item in yearSelectOpt"
- :key="item.value"
- @click="handleYearChange(item)"
- >{{item.name}}</span>
- </div>
- <!-- 季节图切换公/农历 -->
- <div class="calendar-type-box" v-if="!isETAForumChart&&chartInfo.ChartType === 2">
- <span
- :class="chartState.calendarType=='公历'?'active':''"
- @click="handleSeasonTypeChange('公历')"
- >公历</span>
- <span
- :class="chartState.calendarType=='农历'?'active':''"
- @click="handleSeasonTypeChange('农历')"
- >农历</span>
- </div>
- <!-- 指标模块 -->
- <div class="edb-list-box">
- <div class="list-box">
- <div class="list-item" v-for="item in edbList" :key="item.EdbInfoId" @click="handleShowEDBInfo(item)">
- <span class="date">{{item.LatestDate}}</span>
- <span class="edb-name van-ellipsis" :style="{color:item.ChartColor}">{{item.EdbName}}</span>
- <span class="value">{{item.LatestValue}}</span>
- </div>
- </div>
- </div>
- <!-- 底部悬浮操作模块 -->
- <div class="fix-bot-action-box">
- <div class="item" @click="handleSwitchChart('prev')" v-if="allChartList.length>0">
- <img class="icon" src="@/assets/imgs/icon_arrow.png" alt="">
- <div>上一张</div>
- </div>
- <div class="item" @click="handleSwitchChart('next')" v-if="allChartList.length>0">
- <img class="icon" style="transform: rotate(180deg);" src="@/assets/imgs/icon_arrow.png" alt="">
- <div>下一张</div>
- </div>
- <div class="item" @click="handleShowAxisLimitOpt" v-if="[1,2,5,10].includes(chartInfo.Source)&&checkAuthBtn(myETABtn.myChart_editLimit)&&isChartHeap(chartInfo)">
- <img class="icon" src="@/assets/imgs/myETA/icon_limit.png" alt="">
- <div>上下限</div>
- </div>
- <div class="item" @click="showMoreAction=true" v-if="!isETAForumChart&&(isMoreActionShow||$route.query.from==='edbRelationChart')">
- <img class="icon" src="@/assets/imgs/myETA/icon_menu.png" alt="">
- <div>更多</div>
- </div>
- </div>
- </template>
- <div class="noAuth" v-if="chartInfo.HaveOperaAuth===false">
- <img class="img" :src="useNoAuth().noAuthImg" alt="">
- <div>{{useNoAuth().chart}}</div>
- </div>
-
- </div>
- <!-- 选择日期弹窗 -->
- <van-popup
- v-model:show="chartState.showTimePop"
- :position="width>650?'center':'bottom'"
- :style="width>650?{ width: '400px'}:''"
- >
- <div class="time-picker-wrap">
- <van-picker-group
- title="选择起始时间"
- :tabs="['开始时间', '结束时间']"
- @cancel="chartState.showTimePop=false"
- @confirm="handleTimeChange"
- >
- <van-date-picker
- v-model="temStartTime"
- :min-date="minDate"
- :max-date="maxDate"
- :columns-type="['year','month','day']"
- />
- <van-date-picker
- v-model="temEndTime"
- :min-date="minDate"
- :max-date="maxDate"
- :columns-type="['year','month','day']"
- />
- </van-picker-group>
- </div>
- </van-popup>
- <!-- 指标信息弹窗 -->
- <van-popup
- v-model:show="showEDB"
- :position="width>650?'right':'bottom'"
- :round="width>650?false:true"
- closeable
- :style="width>650?{ width: '400px', height: '100%' }:''"
- >
- <EDBInfo
- :show="showEDB"
- :data="showEDBData"
- :tableData="edbList"
- :chartInfo="chartInfo"
- @change="handleUpdateRender"
- />
- </van-popup>
- <!-- 上下限调整弹窗 -->
- <van-popup
- v-model:show="showLimitPop"
- :position="width>650?'center':'bottom'"
- round
- closeable
- :style="width>650?{ width: '400px'}:''"
- >
- <div class="global-pop-wrap_mobile chart-set-limit-wrap">
- <div class="head-box">
- <div class="title">上下限设置</div>
- </div>
- <div class="content">
- <!-- 左轴 -->
- <div class="item-box" v-if="axisLimitState.hasLeftAxis">
- <span class="lable-text">左轴</span>
- <div class="input-box">
- <div class="item">
- <div class="type-text">上限</div>
- <div class="step-box">
- <van-stepper input-width="60px" :min="axisLimitDataTem.min" v-model.number="axisLimitDataTem.leftMax" />
- </div>
- </div>
- <div class="item">
- <div class="type-text">下限</div>
- <div class="step-box">
- <van-stepper input-width="60px" :min="axisLimitDataTem.min" v-model.number="axisLimitDataTem.leftMin" />
- </div>
- </div>
- </div>
- </div>
- <!-- 右轴 -->
- <div class="item-box" v-if="axisLimitState.hasRightAxis">
- <span class="lable-text">右轴</span>
- <div class="input-box">
- <div class="item">
- <div class="type-text">上限</div>
- <div class="step-box">
- <van-stepper input-width="60px" :min="axisLimitDataTem.min" v-model.number="axisLimitDataTem.rightMax" />
- </div>
- </div>
- <div class="item">
- <div class="type-text">下限</div>
- <div class="step-box">
- <van-stepper input-width="60px" :min="axisLimitDataTem.min" v-model.number="axisLimitDataTem.rightMin" />
- </div>
- </div>
- </div>
- </div>
- <!-- 右二轴 -->
- <div class="item-box" v-if="axisLimitState.hasRightTwoAxis">
- <span class="lable-text">右2轴</span>
- <div class="input-box">
- <div class="item">
- <div class="type-text">上限</div>
- <div class="step-box">
- <van-stepper input-width="60px" :min="axisLimitDataTem.min" v-model.number="axisLimitDataTem.rightTwoMax" />
- </div>
- </div>
- <div class="item">
- <div class="type-text">下限</div>
- <div class="step-box">
- <van-stepper input-width="60px" :min="axisLimitDataTem.min" v-model.number="axisLimitDataTem.rightTwoMin" />
- </div>
- </div>
- </div>
- </div>
- <!-- x轴 -->
- <div class="item-box" v-if="axisLimitState.hasXAxis">
- <span class="lable-text">X轴</span>
- <div class="input-box">
- <div class="item">
- <div class="type-text">上限</div>
- <div class="step-box">
- <van-stepper input-width="60px" :min="axisLimitDataTem.min" v-model.number="axisLimitDataTem.xMax" />
- </div>
- </div>
- <div class="item">
- <div class="type-text">下限</div>
- <div class="step-box">
- <van-stepper input-width="60px" :min="axisLimitDataTem.min" v-model.number="axisLimitDataTem.xMin" />
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="bot-btn-box" @click="handleConfirmLimitChange">确定</div>
- </div>
- </van-popup>
- <!-- 更多操作弹窗 -->
- <van-popup
- v-model:show="showMoreAction"
- :position="width>650?'center':'bottom'"
- :style="width>650?{ width: '400px'}:''"
- round
- >
- <div class="more-action-wrap">
- <div class="van-ellipsis title-box">{{chartInfo.ChartName}}</div>
- <div class="item" @click.stop="handleChartRefresh" v-permission="myETABtn.myChart_refresh">
- 刷新
- </div>
- <div class="item" @click.stop="handleChartShare" v-if="!chartInfo.Disabled&&checkAuthBtn(myETABtn.myChart_share)">
- 分享
- </div>
- <div class="item" @click.stop="handleChartSave" v-if="[1,2,5,10].includes(chartInfo.Source)&&checkAuthBtn(myETABtn.myChart_save)">
- 保存
- </div>
- <div class="item" @click.stop="handleRemoveChart" v-if="$route.query.iscommon!='true'&&checkAuthBtn(myETABtn.myChart_move)">
- 移出
- </div>
- <div class="item" @click.stop="handleShowCopyTo" v-if="$route.query.iscommon!='true'&&checkAuthBtn(myETABtn.myChart_copyTo)">
- 复制到
- </div>
- <div class="item" @click.stop="isShowAddToMyETADialog=true" v-if="$route.query.from==='edbRelationChart'">
- 加入我的图库
- </div>
- <div class="item" @click.stop="showSaveChartOther=true" v-if="chartInfo.Button.IsCopy&&checkAuthBtn(myETABtn.myChart_otherSave)&&chartInfo.Source!==11">
- 另存为
- </div>
- <div class="item" @click.stop="handleChartSavePicture" v-if="!chartInfo.Disabled&&checkAuthBtn(myETABtn.myChart_copyWechat)&&checkAuthBtn(myETABtn.myChart_copyOffice)">
- 保存至相册
- </div>
- <div class="item" @click.stop="showSaveToMaterial=true" v-if="checkAuthBtn(myETABtn.myChart_saveToMaterial)">
- 保存为素材
- </div>
- <div class="item" @click.stop="handleShowEditEnName" v-permission="myETABtn.myChart_enNameSetting" v-if="chartInfo.Source!==11">
- 设置英文名称
- </div>
- <div class="item" @click.stop="handleDeleteChart" v-if="chartInfo.IsEdit&&checkAuthBtn(myETABtn.myChart_del)">
- 删除
- </div>
- </div>
- </van-popup>
- <!-- 复制到 -->
- <van-popup
- v-model:show="showCopyTo"
- :position="width>650?'center':'bottom'"
- :round="width>650?true:false"
- closeable
- >
- <div class="global-pop-wrap_mobile chart-copyto-wrap">
- <div class="head-box">
- <div class="title">复制到</div>
- </div>
- <div class="content">
- <ul>
- <li
- :class="['item',item.select?'active':'']"
- v-for="item in copyToOpt"
- :key="item.MyChartClassifyId"
- @click="item.select=!item.select"
- >{{item.MyChartClassifyName}}</li>
- </ul>
- <div v-if="copyToOpt.length===0" style="padding:50px 0;text-align:center">暂无分类,快去创建我的分类吧~</div>
- </div>
- <div class="bot-btn-box" @click="handleConfirmCopy" v-if="copyToOpt.length>0">确定</div>
- </div>
- </van-popup>
- <!-- 另存为 -->
- <ChartSaveOther
- :source="chartInfo?.Source"
- :chartInfo="chartInfo"
- :show="showSaveChartOther"
- @close="showSaveChartOther=false"
- />
- <!--保存图片弹窗 -->
- <van-popup
- v-model:show="savePicDialogShow"
- position="center"
- round
- >
- <div class="chart-picture-box">
- <img :src="savePicSrc" alt="">
- <p style="text-align: center;color:#999;margin-top: 10px;">长按保存图片</p>
- </div>
- </van-popup>
- <!-- 修改英文名称 -->
- <van-popup
- v-model:show="showEidtEnName"
- position="bottom"
- :style="{height:'100%'}"
- >
- <set-chart-en-name
- :isShow="showEidtEnName"
- :chartInfo="chartInfoData"
- @cancel="showEidtEnName=false"
- @success="handleEditEnNameSuccess"
- />
- </van-popup>
- <!-- 加入我的图库 -->
- <AddChartToMyETA
- :isShowDialog="isShowAddToMyETADialog"
- :dialogPosition="width>650?'center':'bottom'"
- :chartInfo="chartInfo"
- @close="isShowAddToMyETADialog=false"
- />
- <!-- 保存至素材库 -->
- <SaveToMaterial
- v-model:show="showSaveToMaterial"
- source="chart"
- :sourceId="chartInfo.ChartInfoId"
- :defaultName="chartInfo.ChartName"
- />
- </template>
- <style lang="scss" scoped>
- .chart-detail-page{
- padding: $page-padding;
- padding-bottom: 120px;
- .chart-title{
- font-size: 36px;
- margin-bottom: 56px;
- }
- .chart-render-wrap{
- .pad-change-chart-btn{
- display: none;
- }
- }
- .chart-box{
- width: 100%;
- height: 700px;
- }
- .pad-time-action-wrap{
- display: none;
- }
- .select-time-box{
- display: flex;
- align-items: center;
- .left-icon{
- width: 48px;
- height: 48px;
- }
- .right-icon{
- margin-left: auto;
- }
- .val-box{
- margin-left: 32px;
- font-size: 32px;
- &.val-box_grey{
- color: $font-grey_999;
- }
- }
- }
- .select-year-box{
- width: 100vw;
- position: relative;
- left: -$page-padding;
- margin-top: 30px;
- box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.08);
- height: 88px;
- display: flex;
- align-items: center;
- overflow-y: auto;
- padding: 0 $page-padding;
- &::-webkit-scrollbar{
- height: 0;
- }
- .item{
- line-height: 88px;
- position: relative;
- height: 100%;
- flex-shrink: 0;
- display: inline-block;
- margin-right: 40px;
- font-size: 32px;
- color: $font-grey_999;
- &.active{
- color: #333;
- &::after{
- content: '';
- display: block;
- width: 50px;
- height: 6px;
- border-radius: 3px;
- background-color: $theme-color;
- position: absolute;
- bottom: 0;
- left: 50%;
- transform: translateX(-50%);
- }
- }
- }
- }
- .calendar-type-box{
- width: 404px;
- margin: 30px auto;
- text-align: center;
- border: 1px solid $theme-color;
- border-radius: 12px;
- overflow: hidden;
- span{
- display: inline-block;
- width: 200px;
- height: 80px;
- line-height: 80px;
- color: $theme-color;
- font-weight: bold;
- &.active{
- background-color: $theme-color;
- color: #fff;
- }
- }
- }
- .edb-list-box{
- margin-top: 20px;
- .list-item{
- padding:18px;
- display: flex;
- gap:0 20px;
- border-bottom: 1px solid #DCDFE6;
- &:last-child{
- border-bottom: none;
- }
- .edb-name{
- flex: 1;
- }
- }
- }
- .fix-bot-action-box{
- position: fixed;
- left: 0;
- bottom: 0;
- right: 0;
- z-index: 99;
- background-color: #fff;
- border-top: 1px solid $border-color;
- height: 112px;
- display: flex;
- align-items: center;
- .item{
- height: 100%;
- flex: 1;
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- font-size: 20px;
- .icon{
- width: 40px;
- height: 40px;
- margin-bottom: 5px;
- }
- }
- }
- }
- .chart-set-limit-wrap{
- .head-box{
- .title{
- padding: 0 $page-padding;
- font-size: 36px;
- font-weight: 600;
- line-height: 120px;
- }
- }
- .bot-btn-box{
- line-height: 112px;
- text-align: center;
- color: $theme-color;
- font-size: 32px;
- }
- .content{
- padding: $page-padding;
- .item-box{
- display: flex;
- align-items: flex-end;
- margin-bottom: 30px;
- .lable-text{
- width: 100px;
- }
- .input-box{
- flex: 1;
- display: flex;
- .item{
- flex: 1;
- text-align: center;
- .type-text{
- margin-bottom: 40px;
- }
- .step-box{
- display: inline-block;
- :deep(.van-stepper){
- display: flex;
- justify-content: center;
- }
- }
- }
- }
- }
- }
-
- }
- .more-action-wrap{
- .title-box{
- font-size: 36px;
- font-weight: 600;
- text-align: center;
- padding: $page-padding;
- }
- .item{
- display: flex;
- align-items: center;
- justify-content: center;
- padding: 32px 34px;
- border-top: 1px solid $border-color;
- font-size: 32px;
- }
- }
- .chart-copyto-wrap{
- .head-box{
- .title{
- padding: 0 $page-padding;
- font-size: 36px;
- font-weight: 600;
- line-height: 120px;
- }
- }
- .bot-btn-box{
- line-height: 112px;
- text-align: center;
- color: $theme-color;
- font-size: 32px;
- }
- .content{
- .item{
- padding: 32px $page-padding;
- font-size: 32px;
- border-bottom: 1px solid $border-color;
- position: relative;
- &.active{
- color: $theme-color;
- &::after{
- content: '';
- display: block;
- width: 36px;
- height: 36px;
- background-image: url('@/assets/imgs/icon_select2.png');
- background-size: cover;
- background-repeat: no-repeat;
- position: absolute;
- top: 50%;
- right: $page-padding;
- transform: translateY(-50%);
- }
- }
- }
- }
- }
- .chart-picture-box{
- width: 300PX;
- border-radius: 6PX;
- padding: 10PX;
- background-color: #fff;
- img{
- width: 100%;
- display: block;
- }
- }
- @media screen and (min-width:$media-width){
- .chart-detail-page{
- padding: 30px;
- .chart-title{
- font-size: 16px;
- margin-bottom: 30px;
- }
- .chart-render-wrap{
- position: relative;
- .pad-change-chart-btn{
- display: block;
- width: 48px;
- height: 48px;
- position: absolute;
- top: 50%;
- transform: translateY(-50%);
- left: 0px;
- &.pad-change-chart-next-btn{
- right: 0;
- left: auto;
- transform: translateY(-50%) rotate(180deg);
- }
- }
- }
- .chart-box{
- width: 85%;
- height: 370px;
- margin: 0 auto;
- }
- .select-time-box{
- display: none;
- }
- .select-year-box{
- display: none;
- }
- .calendar-type-box{
- width: 224px;
- margin: 20px auto;
- border-radius: 4px;
- span{
- width: 111px;
- height: 38px;
- line-height: 38px;
- }
- }
- .edb-list-box{
- margin-top: 30px;
- .list-item{
- padding: 10px 0;
- }
- }
- .fix-bot-action-box{
- display: none;
- }
- .pad-time-action-wrap{
- display: flex;
- flex-wrap: wrap;
- align-items: center;
- justify-content: space-between;
- .left-time-box{
- flex-shrink: 0;
- margin-bottom: 20px;
- .item{
- display: inline-block;
- width: 80px;
- height: 36px;
- text-align: center;
- line-height: 36px;
- border: 1px solid $theme-color;
- margin-right: 10px;
- border-radius: 3px;
- color: $theme-color;
- &.active{
- color: #fff;
- background-color: $theme-color;
- }
- }
- .time-box{
- display: inline-block;
- padding: 0 15px;
- height: 36px;
- line-height: 36px;
- border: 1px solid $theme-color;
- border-radius: 3px;
- background-color: #F2F3FF;
- color: $theme-color;
- }
- }
- .right-action-box{
- display: flex;
- margin-bottom: 20px;
- .item{
- display: flex;
- color: $theme-color;
- margin-left: 20px;
- img{
- width: 18px;
- height: 18px;
- margin-right: 4px;
- }
- }
- .red{
- color: $theme-red;
- }
- }
- }
- }
- .chart-set-limit-wrap{
- .head-box{
- .title{
- font-size: 18px;
- line-height: 50px;
- padding-left: 16px;
- }
- }
- .bot-btn-box{
- font-size: 16px;
- line-height: 56px;
- border-top-width: 8px;
- }
- .content{
- max-height: 500px;
- padding: 30px;
- .item-box{
- margin-bottom: 15px;
- .lable-text{
- width: 50px;
- }
- .input-box{
- .item{
- .type-text{
- margin-bottom: 20px;
- }
- }
- }
- }
- }
- }
- .more-action-wrap{
- .title-box{
- font-size: 18px;
- padding: 20px $page-padding;
- }
- .item{
- padding: 20px $page-padding;
- font-size: 16px;
- }
- }
- .chart-copyto-wrap{
- width: 375px;
- .head-box{
- .title{
- font-size: 18px;
- line-height: 50px;
- padding-left: 16px;
- }
- }
- .bot-btn-box{
- font-size: 16px;
- line-height: 56px;
- border-top-width: 8px;
- }
- .content{
- max-height: 500px;
- overflow-y: auto;
- .item{
- padding: 16px;
- font-size: 16px;
- &.active{
- &::after{
- width: 18px;
- height: 18px;
- right: 16px;
- }
- }
- }
- }
- }
- .chart-picture-box{
- width: 500PX;
- }
- }
- .noAuth {
- text-align: center;
- .img {
- margin-bottom: 20px;
- }
- }
- </style>
|