123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644 |
- <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 { 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 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
- 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=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()
- }
- //分享
- function handleChartShare(){
- // const url=import.meta.env.VITE_CHART_LINK+`?code=${chartInfo.value.UniqueCode}&fromType=share&lang=ch`
- const url=publicSettingStore.publicSetting.ChartViewUrl+`/chartshow?code=${chartInfo.value.UniqueCode}&fromType=share&lang=ch`
- 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="(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">
- <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="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="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="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>
|