|
@@ -1,14 +1,11 @@
|
|
|
<script setup>
|
|
|
import {ref,nextTick, reactive} from 'vue'
|
|
|
import apiETAChart from '@/api/chart'
|
|
|
-import {
|
|
|
- apiMyChartList,
|
|
|
- apiMyClassifyList,
|
|
|
- apiChartInMyClassifyList,
|
|
|
- apiChartAddToClassify,
|
|
|
- apiMyChartRemove,
|
|
|
- apiChartDel
|
|
|
-} from '@/api/myETA'
|
|
|
+import apiFutureChart from '@/api/futureChart'
|
|
|
+import apiCorrelationChart from '@/api/correlationChart'
|
|
|
+import apiLineEquationChart from '@/api/lineEquationChart'
|
|
|
+import apiStatisticFeatureChart from '@/api/statisticFeatureChart'
|
|
|
+import apiMyETAChart from '@/api/myETA'
|
|
|
import { useRoute, useRouter } from 'vue-router'
|
|
|
import {useChartRender} from '@/hooks/chart/render'
|
|
|
import {yearSelectOpt,sameOptionType} from '@/hooks/chart/config'
|
|
@@ -32,7 +29,7 @@ let chartCode=route.query.code
|
|
|
let allChartList=ref([])
|
|
|
async function getAllChartList(){
|
|
|
if(!route.query.cid) return
|
|
|
- const res=await apiMyChartList({
|
|
|
+ const res=await apiMyETAChart.myChartList({
|
|
|
CurrentIndex:1,
|
|
|
PageSize:1000000,
|
|
|
MyChartClassifyId:Number(route.query.cid)
|
|
@@ -331,7 +328,7 @@ let showMoreAction=ref(false)
|
|
|
// 复制到
|
|
|
let myChartClassifyList=[]//我的图库中的所有分类
|
|
|
async function getMyChartClassifyList(){
|
|
|
- const res=await apiMyClassifyList()
|
|
|
+ const res=await apiMyETAChart.myClassifyList()
|
|
|
if(res.Ret===200){
|
|
|
myChartClassifyList=res.Data.List||[]
|
|
|
}
|
|
@@ -340,7 +337,7 @@ getMyChartClassifyList()
|
|
|
let showCopyTo=ref(false)
|
|
|
let copyToOpt=ref([])
|
|
|
async function handleShowCopyTo(){
|
|
|
- const res=await apiChartInMyClassifyList({ChartInfoId:chartInfo.value.ChartInfoId})
|
|
|
+ const res=await apiMyETAChart.chartInMyClassifyList({ChartInfoId:chartInfo.value.ChartInfoId})
|
|
|
if(res.Ret===200){
|
|
|
const arr=res.Data||[]
|
|
|
copyToOpt.value=myChartClassifyList.map(e=>{
|
|
@@ -363,7 +360,7 @@ async function handleConfirmCopy(){
|
|
|
showToast('请选择分类')
|
|
|
return
|
|
|
}
|
|
|
- const res=await apiChartAddToClassify({
|
|
|
+ const res=await apiMyETAChart.chartAddToClassify({
|
|
|
ChartInfoId:chartInfo.value.ChartInfoId,
|
|
|
MyChartClassifyId:arr
|
|
|
})
|
|
@@ -385,7 +382,7 @@ function handleRemoveChart(){
|
|
|
showCancelButton:true
|
|
|
}).then(() => {
|
|
|
// on close
|
|
|
- apiMyChartRemove({
|
|
|
+ apiMyETAChart.myChartRemove({
|
|
|
MyChartClassifyId:Number(route.query.cid),
|
|
|
MyChartId:chartInfo.value.MyChartId
|
|
|
}).then(res=>{
|
|
@@ -407,7 +404,7 @@ function handleDeleteChart(){
|
|
|
showCancelButton:true
|
|
|
}).then(() => {
|
|
|
// on close
|
|
|
- apiChartDel({
|
|
|
+ apiMyETAChart.chartDel({
|
|
|
ChartInfoId:chartInfo.value.ChartInfoId
|
|
|
}).then(res=>{
|
|
|
if(res.Ret===200){
|
|
@@ -423,6 +420,32 @@ function handleDeleteChart(){
|
|
|
// 另存为
|
|
|
let showSaveChartOther=ref(false)
|
|
|
|
|
|
+// 刷新
|
|
|
+async function handleChartRefresh(){
|
|
|
+ const { Source,ChartInfoId,UniqueCode } = chartInfo.value
|
|
|
+ let res=null
|
|
|
+ if(Source===1){
|
|
|
+ res= await apiETAChart.refreshChart({ 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 })
|
|
|
+ }
|
|
|
+ if(res.Ret!==200)return
|
|
|
+ showToast('刷新成功')
|
|
|
+ showMoreAction.value=false
|
|
|
+ Source===1?reloadChartInfo():getChartInfo()
|
|
|
+}
|
|
|
+
|
|
|
+//分享
|
|
|
+function handleChartShare(){
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
</script>
|
|
|
|
|
|
<template>
|
|
@@ -511,15 +534,13 @@ let showSaveChartOther=ref(false)
|
|
|
<div class="edb-list-box">
|
|
|
<!-- pad 设置上下限按钮 -->
|
|
|
<span class="pad-limit-set-btn" @click="handleShowAxisLimitOpt" v-if="chartInfo.Source!=3&&chartInfo.ChartType!=8">设置上下限</span>
|
|
|
- <div class="list-lable">指标信息</div>
|
|
|
+ <!-- <div class="list-lable">指标信息</div> -->
|
|
|
<div class="list-box">
|
|
|
- <van-cell
|
|
|
- :title="item.EdbName"
|
|
|
- is-link
|
|
|
- v-for="item in edbList"
|
|
|
- :key="item.EdbInfoId"
|
|
|
- @click="handleShowEDBInfo(item)"
|
|
|
- />
|
|
|
+ <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>
|
|
|
|
|
@@ -685,23 +706,33 @@ let showSaveChartOther=ref(false)
|
|
|
v-model:show="showMoreAction"
|
|
|
position="bottom"
|
|
|
round
|
|
|
+ closeable
|
|
|
>
|
|
|
<div class="more-action-wrap">
|
|
|
+ <div class="van-ellipsis title-box">{{chartInfo.ChartName}}</div>
|
|
|
+ <div class="item" @click.stop="handleChartRefresh">
|
|
|
+ 刷新
|
|
|
+ </div>
|
|
|
+ <div class="item" @click.stop="handleChartShare" v-if="!chartInfo.Disabled">
|
|
|
+ 分享
|
|
|
+ </div>
|
|
|
+ <div class="item" @click.stop="handleRemoveChart" v-if="$route.query.iscommon!='true'">
|
|
|
+ 移出
|
|
|
+ </div>
|
|
|
<div class="item" @click.stop="handleShowCopyTo" v-if="$route.query.iscommon!='true'">
|
|
|
- <img src="@/assets/imgs/myETA/icon_copy.png" alt="">
|
|
|
- <span>复制到</span>
|
|
|
+ 复制到
|
|
|
</div>
|
|
|
<div class="item" @click.stop="showSaveChartOther=true">
|
|
|
- <img src="@/assets/imgs/myETA/icon_save.png" alt="">
|
|
|
- <span>另存为</span>
|
|
|
+ 另存为
|
|
|
</div>
|
|
|
- <div class="item" @click.stop="handleRemoveChart" v-if="$route.query.iscommon!='true'">
|
|
|
- <img src="@/assets/imgs/myETA/icon_remove.png" alt="">
|
|
|
- <span>移出</span>
|
|
|
+ <div class="item">
|
|
|
+ 保存图片
|
|
|
+ </div>
|
|
|
+ <div class="item">
|
|
|
+ 设置英文名称
|
|
|
</div>
|
|
|
<div class="item" @click.stop="handleDeleteChart" v-if="chartInfo.IsEdit">
|
|
|
- <img src="@/assets/imgs/myETA/icon_del.png" alt="">
|
|
|
- <span>删除</span>
|
|
|
+ 删除
|
|
|
</div>
|
|
|
</div>
|
|
|
</van-popup>
|
|
@@ -846,6 +877,7 @@ let showSaveChartOther=ref(false)
|
|
|
}
|
|
|
|
|
|
.edb-list-box{
|
|
|
+ margin-top: 20px;
|
|
|
.pad-limit-set-btn{
|
|
|
display: none;
|
|
|
}
|
|
@@ -855,14 +887,17 @@ let showSaveChartOther=ref(false)
|
|
|
margin-bottom: 20px;
|
|
|
margin-top: 40px;
|
|
|
}
|
|
|
- :deep(.van-cell){
|
|
|
- padding-left: 0;
|
|
|
- padding-right: 0;
|
|
|
- font-size: 32px;
|
|
|
- }
|
|
|
- :deep(.van-cell:after){
|
|
|
- right: 0;
|
|
|
- left: 0;
|
|
|
+ .list-item{
|
|
|
+ padding:18px;
|
|
|
+ display: flex;
|
|
|
+ gap:0 20px;
|
|
|
+ border-bottom: 1px solid #DCDFE6;
|
|
|
+ &:last-child{
|
|
|
+ border-bottom: none;
|
|
|
+ }
|
|
|
+ .edb-name{
|
|
|
+ flex: 1;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -940,17 +975,24 @@ let showSaveChartOther=ref(false)
|
|
|
|
|
|
}
|
|
|
.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-bottom: 1px solid $border-color;
|
|
|
+ border-top: 1px solid $border-color;
|
|
|
font-size: 32px;
|
|
|
- img{
|
|
|
- width: 48px;
|
|
|
- height: 48px;
|
|
|
- margin-right: 20px;
|
|
|
- }
|
|
|
+ // img{
|
|
|
+ // width: 48px;
|
|
|
+ // height: 48px;
|
|
|
+ // margin-right: 20px;
|
|
|
+ // }
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -1062,13 +1104,7 @@ let showSaveChartOther=ref(false)
|
|
|
font-size: 16px;
|
|
|
margin-bottom: 14px;
|
|
|
}
|
|
|
- :deep(.van-cell){
|
|
|
- font-size: 14px;
|
|
|
- padding: 10px 20px;
|
|
|
- }
|
|
|
- .list-box{
|
|
|
- border: 1px solid $border-color;
|
|
|
- }
|
|
|
+
|
|
|
}
|
|
|
.fix-bot-action-box{
|
|
|
display: none;
|