| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665 |
- <script lang="ts" setup>
- import { ref, onMounted, reactive } from 'vue'
- import QuickCalendarDate from '@/components/DateRange/src/components/QuickCalendarDate.vue'
- import { VueDraggable } from 'vue-draggable-plus'
- import PieChart from './components/PieChart.vue'
- import SellerChart from './components/SellerChart.vue'
- import BarChart from './components/BarChart.vue'
- import RevenueChart from './components/RevenueChart.vue'
- import RecentStatus from './components/RecentStatus.vue'
- import ScoringSystem from './components/ScoringSystem.vue'
- import TopMap from './components/TopMap.vue'
- import DashFilters from './components/DashFiters.vue'
- import { useRouter } from 'vue-router'
- import { ElMessage } from 'element-plus'
- import { formatNumber } from '@/utils/tools'
- const router = useRouter()
- const activeName = ref('first')
- const SaveVisible = ref(false)
- // 可拖拽模块的列表
- interface ManagementItem {
- title: string
- switchValue: boolean
- isRevenueDisplay: boolean
- text: string
- id: number
- title1: string
- title2: string
- }
- const Management = ref<ManagementItem[]>([])
- const changeCancel = (id: any) => {
- Management.value[id - 1].switchValue = false
- }
- //RecentStatusList
- const RecentStatusList = ref()
- const pageInfo = ref({ pageNo: 1, pageSize: 10, total: 10000 })
- const isShowtitle1 = ref(true)
- // 点击tab
- const handleTabClick = (tab: any) => {
- if (tab.props.name == 'first') {
- isShowtitle1.value = true
- } else {
- isShowtitle1.value = false
- }
- GetTop10ODEcharts(dashboardObj.Top10faultData)
- }
- const KPIDefaulteData = ref()
- const PendingDefaulteData = ref()
- const RecentDefaulteData = ref()
- const ETDDefaulteData = ref()
- const ContainerefaultData = ref()
- const Top10DefaultData = ref()
- const Co2OriginDefaultData = ref()
- const Co2DestinationDefaultData = ref()
- const RevenueDefaultData = ref()
- // 获取首页数据
- let dashboardObj: any = {}
- const GetDashboardData = () => {
- $api
- .getDashboardFilters({})
- .then((res: any) => {
- if (res.code == 200) {
- //给默认筛选条件赋值
- KPIDefaulteData.value = res.data.KPIDefaulteData
- dashboardObj.KPIDefaulteData = res.data.KPIDefaulteData
- PendingDefaulteData.value = res.data.PendingDefaultData
- dashboardObj.PendingDefaultData = res.data.PendingDefaultData
- RecentDefaulteData.value = res.data.RecentDefaultData
- dashboardObj.RecentDefaultData = res.data.RecentDefaultData
- ETDDefaulteData.value = res.data.ETDDefaultData
- dashboardObj.ETDDefaultData = res.data.ETDDefaultData
- ContainerefaultData.value = res.data.ContainerefaultData
- dashboardObj.ContainerefaultData = res.data.ContainerefaultData
- Top10DefaultData.value = res.data.Top10faultData
- dashboardObj.Top10faultData = res.data.Top10faultData
- Co2OriginDefaultData.value = res.data.OriginCo2Top10faultData
- dashboardObj.OriginCo2Top10faultData = res.data.OriginCo2Top10faultData
- Co2DestinationDefaultData.value = res.data.DestinationCo2Top10faultData
- dashboardObj.DestinationCo2Top10faultData = res.data.DestinationCo2Top10faultData
- RevenueDefaultData.value = res.data.RevenueDefaultData
- dashboardObj.RevenueDefaultData = res.data.RevenueDefaultData
- }
- })
- .finally(() => {
- nextTick(() => {
- GetKpiData(KPIDefaulteData.value)
- GetPendingEcharts(PendingDefaulteData.value)
- getTableData(false, RecentDefaulteData.value)
- GetETDEcharts(ETDDefaulteData.value)
- GetContainerCountEcharts(ContainerefaultData.value)
- GetTop10ODEcharts(Top10DefaultData.value)
- GetCo2EmissionEcharts(Co2OriginDefaultData.value)
- GetCo2DestinationEcharts(Co2DestinationDefaultData.value)
- GetRevenueEcharts(RevenueDefaultData.value)
- })
- })
- }
- // 获取表单数据
- const getTableData = (isPage: any, val: any) => {
- dashboardObj.RecentDefaultData = val
- const rc = isPage ? pageInfo.value.total : -1
- $api
- .GetDashboardData({
- cp: pageInfo.value.pageNo,
- ps: pageInfo.value.pageSize,
- rc,
- ...val
- })
- .then((res: any) => {
- if (res.code === 200) {
- pageInfo.value.total = Number(res.data.rc)
- Management.value = res.data.Management
- RecentStatusList.value = res.data.searchData
- }
- })
- }
- const KPIobj = reactive({
- ETD_Title: '',
- ETDList: [],
- ETD_Radius: [],
- download_name: ''
- })
- const Arrivalobj = reactive({
- ETD_Title: '',
- ETDList: [],
- ETD_Radius: [],
- download_name: ''
- })
- const KPILoading = ref(true)
- const KPIArrivalLoading = ref(true)
- //查询KPI
- const GetKpiData = (val: any) => {
- dashboardObj.KPIDefaulteData = val
- // 获取KPI Departure图表数据
- $api
- .GetKPIEcharts({
- r_type: 'atd_r4',
- ...val
- })
- .then((res: any) => {
- if (res.code === 200) {
- KPIobj.ETD_Title = `{a|${res.data.title1}} {b|${res.data.title2}}`
- KPIobj.ETDList = res.data.ETDList
- KPIobj.ETD_Radius = res.data.ETD_Radius
- KPIobj.download_name = res.data.download_name
- }
- })
- .finally(() => {
- KPILoading.value = false
- })
- // 获取KPI Arrival图表数据
- $api
- .GetKPIEcharts({
- r_type: 'ata_r3',
- ...val
- })
- .then((res: any) => {
- if (res.code === 200) {
- Arrivalobj.ETD_Title = `{a|${res.data.title1}} {b|${res.data.title2}}`
- Arrivalobj.ETDList = res.data.ETDList
- Arrivalobj.ETD_Radius = res.data.ETD_Radius
- Arrivalobj.download_name = res.data.download_name
- }
- })
- .finally(() => {
- KPIArrivalLoading.value = false
- })
- }
- const Pendingobj = reactive({
- ETD_Title: '',
- ETDList: [],
- ETD_Radius: [],
- download_name: ''
- })
- const PendingArrivalobj = reactive({
- ETD_Title: '',
- ETDList: [],
- ETD_Radius: [],
- download_name: ''
- })
- const PendingLoading = ref(true)
- const PendingArrivalLoading = ref(true)
- // 查询Pending
- const GetPendingEcharts = (val: any) => {
- dashboardObj.PendingDefaultData = val
- // 获取Pending Departure图表数据
- $api
- .GetPendingEcharts({
- r_type: 'r4',
- ...val
- })
- .then((res: any) => {
- if (res.code === 200) {
- Pendingobj.ETD_Title = `{a|${res.data.title1}} {b|${res.data.title2}}`
- Pendingobj.ETDList = res.data.ETDList
- Pendingobj.ETD_Radius = res.data.ETD_Radius
- Pendingobj.download_name = res.data.download_name
- }
- })
- .finally(() => {
- PendingLoading.value = false
- })
- // 获取Pending Arrival图表数据
- $api
- .GetPendingEcharts({
- r_type: 'r3',
- ...val
- })
- .then((res: any) => {
- if (res.code === 200) {
- PendingArrivalobj.ETD_Title = `{a|${res.data.title1}} {b|${res.data.title2}}`
- PendingArrivalobj.ETDList = res.data.ETDList
- PendingArrivalobj.ETD_Radius = res.data.ETD_Radius
- PendingArrivalobj.download_name = res.data.download_name
- }
- })
- .finally(() => {
- PendingArrivalLoading.value = false
- })
- }
- const ETDobj = reactive({
- ETD_Title: '',
- ETDList: [],
- ETD_Radius: [],
- download_name: ''
- })
- const ETDLoading = ref(true)
- // 获取ETD/ETA 图表数据
- const GetETDEcharts = (val: any) => {
- dashboardObj.ETDDefaultData = val
- $api
- .GetETDEcharts({
- ...val
- })
- .then((res: any) => {
- if (res.code === 200) {
- ETDobj.ETD_Title = `{a|${res.data.ETD_Title}}`
- ETDobj.ETDList = res.data.ETDList
- ETDobj.ETD_Radius = res.data.ETD_Radius
- ETDobj.download_name = res.data.download_name
- }
- })
- .finally(() => {
- ETDLoading.value = false
- })
- }
- // 获取ContainerCount
- const containerObj = reactive({
- bar_title: '',
- barList: [],
- barSeries: [],
- Max: 0,
- interval: 0,
- download_name: ''
- })
- const containerLoading = ref(true)
- const GetContainerCountEcharts = (val: any) => {
- dashboardObj.ContainerefaultData = val
- $api
- .GetContainerCountEcharts({
- ...val
- })
- .then((res: any) => {
- if (res.code === 200) {
- containerObj.bar_title = res.data.ContainerCount_Title
- containerObj.barList = res.data.ContainerCountList
- containerObj.barSeries = res.data.ContainerCounSeries
- containerObj.Max = res.data.Max
- containerObj.interval = res.data.interval
- containerObj.download_name = res.data.download_name
- }
- })
- .finally(() => {
- containerLoading.value = false
- })
- }
- const topdestinationinType = ref()
- const toporiginType = ref()
- //获取Top10 Origin/Destination
- const Top10Obj = reactive({
- OriginData: [],
- DestinationData: []
- })
- const Top1OInterval = reactive({
- Max: 0,
- interval: 0
- })
- const Top1OInterval_dest = reactive({
- Max: 0,
- interval: 0
- })
- const TopOriginLoading = ref(true)
- const Top10Originref = ref()
- const Top10Destinationref = ref()
- const GetTop10ODEcharts = (val: any) => {
- dashboardObj.Top10faultData = val
- $api
- .GetTop10ODEcharts({
- ...val
- })
- .then((res: any) => {
- if (res.code === 200) {
- // Top10Originref.value[0].updataMapObj(dashboardObj.Top10faultData)
- if (isShowtitle1.value) {
- Top10Originref.value[0].updataMapObj(res.data.toporiginMap)
- } else {
- Top10Destinationref.value[0].updataMapObj(res.data.topdestinationinMap)
- }
- Top10Obj.DestinationData = res.data.seller_data_list_destination
- Top10Obj.OriginData = res.data.seller_data_list_origin
- Top1OInterval.Max = res.data.Max
- Top1OInterval.interval = res.data.interval
- Top1OInterval_dest.Max = res.data.dest_Max
- Top1OInterval_dest.interval = res.data.dest_interval
- topdestinationinType.value = res.data.topdestinationinType
- toporiginType.value = res.data.toporiginType
- }
- })
- .finally(() => {
- TopOriginLoading.value = false
- })
- }
- //获取CO2 Origin
- const EmissionLoading = ref(true)
- const EmissionObj = reactive({
- bar_title: '',
- barList: [],
- barSeries: [],
- Max: 0,
- interval: 0,
- download_name: ''
- })
- const GetCo2EmissionEcharts = (val: any) => {
- dashboardObj.OriginCo2Top10faultData = val
- $api
- .GetCo2EmissionEcharts({
- ...val
- })
- .then((res: any) => {
- if (res.code === 200) {
- EmissionObj.bar_title = res.data.ContainerCount_Title
- EmissionObj.barList = res.data.ContainerCountList
- EmissionObj.barSeries = res.data.ContainerCounSeries
- EmissionObj.Max = res.data.Max
- EmissionObj.interval = res.data.interval
- EmissionObj.download_name = res.data.download_name
- }
- })
- .finally(() => {
- EmissionLoading.value = false
- })
- }
- //获取CO2 Destination
- const DestinationObj = reactive({
- bar_title: '',
- barList: [],
- barSeries: [],
- Max: 0,
- interval: 0,
- download_name: ''
- })
- const DestinationLoading = ref(true)
- const GetCo2DestinationEcharts = (val: any) => {
- dashboardObj.DestinationCo2Top10faultData = val
- $api
- .GetCo2DestinationEcharts({
- ...val
- })
- .then((res: any) => {
- if (res.code === 200) {
- DestinationObj.bar_title = res.data.ContainerCount_Title
- DestinationObj.barList = res.data.ContainerCountList
- DestinationObj.barSeries = res.data.ContainerCounSeries
- DestinationObj.Max = res.data.Max
- DestinationObj.interval = res.data.interval
- DestinationObj.download_name = res.data.download_name
- }
- })
- .finally(() => {
- DestinationLoading.value = false
- })
- }
- //获取Revenue Spent
- const RevenueObj = reactive({
- bar_title: '',
- barList: [],
- barSeries: [],
- Max: 0,
- interval: 0,
- download_name: '',
- isShowTooltips: true
- })
- const RevenueLoading = ref(true)
- const revenue_date_start = ref()
- const revenue_date_end = ref()
- const GetRevenueEcharts = (val: any) => {
- revenue_date_start.value = val.date_start
- revenue_date_end.value = val.date_end
- dashboardObj.RevenueDefaultData = val
- $api
- .GetRevenueEcharts({
- ...val
- })
- .then((res: any) => {
- if (res.code === 200) {
- RevenueObj.bar_title = res.data.bar_title
- RevenueObj.barList = res.data.barList
- RevenueObj.barSeries = res.data.barSeries
- RevenueObj.Max = res.data.Max
- RevenueObj.interval = res.data.interval
- RevenueObj.download_name = res.data.download_name
- }
- })
- .finally(() => {
- RevenueLoading.value = false
- })
- }
- onMounted(() => {
- GetDashboardData()
- })
- // Save Layout
- const SaveLayout = () => {
- SaveVisible.value = false
- Management.value.forEach((item: any, index: any) => {
- item.id = index + 1
- })
- $api
- .SaveLayout({
- management: Management.value
- })
- .then((res: any) => {
- if (res.code == 200) {
- ElMessage({
- message: res.data.msg,
- duration: 3000,
- type: 'success'
- })
- }
- })
- }
- //Save Filters
- const SaveFilters = () => {
- SaveVisible.value = false
- Management.value.forEach((item: any, index: any) => {
- item.id = index + 1
- })
- $api
- .SaveLayout({
- management: Management.value,
- dashboardObj
- })
- .then((res: any) => {
- if (res.code == 200) {
- ElMessage({
- message: res.data.msg,
- duration: 3000,
- type: 'success'
- })
- }
- })
- }
- //ETD to ETA(DAYS)点击跳转
- const pie_chart_ETD = ref()
- const pie_chart_pending_arrival = ref()
- const pie_chart_pending_departure = ref()
- const pie_chart_kpi_departure = ref()
- const pie_chart_kpi_arrival = ref()
- const seller_chart_top10_origin = ref()
- const seller_chart_top10_destination = ref()
- const seller_chart_CO2_origin = ref()
- const seller_chart_CO2_destination = ref()
- const startyear = ref()
- const startmonth = ref()
- const startday = ref()
- const endyear = ref()
- const endmonth = ref()
- const endday = ref()
- //处理跳转数据
- const handleTurnData = (startdate: any, enddata: any, name: any) => {
- if (name == 'Container') {
- if (startdate != '') {
- startmonth.value = startdate.split('/')[0]
- startyear.value = startdate.split('/')[1]
- }
- if (enddata != '') {
- endmonth.value = enddata.split('/')[0]
- endyear.value = enddata.split('/')[1]
- }
- } else {
- if (startdate != '') {
- startmonth.value = startdate.split('/')[0]
- startyear.value = startdate.split('/')[2]
- startday.value = startdate.split('/')[1]
- }
- if (enddata != '') {
- endmonth.value = enddata.split('/')[0]
- endyear.value = enddata.split('/')[2]
- endday.value = enddata.split('/')[1]
- }
- }
- }
- const ClickParams = (val: any) => {
- const currentDate = new Date()
- let tenyear = currentDate.getFullYear()
- let tenmonth = currentDate.getMonth() - 11
- if (tenmonth < 0) {
- tenyear -= 1
- tenmonth += 11
- }
- const reportList: any = {}
- const handlereportlist = (transportation: any, type: any, name: any) => {
- if (transportation.includes('All')) {
- reportList.transport_mode = ['All']
- } else {
- reportList.transport_mode = transportation
- }
- if (name == 'Container') {
- if (type == 'ETA') {
- if (startyear.value) {
- reportList.eta_start = startmonth.value + '/01/' + startyear.value
- reportList.eta_end =
- endmonth.value +
- '/' +
- new Date(endyear.value, endmonth.value, 0).getDate() +
- '/' +
- endyear.value
- }
- } else {
- if (startyear.value) {
- reportList.etd_start = startmonth.value + '/01/' + startyear.value
- reportList.etd_end =
- endmonth.value +
- '/' +
- new Date(endyear.value, endmonth.value, 0).getDate() +
- '/' +
- endyear.value
- }
- }
- } else {
- if (type == 'ETA') {
- if (startyear.value) {
- reportList.eta_start = startmonth.value + '/' + startday.value + '/' + startyear.value
- reportList.eta_end = endmonth.value + '/' + endday.value + '/' + endyear.value
- }
- } else {
- if (startyear.value) {
- reportList.etd_start = startmonth.value + '/' + startday.value + '/' + startyear.value
- reportList.etd_end = endmonth.value + '/' + endday.value + '/' + endyear.value
- }
- }
- }
- }
- // ETD to ETA(DAYS)点击跳转
- if (val == 'ETD to ETA (Days)') {
- handleTurnData(
- dashboardObj.ETDDefaultData.date_start,
- dashboardObj.ETDDefaultData.date_end,
- 'Container'
- )
- reportList._reportRef = pie_chart_ETD.value[0].paramsdata.name
- reportList._reportRefe_date = currentDate.getMonth() + 1 + '/' + currentDate.getFullYear()
- reportList._reportType = 'r1'
- reportList._reportRefb_date = tenmonth + '/' + tenyear
- handlereportlist(
- dashboardObj.ETDDefaultData.transportation,
- dashboardObj.ETDDefaultData.date_type,
- 'Container'
- )
- sessionStorage.setItem('clickParams', 'clickParams')
- sessionStorage.setItem('reportList', JSON.stringify(reportList))
- let obj: any = {}
- obj.title = 'ETD to ETA (Days)'
- obj.name = pie_chart_ETD.value[0].paramsdata.name
- sessionStorage.setItem('tagsList', JSON.stringify(obj))
- router.push({
- path: '/tracking'
- })
- }
- // PendingArrival点击跳转
- else if (val == 'Pending1') {
- handleTurnData('', '', '') // 因为Pending没有时间筛选,所以传空
- reportList._reportRef = pie_chart_pending_arrival.value[0].paramsdata.name
- reportList._reportType = 'r3'
- handlereportlist(
- dashboardObj.PendingDefaultData.transportation,
- dashboardObj.PendingDefaultData.date_type,
- ''
- )
- sessionStorage.setItem('clickParams', 'clickParams')
- sessionStorage.setItem('reportList', JSON.stringify(reportList))
- let obj: any = {}
- obj.title = 'Pending Arrival'
- obj.name = pie_chart_pending_arrival.value[0].paramsdata.name
- sessionStorage.setItem('tagsList', JSON.stringify(obj))
- router.push({
- path: '/tracking'
- })
- }
- // PendingDeparture点击跳转
- else if (val == 'Pending0') {
- handleTurnData('', '', '') // 因为Pending没有时间筛选,所以传空
- reportList._reportType = 'r4'
- reportList._reportRef = pie_chart_pending_departure.value[0].paramsdata.name
- handlereportlist(
- dashboardObj.PendingDefaultData.transportation,
- dashboardObj.PendingDefaultData.date_type,
- ''
- )
- sessionStorage.setItem('clickParams', 'clickParams')
- sessionStorage.setItem('reportList', JSON.stringify(reportList))
- let obj: any = {}
- obj.title = 'Pending Departure'
- obj.name = pie_chart_pending_departure.value[0].paramsdata.name
- sessionStorage.setItem('tagsList', JSON.stringify(obj))
- router.push({
- path: '/tracking'
- })
- }
- // KPIDeparture点击跳转
- else if (val == 'KPI0') {
- handleTurnData(
- dashboardObj.KPIDefaulteData.date_start,
- dashboardObj.KPIDefaulteData.date_end,
- ''
- )
- reportList._reportRef = pie_chart_kpi_departure.value[0].paramsdata.name
- reportList._reportType = 'atd_r4'
- handlereportlist(
- dashboardObj.KPIDefaulteData.transportation,
- dashboardObj.KPIDefaulteData.date_type,
- ''
- )
- sessionStorage.setItem('clickParams', 'clickParams')
- sessionStorage.setItem('reportList', JSON.stringify(reportList))
- let obj: any = {}
- obj.title = 'KPI Departure'
- obj.name = pie_chart_kpi_departure.value[0].paramsdata.name
- sessionStorage.setItem('tagsList', JSON.stringify(obj))
- router.push({
- path: '/tracking'
- })
- }
- // KPIArrival点击跳转
- else if (val == 'KPI1') {
- handleTurnData(
- dashboardObj.KPIDefaulteData.date_start,
- dashboardObj.KPIDefaulteData.date_end,
- ''
- )
- reportList._reportRef = pie_chart_kpi_arrival.value[0]?.paramsdata?.name || ''
- reportList._reportType = 'ata_r3'
- handlereportlist(
- dashboardObj.KPIDefaulteData.transportation,
- dashboardObj.KPIDefaulteData.date_type,
- ''
- )
- sessionStorage.setItem('clickParams', 'clickParams')
- sessionStorage.setItem('reportList', JSON.stringify(reportList))
- let obj: any = {}
- obj.title = 'KPI Arrival'
- obj.name = pie_chart_kpi_arrival.value[0]?.paramsdata?.name || ''
- sessionStorage.setItem('tagsList', JSON.stringify(obj))
- router.push({
- path: '/tracking'
- })
- }
- // Top10 origin点击跳转
- else if (val == 'Top 10 Origin') {
- handleTurnData(dashboardObj.Top10faultData.date_start, dashboardObj.Top10faultData.date_end, '')
- reportList._reportRef = seller_chart_top10_origin.value[0].paramsdata
- reportList._reportType = 'top'
- reportList._reportStationType = toporiginType.value
- reportList._city_name = seller_chart_top10_origin.value[0].paramscityname
- handlereportlist(
- dashboardObj.Top10faultData.transportation,
- dashboardObj.Top10faultData.date_type,
- ''
- )
- sessionStorage.setItem('clickParams', 'clickParams')
- sessionStorage.setItem('reportList', JSON.stringify(reportList))
- let obj: any = {}
- obj.title = 'Top 10 Origin'
- obj.name = seller_chart_top10_origin.value[0].paramsdata
- obj.data = seller_chart_top10_origin.value[0].paramscityname
- sessionStorage.setItem('tagsList', JSON.stringify(obj))
- router.push({
- path: '/tracking'
- })
- }
- // Top10 destination点击跳转
- else if (val == 'Top 10 Destination') {
- handleTurnData(dashboardObj.Top10faultData.date_start, dashboardObj.Top10faultData.date_end, '')
- reportList._reportRef = seller_chart_top10_destination.value[0].paramsdata
- reportList._reportStationType = topdestinationinType.value
- reportList._reportType = 'top'
- reportList._city_name = seller_chart_top10_destination.value[0].paramscityname
- handlereportlist(
- dashboardObj.Top10faultData.transportation,
- dashboardObj.Top10faultData.date_type,
- ''
- )
- sessionStorage.setItem('clickParams', 'clickParams')
- sessionStorage.setItem('reportList', JSON.stringify(reportList))
- let obj: any = {}
- obj.title = 'Top 10 Destination'
- obj.name = seller_chart_top10_destination.value[0].paramsdata
- obj.data = seller_chart_top10_destination.value[0].paramscityname
- sessionStorage.setItem('tagsList', JSON.stringify(obj))
- router.push({
- path: '/tracking'
- })
- }
- // CO2e Emission by Origin (Top 10)点击跳转
- else if (val == 'CO2e Emission by Origin (Top 10)') {
- handleTurnData(
- dashboardObj.OriginCo2Top10faultData.date_start,
- dashboardObj.OriginCo2Top10faultData.date_end,
- ''
- )
- reportList._reportRef = seller_chart_CO2_origin.value[0].paramsdata.name
- reportList._reportDataType = seller_chart_CO2_origin.value[0].paramsdata.type
- reportList._reportStationType = 'origin'
- reportList._reportType = 'co2e'
- handlereportlist(
- dashboardObj.OriginCo2Top10faultData.transportation,
- dashboardObj.OriginCo2Top10faultData.date_type,
- ''
- )
- sessionStorage.setItem('clickParams', 'clickParams')
- sessionStorage.setItem('reportList', JSON.stringify(reportList))
- let obj: any = {}
- obj.title = 'CO2e Emission by Origin (Top 10)'
- obj.name = seller_chart_CO2_origin.value[0].paramsdata.name
- sessionStorage.setItem('tagsList', JSON.stringify(obj))
- router.push({
- path: '/tracking'
- })
- }
- // CO2e Emission by Origin (Top 10)点击跳转
- else if (val == 'CO2e Emission by Destination (Top 10)') {
- handleTurnData(
- dashboardObj.DestinationCo2Top10faultData.date_start,
- dashboardObj.DestinationCo2Top10faultData.date_end,
- ''
- )
- reportList._reportRef = seller_chart_CO2_destination.value[0].paramsdata.name
- reportList._reportDataType = seller_chart_CO2_destination.value[0].paramsdata.type
- reportList._reportType = 'co2e'
- reportList._reportStationType = 'agent'
- handlereportlist(
- dashboardObj.DestinationCo2Top10faultData.transportation,
- dashboardObj.DestinationCo2Top10faultData.date_type,
- ''
- )
- sessionStorage.setItem('clickParams', 'clickParams')
- sessionStorage.setItem('reportList', JSON.stringify(reportList))
- let obj: any = {}
- obj.title = 'CO2e Emission by Destination (Top 10)'
- obj.name = seller_chart_CO2_destination.value[0].paramsdata.name
- sessionStorage.setItem('tagsList', JSON.stringify(obj))
- router.push({
- path: '/tracking'
- })
- }
- }
- import kpiChartTipLight from './tipsImage/kpi-chart-tip.png'
- import kpiChartTipDark from './tipsImage/dark-kpi-chart-tip.png'
- import pendingChartTipLight from './tipsImage/pending-chart-tip.png'
- import pendingChartTipDark from './tipsImage/dark-pending-chart-tip.png'
- import etdToEtaChartsTipLight from './tipsImage/etd-to-eta-chart-tip.png'
- import etdToEtaChartsTipDark from './tipsImage/dark-etd-to-eta-chart-tip.png'
- import containerChartTipLight from './tipsImage/container-count-chart-tip.png'
- import containerChartTipDark from './tipsImage/dark-container-count-chart-tip.png'
- import top10ChartTipLight from './tipsImage/top-10-chart-tip.png'
- import top10ChartTipDark from './tipsImage/dark-top-10-chart-tip.png'
- import co2eChartTipLight from './tipsImage/co2e-chart-tip.png'
- import co2eChartTipDark from './tipsImage/dark-co2e-chart-tip.png'
- import revenueSpentChartTipLight from './tipsImage/revenue-spent-chart-tip.png'
- import revenueSpentChartTipDark from './tipsImage/dark-revenue-spent-chart-tip.png'
- import recentStatusChartTipLight from './tipsImage/recent-status-chart-tip.png'
- import recentStatusChartTipDark from './tipsImage/dark-recent-status-chart-tip.png'
- const kpiChartTip = computed(() => {
- return themeStore.theme === 'dark' ? kpiChartTipDark : kpiChartTipLight
- })
- const pendingChartTip = computed(() => {
- return themeStore.theme === 'dark' ? pendingChartTipDark : pendingChartTipLight
- })
- const etdToEtaChartsTip = computed(() => {
- return themeStore.theme === 'dark' ? etdToEtaChartsTipDark : etdToEtaChartsTipLight
- })
- const containerChartTip = computed(() => {
- return themeStore.theme === 'dark' ? containerChartTipDark : containerChartTipLight
- })
- const top10ChartTip = computed(() => {
- return themeStore.theme === 'dark' ? top10ChartTipDark : top10ChartTipLight
- })
- const co2eChartTip = computed(() => {
- return themeStore.theme === 'dark' ? co2eChartTipDark : co2eChartTipLight
- })
- const revenueSpentChartTip = computed(() => {
- return themeStore.theme === 'dark' ? revenueSpentChartTipDark : revenueSpentChartTipLight
- })
- const recentStatusChartTip = computed(() => {
- return themeStore.theme === 'dark' ? recentStatusChartTipDark : recentStatusChartTipLight
- })
- import DashboardGuide from '../src/components/DashboardGuide.vue'
- import { useGuideStore } from '@/stores/modules/guide'
- import { useThemeStore } from '@/stores/modules/theme'
- import viewManagementLight from './guideImage/view-management.png'
- import viewManagementDark from './guideImage/dark-view-management.png'
- import saveConfigLight from './guideImage/save-config-guide.png'
- import saveConfigDark from './guideImage/dark-save-config-guide.png'
- import kpiChartLight from './guideImage/kpi-chart-guide.png'
- import kpiChartDark from './guideImage/dark-kpi-chart-guide.png'
- const themeStore = useThemeStore()
- const viewManagementImg = computed(() => {
- return themeStore.theme === 'dark' ? viewManagementDark : viewManagementLight
- })
- const saveConfigImg = computed(() => {
- return themeStore.theme === 'dark' ? saveConfigDark : saveConfigLight
- })
- const kpiChartImg = computed(() => {
- return themeStore.theme === 'dark' ? kpiChartDark : kpiChartLight
- })
- const guideStore = useGuideStore()
- const handleGuide = () => {
- dashboardGuideRef.value?.startGuide()
- }
- const dashboardGuideRef = ref(null)
- function handleImageClick(event) {
- event.stopPropagation() // 阻止事件冒泡
- alert('Image clicked')
- }
- </script>
- <template>
- <div class="dashboard">
- <!-- 评分 -->
- <ScoringSystem></ScoringSystem>
- <DashboardGuide ref="dashboardGuideRef"></DashboardGuide>
- <!-- Title -->
- <div class="Title">
- <div>
- <span>Dashboard</span>
- <VDriverGuide style="margin-top: -1px" @click="handleGuide"></VDriverGuide>
- </div>
- <div style="position: relative">
- <el-popover trigger="click" width="400" popper-style="border-radius: 12px">
- <template #reference>
- <el-button class="el-button--default">
- <span class="iconfont_icon">
- <svg class="iconfont" aria-hidden="true">
- <use xlink:href="#icon-icon_view__management_b"></use>
- </svg>
- </span>
- View Management
- </el-button>
- </template>
- <div class="Management">
- <div class="title">View Management</div>
- <div class="management_content" v-for="(item, index) in Management" :key="index">
- <div class="management_flex">
- <div class="content_title">{{ item.title }}</div>
- <div>
- <el-switch
- v-model="item.switchValue"
- :disabled="item.isRevenueDisplay != undefined && item.isRevenueDisplay == false"
- />
- </div>
- </div>
- <div class="content_text">{{ item.text }}</div>
- <div
- class="content_text_warining"
- v-if="item.isRevenueDisplay != undefined && item.isRevenueDisplay == false"
- >
- *To ensure the accuracy of the data display, this report needs to be configured and
- displayed after communicating clearly with Sales.
- </div>
- </div>
- <el-divider />
- <div class="tips">
- <span class="iconfont_icon">
- <svg class="iconfont iconfont_tips" aria-hidden="true">
- <use xlink:href="#icon-icon_info_b"></use>
- </svg>
- </span>
- <div class="tips_text">
- Please remember to click the save button in order to keep the new dashboard layout
- and widgets.
- </div>
- </div>
- </div>
- </el-popover>
- <img
- id="view-management-guide"
- v-if="guideStore.dashboard.isShowViewManagementGuidePhoto"
- class="view-management-guide-class"
- :class="{
- 'view-management-guide-dark-class': themeStore.theme === 'dark'
- }"
- :src="viewManagementImg"
- alt=""
- />
- <el-popover
- :visible="SaveVisible"
- :popper-style="{
- display: 'flex',
- flexDirection: 'column',
- alignItems: 'center',
- backgroundColor: 'var(--management-bg-color)'
- }"
- >
- <template #reference>
- <el-button
- class="el-button--default"
- @blur="SaveVisible = false"
- @click="SaveVisible = !SaveVisible"
- >
- <span class="iconfont_icon">
- <svg class="iconfont" aria-hidden="true">
- <use xlink:href="#icon-icon_save_b"></use>
- </svg>
- </span>
- Save
- <span class="iconfont_icon">
- <svg class="iconfont" aria-hidden="true">
- <use xlink:href="#icon-icon_dropdown_b"></use>
- </svg>
- </span>
- </el-button>
- </template>
- <div class="Save_filters" @click="SaveFilters">
- <span class="iconfont_icon iconfont_icon_save">
- <svg class="iconfont" aria-hidden="true">
- <use xlink:href="#icon-icon_save_b"></use>
- </svg>
- </span>
- <div>Save Filters</div>
- </div>
- <div class="Save_filters" @click="SaveLayout">
- <span class="iconfont_icon iconfont_icon_save">
- <svg class="iconfont" aria-hidden="true">
- <use xlink:href="#icon-icon_save_b"></use>
- </svg>
- </span>
- <div>Save Layout</div>
- </div>
- </el-popover>
- <!-- -->
- <img
- id="save-config-guide"
- v-if="guideStore.dashboard.isShowSaveConfigGuidePhoto"
- class="save-config-guide-class position-absolute-guide"
- :src="saveConfigImg"
- :class="{
- 'save-config-guide-dark-class': themeStore.theme === 'dark'
- }"
- alt=""
- />
- </div>
- </div>
- <!-- 图表 -->
- <div class="echarts">
- <VueDraggable
- style="
- display: flex;
- flex-wrap: wrap;
- justify-content: space-between;
- gap: 8px;
- width: 100%;
- "
- ref="infoContentRef"
- ghost-class="ghost-class"
- :forceFallback="true"
- fallback-class="fallback-class"
- v-model="Management"
- handle=".handle-draggable"
- >
- <template v-for="item in Management" :key="item">
- <div v-if="item.title === 'KPI' && item.switchValue" class="filters_left">
- <!-- KPI -->
- <VBox_Dashboard
- style="overflow: visible"
- @changeCancel="changeCancel(item.id)"
- :isShowDragIconGudie="true"
- >
- <template #header>
- <div class="Title_flex" style="position: relative">
- <img
- id="kpi-chart-guide"
- v-if="guideStore.dashboard.isShowKpiChartGuidePhoto"
- class="kpi-chart-guide-class position-absolute-guide"
- :src="kpiChartImg"
- alt=""
- />
- <div>
- {{ item.title }}
- <VTipTooltip
- :img="kpiChartTip"
- :width="410"
- :label="'KPI Report:Day difference between actual and estimate.'"
- placement="bottom-start"
- ></VTipTooltip>
- </div>
- <DashFilters
- :defaultData="KPIDefaulteData"
- :isShowTransportModeGuide="true"
- @FilterSearch="GetKpiData"
- ></DashFilters>
- <!-- <el-tooltip
- effect="dark"
- :offset="6"
- :content="item.text"
- placement="bottom-start"
- >
- <span class="iconfont_icon iconfont_icon_tip">
- <svg class="iconfont" aria-hidden="true">
- <use xlink:href="#icon-icon_info_b"></use>
- </svg>
- </span>
- </el-tooltip> -->
- </div>
- </template>
- <template #content>
- <div class="KPI_Pending">
- <div class="kpi">
- <PieChart
- ref="pie_chart_kpi_departure"
- @ClickParams="ClickParams(item.title + '0')"
- :PieData="KPIobj"
- v-vloading="KPILoading"
- style="height: 300px"
- ></PieChart>
- </div>
- <div class="kpi">
- <PieChart
- ref="pie_chart_kpi_arrival"
- :PieData="Arrivalobj"
- v-vloading="KPIArrivalLoading"
- @ClickParams="ClickParams(item.title + '1')"
- style="height: 300px"
- ></PieChart>
- </div>
- </div>
- </template>
- </VBox_Dashboard>
- </div>
- <div v-else-if="item.title === 'Pending' && item.switchValue" class="filters_left">
- <!-- Pending -->
- <VBox_Dashboard @changeCancel="changeCancel(item.id)">
- <template #header>
- <div class="Title_flex">
- <div>
- {{ item.title }}
- <VTipTooltip
- :img="pendingChartTip"
- :width="420"
- :placement="'bottom-start'"
- :label="'Pending Report:Showing shipments which are soon to depart/arrive.'"
- ></VTipTooltip>
- </div>
- <DashFilters
- :defaultData="PendingDefaulteData"
- :radioisDisabled="true"
- :img="'./image/kpi-chart-tip.png'"
- @FilterSearch="GetPendingEcharts"
- ></DashFilters>
- </div>
- </template>
- <template #content>
- <div class="KPI_Pending">
- <div class="kpi">
- <PieChart
- ref="pie_chart_pending_departure"
- :PieData="Pendingobj"
- v-vloading="PendingLoading"
- @ClickParams="ClickParams(item.title + '0')"
- style="height: 300px"
- ></PieChart>
- </div>
- <div class="kpi">
- <PieChart
- ref="pie_chart_pending_arrival"
- @ClickParams="ClickParams(item.title + '1')"
- :PieData="PendingArrivalobj"
- v-vloading="PendingArrivalLoading"
- style="height: 300px"
- ></PieChart>
- </div>
- </div>
- </template>
- </VBox_Dashboard>
- </div>
- <!-- ETD to ETA -->
- <div
- v-else-if="item.title === 'ETD to ETA (Days)' && item.switchValue"
- class="filters_left"
- >
- <VBox_Dashboard @changeCancel="changeCancel(item.id)">
- <template #header>
- <div class="Title_flex">
- <div>
- {{ item.title }}
- <VTipTooltip
- :img="etdToEtaChartsTip"
- :width="430"
- :placement="'bottom-start'"
- :label="'ETD to ETA (Days):Distribution of Transit Time (ETA-ETD) for All Shipments in Last 12 Months.'"
- ></VTipTooltip>
- </div>
- <DashFilters
- :defaultData="ETDDefaulteData"
- @FilterSearch="GetETDEcharts"
- :isETDToETA="true"
- :isContainer="true"
- ></DashFilters>
- </div>
- </template>
- <template #content>
- <PieChart
- ref="pie_chart_ETD"
- @ClickParams="ClickParams(item.title)"
- :PieData="ETDobj"
- v-vloading="ETDLoading"
- style="height: 300px"
- ></PieChart>
- </template>
- </VBox_Dashboard>
- </div>
- <!-- Container Count -->
- <div
- v-else-if="item.title === 'Container Count' && item.switchValue"
- class="filters_left"
- >
- <VBox_Dashboard @changeCancel="changeCancel(item.id)">
- <template #header>
- <div class="Title_flex">
- <div>
- {{ item.title }}
- <VTipTooltip
- :img="containerChartTip"
- :placement="'bottom-start'"
- :label="'Container Count:Total Container Volume by Month (Last 12 Months)'"
- ></VTipTooltip>
- </div>
- <DashFilters
- :defaultData="ContainerefaultData"
- @FilterSearch="GetContainerCountEcharts"
- :isContainer="true"
- ></DashFilters>
- </div>
- </template>
- <template #content>
- <BarChart
- ref="seller_chart_Container_count"
- :BarData="containerObj"
- v-vloading="containerLoading"
- style="height: 300px"
- :isRevenue="true"
- save-image-name="Container Count"
- :barHeight="{ height: '300px' }"
- ></BarChart>
- </template>
- </VBox_Dashboard>
- </div>
- <!-- Top10 Origin/Top 10 Destination -->
- <div
- v-else-if="item.title === 'Top 10 Origin/Destination' && item.switchValue"
- class="KPI_Pending"
- >
- <VBox_Dashboard @changeCancel="changeCancel(item.id)" style="width: 100%">
- <template #header>
- <div class="Title_flex" style="height: 48px">
- <div style="display: flex">
- <el-tabs
- v-model="activeName"
- class="demo-tabs"
- style="height: 48px"
- @tab-click="handleTabClick"
- >
- <el-tab-pane :label="item.title1" name="first"></el-tab-pane>
- <el-tab-pane :label="item.title2" name="second"></el-tab-pane>
- </el-tabs>
- <VTipTooltip
- style="margin-left: 4px"
- :img="top10ChartTip"
- :label="'Top 10 Origin & Destination: Last 12 Months Shipment Volume Rankings: Top 10 Origin Cities and Top 10 Destination Cities'"
- :width="700"
- ></VTipTooltip>
- </div>
- <DashFilters
- :defaultData="Top10DefaultData"
- @FilterSearch="GetTop10ODEcharts"
- ></DashFilters>
- </div>
- </template>
- <template v-if="isShowtitle1" #content>
- <div class="KPI_Pending">
- <div class="seller_chart">
- <SellerChart
- ref="seller_chart_top10_origin"
- @clickParams="ClickParams(item.title1)"
- :SellerData="Top10Obj.OriginData"
- v-vloading="TopOriginLoading"
- :Interval="Top1OInterval"
- saveImageName="Top 10 Origin"
- ></SellerChart>
- </div>
- <div class="map">
- <!-- <TopMap :obj="dashboardObj.Top10faultData" ref="Top10Originref"></TopMap> -->
- <TopMap ref="Top10Originref"></TopMap>
- </div>
- </div>
- </template>
- <template v-else #content2>
- <div class="KPI_Pending">
- <div class="seller_chart">
- <SellerChart
- ref="seller_chart_top10_destination"
- @clickParams="ClickParams(item.title2)"
- :SellerData="Top10Obj.DestinationData"
- :Interval="Top1OInterval_dest"
- v-vloading="TopOriginLoading"
- saveImageName="Top 10 Destination"
- style="height: 272px"
- ></SellerChart>
- </div>
- <div class="map" style="height: 272px">
- <!-- <TopMap :obj="dashboardObj.Top10faultData" ref="Top10Destinationref"></TopMap> -->
- <TopMap ref="Top10Destinationref"></TopMap>
- </div>
- </div>
- </template>
- </VBox_Dashboard>
- </div>
- <!-- CO2e Emission by Origin (Top 10) -->
- <div
- v-else-if="item.title === 'CO2e Emission by Origin (Top 10)' && item.switchValue"
- class="filters_left"
- >
- <VBox_Dashboard @changeCancel="changeCancel(item.id)">
- <template #header>
- <div class="Title_flex">
- <div>
- {{ item.title }}
- <VTipTooltip
- :img="co2eChartTip"
- :label="'CO2e Emission by Origin or Destination: Last 12 Months CO2e Emission Rankings: Top 10 Origin Cities and Top 10 Destination Cities'"
- :width="700"
- :placement="'bottom-start'"
- ></VTipTooltip>
- </div>
- <DashFilters
- :defaultData="Co2OriginDefaultData"
- @FilterSearch="GetCo2EmissionEcharts"
- ></DashFilters>
- </div>
- </template>
- <template #content>
- <BarChart
- ref="seller_chart_CO2_origin"
- :BarData="EmissionObj"
- save-image-name="CO2e Emission by Origin (Top 10)"
- @clickParams="ClickParams(item.title)"
- v-vloading="EmissionLoading"
- style="height: 250px"
- :isRevenue="true"
- :barHeight="{ height: '250px' }"
- ></BarChart>
- </template>
- </VBox_Dashboard>
- </div>
- <!-- CO2e Emission by Destination (Top 10) -->
- <div
- v-else-if="item.title === 'CO2e Emission by Destination (Top 10)' && item.switchValue"
- class="filters_left"
- >
- <VBox_Dashboard @changeCancel="changeCancel(item.id)">
- <template #header>
- <div class="Title_flex">
- <div>
- {{ item.title }}
- <!-- <VTipTooltip :img="co2eChartTip"></VTipTooltip> -->
- </div>
- <DashFilters
- :defaultData="Co2DestinationDefaultData"
- @FilterSearch="GetCo2DestinationEcharts"
- ></DashFilters>
- </div>
- </template>
- <template #content>
- <BarChart
- ref="seller_chart_CO2_destination"
- :BarData="DestinationObj"
- v-vloading="DestinationLoading"
- style="height: 250px"
- :isRevenue="true"
- save-image-name="CO2e Emission by Destination (Top 10)"
- @clickParams="ClickParams(item.title)"
- :barHeight="{ height: '250px' }"
- ></BarChart>
- </template>
- </VBox_Dashboard>
- </div>
- <!-- <div
- v-else-if="item.title === 'Revenue' && item.switchValue"
- class="KPI_Pending"
- > -->
- <div
- v-else-if="
- item.title === 'Recent Status' && item.switchValue && RecentStatusList.length != 0
- "
- class="KPI_Pending"
- >
- <!-- Recent Status -->
- <VBox_Dashboard @changeCancel="changeCancel(item.id)" style="width: 100%">
- <template #header>
- <div class="Title_flex">
- <div>
- {{ item.title }}
- <VTipTooltip
- :img="recentStatusChartTip"
- :label="'Recent Status: Active shipment list with ETD within the past three months and the next month.'"
- :width="700"
- :placement="'bottom-start'"
- ></VTipTooltip>
- </div>
- <DashFilters
- :defaultData="RecentDefaulteData"
- @FilterSearch="getTableData"
- :isRecent="true"
- ></DashFilters>
- </div>
- </template>
- <template #content>
- <RecentStatus :RecentStatusList="RecentStatusList"></RecentStatus>
- <div class="pagination">
- <span>Total {{ formatNumber(pageInfo.total) }}</span>
- <el-pagination
- v-model:current-page="pageInfo.pageNo"
- v-model:page-size="pageInfo.pageSize"
- :page-sizes="[10, 50, 100, 200]"
- layout="prev, pager, next"
- :pager-count="3"
- :total="pageInfo.total"
- @size-change="getTableData(true, RecentDefaulteData)"
- @current-change="getTableData(true, RecentDefaulteData)"
- />
- </div>
- </template>
- </VBox_Dashboard>
- </div>
- <!-- Revenue -->
- <div v-else-if="item.title === 'Revenue Spent' && item.switchValue" class="KPI_Pending">
- <VBox_Dashboard @changeCancel="changeCancel(item.id)" style="width: 100%">
- <template #header>
- <div class="Title_flex">
- <div>
- Revenue Spent
- <VTipTooltip
- :img="revenueSpentChartTip"
- :label="'Revenue Spent: Based on the billto object, display the corresponding revenue data. '"
- :placement="'bottom-start'"
- :width="700"
- ></VTipTooltip>
- </div>
- <DashFilters
- :defaultData="RevenueDefaultData"
- @FilterSearch="GetRevenueEcharts"
- :isRevenue="true"
- :isContainer="true"
- ></DashFilters>
- </div>
- </template>
- <template #content>
- <RevenueChart
- :BarData="RevenueObj"
- v-vloading="RevenueLoading"
- :RevenueStartDate="revenue_date_start"
- :RevenueEndDate="revenue_date_end"
- style="height: 300px"
- :barHeight="{ height: '300px' }"
- ></RevenueChart>
- </template>
- </VBox_Dashboard>
- </div>
- </template>
- </VueDraggable>
- </div>
- </div>
- </template>
- <style lang="scss" scoped>
- .Title {
- display: flex;
- background-color: var(--color-mode);
- height: 68px;
- font-size: var(--font-size-6);
- font-weight: 700;
- padding: 0 24px;
- align-items: center;
- justify-content: space-between;
- }
- .iconfont {
- vertical-align: -2px;
- }
- .view-management-guide-class {
- position: absolute;
- top: 0px;
- right: 85px;
- width: 437px;
- height: 603px;
- z-index: 1500;
- &.view-management-guide-dark-class {
- width: 439px;
- height: 622px;
- }
- }
- .save-config-guide-class {
- position: absolute;
- top: -1px;
- right: -13px;
- width: 183px;
- height: 160px;
- z-index: 1500;
- transform: translate(-0.8px, 0px);
- &.save-config-guide-dark-class {
- width: 182px;
- height: 157px;
- right: -12px;
- }
- }
- .kpi-chart-guide-class {
- top: -2px;
- left: -50px;
- width: 589px;
- height: 478px;
- z-index: 3500;
- }
- .Management {
- max-height: 640px;
- overflow-y: hidden;
- border-radius: 12px;
- background-color: var(--management-bg-color);
- }
- .Management:hover {
- overflow-y: scroll;
- }
- .title {
- font-weight: 700;
- font-size: var(--font-size-5);
- background-color: var(--color-header-bg);
- height: 48px;
- display: flex;
- align-items: center;
- padding-left: 16px;
- }
- .management_content {
- width: 368px;
- min-height: 54px;
- margin: 10px auto;
- background-color: var(--color-header-bg);
- border-radius: var(--border-radius-6);
- padding: 8px 16px;
- }
- .management_flex {
- display: flex;
- height: 20px;
- justify-content: space-between;
- align-items: center;
- }
- .content_title {
- font-weight: 700;
- font-size: var(--font-size-3);
- }
- .content_text {
- color: var(--color-neutral-2);
- font-size: var(--font-size-2);
- line-height: 16px;
- }
- .content_text_warining {
- color: var(--color-warning);
- font-size: var(--font-size-2);
- line-height: 16px;
- }
- .tips {
- display: flex;
- justify-content: center;
- padding-bottom: 8px;
- }
- .iconfont_tips {
- fill: var(--color-neutral-2);
- }
- .tips_text {
- width: 278.43px;
- text-align: center;
- font-size: var(--font-size-2);
- color: var(--color-neutral-2);
- }
- .el-divider--horizontal {
- margin: 8px 0;
- }
- .Save_filters {
- display: flex;
- align-items: center;
- justify-content: center;
- height: 40px;
- font-size: var(--font-size-3);
- width: 126px;
- margin: 4px 0;
- cursor: pointer;
- }
- .iconfont_icon_save {
- margin-right: 16px;
- fill: var(--color-neutral-1);
- }
- .Save_filters:hover {
- border-color: var(--color-btn-default-bg-hover);
- background-color: var(--color-btn-default-bg-hover);
- .iconfont_icon_save {
- fill: var(--color-theme);
- }
- div {
- color: var(--color-theme);
- }
- }
- .filters {
- display: flex;
- padding: 0 24px;
- height: 32px;
- align-items: center;
- margin-bottom: 8px;
- justify-content: space-between;
- }
- .KPI_Pending {
- display: flex;
- width: 100%;
- }
- .filters_left {
- border-radius: var(--border-radius-6);
- width: calc(50% - 4px);
- flex: 0 0 calc(50% - 4px);
- min-width: 0;
- box-sizing: border-box;
- }
- .KPI_title {
- border-bottom: 1px solid var(--color-border);
- height: 48px;
- line-height: 48px;
- align-items: center;
- justify-content: space-between;
- display: flex;
- padding-left: 16px;
- font-weight: 700;
- font-size: var(--font-size-5);
- }
- .tips_filter {
- margin-right: 8px;
- height: 32px;
- }
- .filters_right {
- width: 251px;
- height: 32px;
- margin-bottom: 8px;
- }
- :deep(.ETD_title) {
- margin-bottom: 0 !important;
- }
- :deep(:where(.css-dev-only-do-not-override-19iuou).ant-picker-range) {
- height: 32px;
- }
- .echarts {
- padding: 0 22px;
- background-color: var(--color-mode);
- :deep(> div) {
- display: flex;
- flex-wrap: wrap;
- justify-content: space-between;
- gap: 8px;
- width: 100%;
- > * {
- box-sizing: border-box;
- }
- }
- }
- .kpi {
- width: 50%;
- border-right: 1px solid var(--color-border);
- }
- .kpi:last-child {
- border-right: none;
- }
- .ghost-class {
- opacity: 0;
- }
- .fallback-class {
- opacity: 1 !important;
- background-color: #fff;
- cursor: move !important;
- box-shadow: 4px 4px 32px 0px rgba(0, 0, 0, 0.2);
- border-radius: 12px;
- }
- .pagination {
- display: flex;
- justify-content: space-between;
- align-items: center;
- border-top: 1px solid var(--color-border);
- padding: 4px 8px;
- }
- .container-type {
- font-size: 14px;
- font-weight: 400;
- margin-right: 4px;
- }
- .seller_chart {
- width: 30%;
- border-right: 1px solid var(--color-border);
- }
- .map {
- width: 70%;
- }
- .Title_flex {
- display: flex;
- align-items: center;
- justify-content: space-between;
- margin-right: 30px;
- }
- .iconfont_icon_tip {
- margin-left: 8px;
- width: 16px;
- height: 16px;
- display: flex;
- align-items: center;
- }
- .dashboard {
- z-index: 2014;
- position: relative;
- background-color: var(--color-mode);
- padding-bottom: 40px;
- }
- :deep(.el-tabs__header) {
- height: 48px;
- margin-bottom: 0;
- }
- </style>
- <style lang="scss">
- :not(body):has(> img.driver-active-element) {
- overflow: visible !important;
- }
- </style>
|