| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239 |
- import { initData } from "@/common/methods";
- import { getToken } from "@/services/bus/token";
- import { OperationTabMenuAuth } from '@/services/go/commonService/interface';
- import { serviceURL } from "@/services/request";
- import { ref } from 'vue';
- import { useRoute } from 'vue-router';
- const iframeCode: { code: string, tabIndex: number }[] = [
- {
- code: 'goods_spot', // 基础设置-商品设置-现货品种
- tabIndex: 1,
- },
- {
- code: 'goods_hedge', // 基础设置-商品设置-套保品种
- tabIndex: 2,
- },
- {
- code: 'company_normal', // 基础设置-主体设置-正常
- tabIndex: 1,
- },
- {
- code: 'company_disabled', // 基础设置-主体设置-停用
- tabIndex: 2,
- },
- {
- code: 'futures_spot_finish', // 现货套保-期现关联-外部成交单关联
- tabIndex: 1,
- },
- {
- code: 'futures_spot_order', // 现货套保-期现关联-期现单据关联
- tabIndex: 2,
- },
- {
- code: 'futures_spot_record', // 现货套保-期现关联-关联记录
- tabIndex: 3,
- },
- {
- code: 'hedge_ratio_checkpending', // 风管审核-套保比例审核-待审核
- tabIndex: 1,
- },
- {
- code: 'hedge_ratio_performance', // 风管审核-套保比例审核-已审核
- tabIndex: 2,
- },
- {
- code: 'spot_params_checkpending', // 风管审核-现货参数审核-待审核
- tabIndex: 1,
- },
- {
- code: 'spot_params_performance', // 风管审核-现货参数审核-已审核
- tabIndex: 2,
- },
- {
- code: 'price_report_spot', // 统计报表-定价报表
- tabIndex: 1,
- },
- {
- code: 'platinum_capital_flow_tab', // 铂金宝-积分流水
- tabIndex: 1,
- },
- {
- code: 'platinum_promotion_report_tab', // 铂金宝-推广报表
- tabIndex: 1,
- },
- {
- code: 'platinum_broker_management_normal', // 铂金宝-经纪人管理-正常
- tabIndex: 1,
- },
- {
- code: 'platinum_broker_management_waiting', // 铂金宝-经纪人管理-待审核
- tabIndex: 2,
- },
- {
- code: 'platinum_broker_management_refuse', // 铂金宝-经纪人管理-审核拒绝
- tabIndex: 3,
- },
- {
- code: 'platinum_signing_settings_tab', // 铂金宝-签单设置
- tabIndex: 1,
- },
- {
- code: 'platinum_team_settings_tab', // 铂金宝-团队设置
- tabIndex: 1,
- },
- {
- code: 'platinum_asset_management_signing_unsubmitted', // 铂金宝-资管签订-未提交
- tabIndex: 1,
- },
- {
- code: 'platinum_asset_management_signing_pending_review', // 铂金宝-资管签订-待审核
- tabIndex: 2,
- },
- {
- code: 'platinum_asset_management_signing_normal', // 铂金宝-资管签订-正常
- tabIndex: 3,
- },
- {
- code: 'platinum_asset_management_signing_finish', // 铂金宝-资管签订-已完成
- tabIndex: 4,
- },
- {
- code: 'platinum_asset_management_signing_all', // 铂金宝-资管签订-全部
- tabIndex: 5,
- },
- {
- code: 'platinum_precious_metal_signing_unsubmitted', // 铂金宝-贵金属签订-未提交
- tabIndex: 1,
- },
- {
- code: 'platinum_precious_metal_signing_pending_review', // 铂金宝-贵金属签订-待审核
- tabIndex: 2,
- },
- {
- code: 'platinum_precious_metal_signing_repurchase_pending_review', // 铂金宝-贵金属签订-回购待审核
- tabIndex: 3,
- },
- {
- code: 'platinum_precious_metal_signing_normal', // 铂金宝-贵金属签订-正常
- tabIndex: 4,
- },
- {
- code: 'platinum_precious_metal_signing_success', // 铂金宝-贵金属签订-已完成
- tabIndex: 5,
- },
- {
- code: 'platinum_precious_metal_signing_refunded', // 铂金宝-贵金属签订-已退单
- tabIndex: 6,
- },
- {
- code: 'platinum_precious_metal_signing_all', // 铂金宝-贵金属签订-全部
- tabIndex: 7,
- },
- {
- code: 'platinum_financial_payment_waiting_payment_tab', // 铂金宝-财务付款-待转账
- tabIndex: 1,
- },
- {
- code: 'platinum_financial_payment_in_waiting_payment_tab', // 铂金宝-财务付款-内部待转账
- tabIndex: 2,
- },
- {
- code: 'platinum_financial_payment_waiting_payment_cash_tab', // 铂金宝-财务付款-待付现金
- tabIndex: 3,
- },
- {
- code: 'platinum_financial_payment_payment_tab', // 铂金宝-财务付款-已付款
- tabIndex: 4,
- },
- {
- code: 'platinum_financial_payment_all_tab', // 铂金宝-财务付款-全部
- tabIndex: 5,
- },
- {
- code: 'platinum_account_manager_tab', // 铂金宝-客户经理
- tabIndex: 1,
- },
- {
- code: 'platinum_precious_metal_sales_report_company_tab', // 铂金宝-贵金属销售报表-公司销售(日报)
- tabIndex: 1,
- },
- {
- code: 'platinum_precious_metal_sales_report_departmental_tab', // 铂金宝-贵金属销售报表-部门销售
- tabIndex: 2,
- },
- {
- code: 'platinum_asset_management_sale_report_company_day_tab', // 铂金宝-资管销售报表-公司销售(日报)
- tabIndex: 1,
- },
- {
- code: 'platinum_asset_management_sale_report_company_week_tab', // 铂金宝-资管销售报表-公司销售(周报)
- tabIndex: 2,
- },
- {
- code: 'platinum_asset_management_sale_report_company_month_tab', // 铂金宝-资管销售报表-公司销售(月报)
- tabIndex: 3,
- },
- {
- code: 'platinum_precious_metal_sales_report_departmental_week_tab', // 铂金宝-资管销售报表-部门销售(周报)
- tabIndex: 4,
- },
- {
- code: 'platinum_precious_metal_sales_report_departmental_month_tab', // 铂金宝-资管销售报表-部门销售(月报)
- tabIndex: 5,
- },
- {
- code: 'platinum_precious_metal_sales_report_product_month_tab', // 铂金宝-资管销售报表-产品销售(月报)
- tabIndex: 6,
- },
- {
- code: 'platinum_customer_service_report_reach_rate_report_tab', // 铂金宝-客服报表-达成率报表
- tabIndex: 1,
- },
- {
- code: 'platinum_customer_service_report_team_annualized_performance_ranking_report_tab', // 铂金宝-客服报表-团队年化业绩排行报表
- tabIndex: 2,
- },
- {
- code: 'platinum_customer_service_report_personal_annualized_performance_ranking_report_tab', // 铂金宝-客服报表-个人年化业绩排行报表
- tabIndex: 3,
- },
- {
- code: 'platinum_customer_service_report_team_manager_annual_performance_ranking_report_tab', // 铂金宝-客服报表-团队经理年化业绩排行报表
- tabIndex: 4,
- },
- {
- code: 'platinum_salesman_performance_report_tab', // 铂金宝-业务员业绩报表
- tabIndex: 1,
- },
- ]
- /**
- * 获取管理端url
- */
- export function getIframeUrl() {
- const route = useRoute();
- const url = ref('');
- const getUrl = () => {
- // 管理端地址
- const serviceUrl = serviceURL.pcMangerUrl + route.meta.url;
- // 根据当前路由 name(code) 查找出对应的 iframeCode
- const item = iframeCode.find((item) => item.code === route.name);
- if (item) {
- const auth = route.meta.auth as OperationTabMenuAuth[];
- const param = auth.reduce((res, item) => res + `:${item.code}`, '');
- url.value = `${serviceUrl}?token=${getToken()}&tabindex=${item.tabIndex}&resourcepcmenu=${param}`;
- }
- }
- initData(() => {
- getUrl();
- })
- return {
- url
- }
- }
|