修改菜单切换问题
Showing
6 changed files
with
58 additions
and
18 deletions
| ... | @@ -72,3 +72,9 @@ export const distributeContract = (params) => request({ | ... | @@ -72,3 +72,9 @@ export const distributeContract = (params) => request({ |
| 72 | method: 'post', | 72 | method: 'post', |
| 73 | data: params | 73 | data: params |
| 74 | }) | 74 | }) |
| 75 | |||
| 76 | /** 获取数据使用对应的策略信息 */ | ||
| 77 | export const getContractStrategy = (useGuid ) => request({ | ||
| 78 | url: `${import.meta.env.VITE_APP_DIGITAL_CONTRACT_URL}/contract-use/get-policy?useGuid=${useGuid}`, | ||
| 79 | method: 'get' | ||
| 80 | }); | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -5,7 +5,7 @@ function Layout() { | ... | @@ -5,7 +5,7 @@ function Layout() { |
| 5 | 5 | ||
| 6 | const routes: RouteRecordRaw[] = [ | 6 | const routes: RouteRecordRaw[] = [ |
| 7 | { | 7 | { |
| 8 | path: '/data-asset/data-delivery', | 8 | path: '/data-delivery/delivery-manage', |
| 9 | component: Layout, | 9 | component: Layout, |
| 10 | meta: { | 10 | meta: { |
| 11 | title: '数据交付', | 11 | title: '数据交付', |
| ... | @@ -26,7 +26,7 @@ const routes: RouteRecordRaw[] = [ | ... | @@ -26,7 +26,7 @@ const routes: RouteRecordRaw[] = [ |
| 26 | ], | 26 | ], |
| 27 | }, | 27 | }, |
| 28 | { | 28 | { |
| 29 | path: '/data-asset/data-usage', | 29 | path: '/data-use/usage-manage', |
| 30 | component: Layout, | 30 | component: Layout, |
| 31 | meta: { | 31 | meta: { |
| 32 | title: '数据使用', | 32 | title: '数据使用', |
| ... | @@ -80,11 +80,16 @@ const routes: RouteRecordRaw[] = [ | ... | @@ -80,11 +80,16 @@ const routes: RouteRecordRaw[] = [ |
| 80 | name: 'usageApiDetail', | 80 | name: 'usageApiDetail', |
| 81 | component: () => import('@/views/data_service/detail_serviceApi.vue'), | 81 | component: () => import('@/views/data_service/detail_serviceApi.vue'), |
| 82 | meta: { | 82 | meta: { |
| 83 | title: '详情-', | 83 | title: 'API详情-', |
| 84 | sidebar: false, | 84 | sidebar: false, |
| 85 | breadcrumb: false, | 85 | breadcrumb: false, |
| 86 | cache: true, | 86 | cache: true, |
| 87 | reuse: true | 87 | reuse: true |
| 88 | }, | ||
| 89 | beforeEnter: (to, from) => { | ||
| 90 | if (to.query.guid) { | ||
| 91 | to.meta.title = `API详情-${to.query.apiName}`; | ||
| 92 | } | ||
| 88 | } | 93 | } |
| 89 | }, | 94 | }, |
| 90 | { | 95 | { | ... | ... |
| ... | @@ -4,7 +4,7 @@ function Layout() { | ... | @@ -4,7 +4,7 @@ function Layout() { |
| 4 | } | 4 | } |
| 5 | const routes: RouteRecordRaw[] = [ | 5 | const routes: RouteRecordRaw[] = [ |
| 6 | { | 6 | { |
| 7 | path: '/data-smart-contract/strategy-management', | 7 | path: '/data-smart-contract-common/strategy-management', |
| 8 | component: Layout, | 8 | component: Layout, |
| 9 | meta: { | 9 | meta: { |
| 10 | title: '策略管理', | 10 | title: '策略管理', |
| ... | @@ -24,7 +24,7 @@ const routes: RouteRecordRaw[] = [ | ... | @@ -24,7 +24,7 @@ const routes: RouteRecordRaw[] = [ |
| 24 | }] | 24 | }] |
| 25 | }, | 25 | }, |
| 26 | { | 26 | { |
| 27 | path: '/data-smart-contract/contract-template', | 27 | path: '/data-smart-contract-common/contract-template', |
| 28 | component: Layout, | 28 | component: Layout, |
| 29 | meta: { | 29 | meta: { |
| 30 | title: '合约模板', | 30 | title: '合约模板', |
| ... | @@ -138,7 +138,7 @@ const routes: RouteRecordRaw[] = [ | ... | @@ -138,7 +138,7 @@ const routes: RouteRecordRaw[] = [ |
| 138 | }] | 138 | }] |
| 139 | }, | 139 | }, |
| 140 | { | 140 | { |
| 141 | path: '/data-smart-contract/contract-log-manage', | 141 | path: '/data-smart-contract-common/contract-log-manage', |
| 142 | component: Layout, | 142 | component: Layout, |
| 143 | meta: { | 143 | meta: { |
| 144 | title: '合约日志管理', | 144 | title: '合约日志管理', |
| ... | @@ -158,7 +158,7 @@ const routes: RouteRecordRaw[] = [ | ... | @@ -158,7 +158,7 @@ const routes: RouteRecordRaw[] = [ |
| 158 | }] | 158 | }] |
| 159 | }, | 159 | }, |
| 160 | { | 160 | { |
| 161 | path: '/data-smart-contract/exec-cnt-index', | 161 | path: '/data-smart-contract-common/exec-cnt-index', |
| 162 | component: Layout, | 162 | component: Layout, |
| 163 | meta: { | 163 | meta: { |
| 164 | title: '合约履行监测', | 164 | title: '合约履行监测', |
| ... | @@ -178,7 +178,7 @@ const routes: RouteRecordRaw[] = [ | ... | @@ -178,7 +178,7 @@ const routes: RouteRecordRaw[] = [ |
| 178 | }] | 178 | }] |
| 179 | }, | 179 | }, |
| 180 | { | 180 | { |
| 181 | path: '/data-smart-contract/action-log-manage', | 181 | path: '/data-smart-contract-common/action-log-manage', |
| 182 | component: Layout, | 182 | component: Layout, |
| 183 | meta: { | 183 | meta: { |
| 184 | title: '日志管理', | 184 | title: '日志管理', | ... | ... |
| ... | @@ -31,7 +31,8 @@ import useDataAssetStore from "@/store/modules/dataAsset"; | ... | @@ -31,7 +31,8 @@ import useDataAssetStore from "@/store/modules/dataAsset"; |
| 31 | import { TableColumnWidth } from '@/utils/enum'; | 31 | import { TableColumnWidth } from '@/utils/enum'; |
| 32 | import { | 32 | import { |
| 33 | downloadTableData, | 33 | downloadTableData, |
| 34 | downloadTableDataCheck | 34 | downloadTableDataCheck, |
| 35 | getContractStrategy | ||
| 35 | } from "@/api/modules/dataDelivery"; | 36 | } from "@/api/modules/dataDelivery"; |
| 36 | import StrategyTable from '../data_smart_contract/components/strategyTable.vue'; | 37 | import StrategyTable from '../data_smart_contract/components/strategyTable.vue'; |
| 37 | 38 | ||
| ... | @@ -382,7 +383,18 @@ onBeforeMount(() => { | ... | @@ -382,7 +383,18 @@ onBeforeMount(() => { |
| 382 | if (!assetStore.isRefreshDamCatalog) { | 383 | if (!assetStore.isRefreshDamCatalog) { |
| 383 | getDetailInfo(); | 384 | getDetailInfo(); |
| 384 | } | 385 | } |
| 385 | 386 | if (route.query.useGuid) { | |
| 387 | strategyContentLoading.value = true; | ||
| 388 | getContractStrategy(route.query.useGuid).then((res: any) => { | ||
| 389 | strategyContentLoading.value = false; | ||
| 390 | if (res?.code == proxy.$passCode) { | ||
| 391 | strategyDetail.value = res.data || []; | ||
| 392 | } else { | ||
| 393 | strategyDetail.value = []; | ||
| 394 | res?.msg && proxy.$ElMessage.error(res.msg); | ||
| 395 | } | ||
| 396 | }) | ||
| 397 | } | ||
| 386 | }); | 398 | }); |
| 387 | 399 | ||
| 388 | onActivated(() => { | 400 | onActivated(() => { | ... | ... |
| ... | @@ -30,6 +30,7 @@ const detailInfo: any = ref({}); | ... | @@ -30,6 +30,7 @@ const detailInfo: any = ref({}); |
| 30 | const apiType = ref('1');// 单表API. | 30 | const apiType = ref('1');// 单表API. |
| 31 | const sql = ref(''); | 31 | const sql = ref(''); |
| 32 | const processDTOSValue = ref([]); | 32 | const processDTOSValue = ref([]); |
| 33 | const fullPath = route.fullPath; | ||
| 33 | 34 | ||
| 34 | onBeforeMount(() => { | 35 | onBeforeMount(() => { |
| 35 | if (route.query.guid) { | 36 | if (route.query.guid) { |
| ... | @@ -277,8 +278,8 @@ const responseParamsTableInfo = ref({ | ... | @@ -277,8 +278,8 @@ const responseParamsTableInfo = ref({ |
| 277 | const sortParamsTableInfo = ref({ | 278 | const sortParamsTableInfo = ref({ |
| 278 | id: "sort-params-table", | 279 | id: "sort-params-table", |
| 279 | height: 'auto', | 280 | height: 'auto', |
| 280 | minHeight: '100px', | 281 | minHeight: '60px', |
| 281 | minPanelHeight: '100px', | 282 | minPanelHeight: '60px', |
| 282 | fields: [ | 283 | fields: [ |
| 283 | { label: "序号", type: "index", width: TableColumnWidth.INDEX, align: "center" }, | 284 | { label: "序号", type: "index", width: TableColumnWidth.INDEX, align: "center" }, |
| 284 | { label: "参数名", field: "paramName", width: 160 }, | 285 | { label: "参数名", field: "paramName", width: 160 }, |
| ... | @@ -305,6 +306,16 @@ const cancel = () => { | ... | @@ -305,6 +306,16 @@ const cancel = () => { |
| 305 | }); | 306 | }); |
| 306 | } | 307 | } |
| 307 | 308 | ||
| 309 | onActivated(() => { | ||
| 310 | if (fullPath === route.fullPath) { | ||
| 311 | document.title = `API详情-${route.query.apiName}`; | ||
| 312 | let tab: any = userStore.tabbar.find((tab: any) => tab.fullPath === fullPath); | ||
| 313 | if (tab) { | ||
| 314 | tab.meta.title = `API详情-${route.query.apiName}`; | ||
| 315 | } | ||
| 316 | } | ||
| 317 | }) | ||
| 318 | |||
| 308 | </script> | 319 | </script> |
| 309 | 320 | ||
| 310 | <template> | 321 | <template> |
| ... | @@ -439,7 +450,7 @@ const cancel = () => { | ... | @@ -439,7 +450,7 @@ const cancel = () => { |
| 439 | </ContentWrap> --> | 450 | </ContentWrap> --> |
| 440 | 451 | ||
| 441 | </div> | 452 | </div> |
| 442 | <div class="tool_btns"> | 453 | <div class="tool_btns" v-show="!route.fullPath?.includes('usage-api-detail')"> |
| 443 | <div class="btns"> | 454 | <div class="btns"> |
| 444 | <el-button :plain="true" @click="cancel">{{ '关闭' }}</el-button> | 455 | <el-button :plain="true" @click="cancel">{{ '关闭' }}</el-button> |
| 445 | </div> | 456 | </div> | ... | ... |
| ... | @@ -24,7 +24,7 @@ const click = (command) => { | ... | @@ -24,7 +24,7 @@ const click = (command) => { |
| 24 | url = '/data-asset/register-catalog' | 24 | url = '/data-asset/register-catalog' |
| 25 | break; | 25 | break; |
| 26 | case 'log': | 26 | case 'log': |
| 27 | url = '/data-smart-contract/contract-log-manage'; | 27 | url = '/data-smart-contract-common/contract-log-manage'; |
| 28 | break; | 28 | break; |
| 29 | case 'API': | 29 | case 'API': |
| 30 | url = '/data-service/api-management'; | 30 | url = '/data-service/api-management'; |
| ... | @@ -33,7 +33,13 @@ const click = (command) => { | ... | @@ -33,7 +33,13 @@ const click = (command) => { |
| 33 | url = '/data-product/data-catalog-sort'; | 33 | url = '/data-product/data-catalog-sort'; |
| 34 | break; | 34 | break; |
| 35 | case 'dataStrategy': | 35 | case 'dataStrategy': |
| 36 | url = '/data-smart-contract/strategy-management'; | 36 | url = '/data-smart-contract-common/strategy-management'; |
| 37 | break; | ||
| 38 | case 'delivery': | ||
| 39 | url = '/data-delivery/delivery-manage'; | ||
| 40 | break; | ||
| 41 | case 'usage': | ||
| 42 | url = '/data-use/usage-manage'; | ||
| 37 | break; | 43 | break; |
| 38 | } | 44 | } |
| 39 | router.push({ | 45 | router.push({ |
| ... | @@ -66,7 +72,7 @@ const click = (command) => { | ... | @@ -66,7 +72,7 @@ const click = (command) => { |
| 66 | <div class="right-main"> | 72 | <div class="right-main"> |
| 67 | <div class="menu-title">3、数据使用</div> | 73 | <div class="menu-title">3、数据使用</div> |
| 68 | <div class="desc">提供使用数据的软硬件环境,支持数据使用方按照数字合约要求,通过算法或应用使用数据提供方交付的数据产品。</div> | 74 | <div class="desc">提供使用数据的软硬件环境,支持数据使用方按照数字合约要求,通过算法或应用使用数据提供方交付的数据产品。</div> |
| 69 | <div class="sub-row"> | 75 | <div class="sub-row" @click="click('dataProduct')"> |
| 70 | <div style="display: flex;align-items: center;"> | 76 | <div style="display: flex;align-items: center;"> |
| 71 | <div class="menu-title">数据集</div> | 77 | <div class="menu-title">数据集</div> |
| 72 | <div class="sub-desc">如果您使用的数据产品是数据集,且是直接使用或查询数据</div> | 78 | <div class="sub-desc">如果您使用的数据产品是数据集,且是直接使用或查询数据</div> |
| ... | @@ -119,12 +125,12 @@ const click = (command) => { | ... | @@ -119,12 +125,12 @@ const click = (command) => { |
| 119 | <div class="menu-title">4、数字合约</div> | 125 | <div class="menu-title">4、数字合约</div> |
| 120 | <div class="desc">支持数据提供方、数据使用方进行合约创建、合约协商以及合约履行的操作。</div> | 126 | <div class="desc">支持数据提供方、数据使用方进行合约创建、合约协商以及合约履行的操作。</div> |
| 121 | </div> | 127 | </div> |
| 122 | <div class="chunk-per"> | 128 | <div class="chunk-per" @click="click('delivery')"> |
| 123 | <div class="img dataDelivery"></div> | 129 | <div class="img dataDelivery"></div> |
| 124 | <div class="menu-title">5、数据交付</div> | 130 | <div class="menu-title">5、数据交付</div> |
| 125 | <div class="desc">按照数字合约要求交付原始数据、脱敏后数据或计算结果数据等。</div> | 131 | <div class="desc">按照数字合约要求交付原始数据、脱敏后数据或计算结果数据等。</div> |
| 126 | </div> | 132 | </div> |
| 127 | <div class="chunk-per"> | 133 | <div class="chunk-per" @click="click('usage')"> |
| 128 | <div class="img dataControl"></div> | 134 | <div class="img dataControl"></div> |
| 129 | <div class="menu-title">6、数据使用控制</div> | 135 | <div class="menu-title">6、数据使用控制</div> |
| 130 | <div class="desc">提供使用数据的软硬件环境,支持数据使用方按照数字合约要求,通过算法或应用使用数据提供方交付的数据产品。</div> | 136 | <div class="desc">提供使用数据的软硬件环境,支持数据使用方按照数字合约要求,通过算法或应用使用数据提供方交付的数据产品。</div> | ... | ... |
-
Please register or sign in to post a comment