6db18366 by lihua

数据产品目录

1 parent b3d3da60
......@@ -4,8 +4,7 @@ VITE_APP_TITLE = 可信数据空间
# VITE_API_BASEURL = https://www.zgsjzc.com/api
# VITE_API_BASEURL = https://swzl-test.csbr.cn/api
# VITE_API_BASEURL = http://localhost:9000
VITE_API_BASEURL = http://192.168.9.1:58052/
# VITE_API_BASEURL = http://192.168.6.20:8052/
VITE_API_BASEURL = http://192.168.6.20:58052/
VITE_IDASS_BASEURL = https://idaas-test.csbr.cn/login
......
......@@ -5,6 +5,8 @@ import useUserStore from "@/store/modules/user";
import useKeepAliveStore from '@/store/modules/keepAlive'
import { ElMessageBox, ElMessage } from "element-plus";
import { isEqual } from "lodash-es";
import useMenuStore from "@/store/modules/menu";
import useSettingsStore from '@/store/modules/settings'
const router = useRouter();
const route = useRoute();
......@@ -38,6 +40,17 @@ watch(
pathIndex = index
return item.path === newRouter.path
})
if (!newRouter?.meta.title) {
let title: any = '';
for (const m of (useMenuStore().allMenus || [])) {
let child = m.children?.find(cc => cc.path == newRouter.fullPath);
if (child) {
title = child.meta?.title;
break;
}
}
newRouter.meta.title = title;
}
if (option) {
list.splice(pathIndex, 1, newRouter);
} else {
......@@ -45,9 +58,11 @@ watch(
}
}
const settingsStore = useSettingsStore();
settingsStore.setTitle(newRouter.meta.title);
}
tabbarList.value = list;
tabbarActive.value = isExist[0]?.fullPath || newRouter.fullPath;
tabbarActive.value = newRouter.fullPath;
userStore.setTabbar(tabbarList.value);
userStore.setActiveTabbar(combPath, newRouter.fullPath);
},
......
......@@ -153,7 +153,12 @@ router.afterEach((to, from) => {
settingsStore.settings.app.enableProgress && (isLoading.value = false)
// 设置页面 title
if (settingsStore.settings.app.routeBaseOn !== 'filesystem') {
settingsStore.setTitle(to.meta.title)
let title: any = '';
if (!to.meta.title) {
let child = userStore.tabbar?.find((t: any) => t.fullPath == to.fullPath);
title = child?.meta?.title;
}
settingsStore.setTitle(to.meta.title || title)
}
else {
settingsStore.setTitle(to.meta.title)
......
......@@ -7,7 +7,7 @@ const routes: RouteRecordRaw[] = [
path: '/data-asset/register-catalog',
component: Layout,
meta: {
title: '自有数据产品',
title: '数据产品',
icon: 'sidebar-videos',
},
children: [
......@@ -16,7 +16,7 @@ const routes: RouteRecordRaw[] = [
name: 'registerCatalogManagement',
component: () => import('@/views/data_asset/registerCatalogManagement.vue'),
meta: {
title: '自有数据产品',
title: '',
sidebar: false,
breadcrumb: false,
cache: true
......@@ -27,7 +27,7 @@ const routes: RouteRecordRaw[] = [
name: 'registerCatalogCreate',
component: () => import('@/views/data_asset/registerCatalogCreate.vue'),
meta: {
title: '新建自有数据产品',
title: '新建数据产品',
sidebar: false,
breadcrumb: false,
cache: true,
......@@ -149,7 +149,7 @@ const routes: RouteRecordRaw[] = [
name: 'authorDataCatalogManagement',
component: () => import('@/views/data_asset/authorDataCatalogManagement.vue'),
meta: {
title: '授权数据产品',
title: '',
sidebar: false,
breadcrumb: false,
cache: true
......
......@@ -6,6 +6,27 @@ function Layout() {
const routes: RouteRecordRaw[] = [
{
path: '/data-asset/data-source',
component: Layout,
meta: {
title: '数据源管理',
icon: 'sidebar-videos',
},
children: [
{
path: '',
name: 'dataSource',
component: () => import('@/views/data_service/dataSource.vue'),
meta: {
title: '',
sidebar: false,
breadcrumb: false,
cache: true
},
},
],
},
{
path: '/data-service/api-management',
component: Layout,
meta: {
......@@ -18,7 +39,7 @@ const routes: RouteRecordRaw[] = [
name: 'apiManagement',
component: () => import('@/views/data_service/apiManagement.vue'),
meta: {
title: '管理API',
title: '',
sidebar: false,
breadcrumb: false,
cache: true
......@@ -90,7 +111,7 @@ const routes: RouteRecordRaw[] = [
name: 'apiTest',
component: () => import('@/views/data_service/apiTest.vue'),
meta: {
title: '测试API',
title: '',
sidebar: false,
breadcrumb: false,
cache: true
......
......@@ -659,7 +659,8 @@ defineExpose({
<span v-else>{{ scope.row["fieldPrecision"] == null ? '--' : scope.row["fieldPrecision"] }}</span>
</template>
</el-table-column>
<el-table-column prop="dictionaryCode" label="关联字典" width="130px" align="left" show-overflow-tooltip>
<!-- 直接去掉这一列 -->
<!-- <el-table-column prop="dictionaryCode" label="关联字典" width="130px" align="left" show-overflow-tooltip>
<template #default="scope">
<el-select v-if="scope.row['isEdit'] && !(tableCreateInfo.guid && scope.row['isPrimary'] == 'Y')"
v-model="scope.row['dictionaryCode']" placeholder="请选择" clearable filterable>
......@@ -669,7 +670,7 @@ defineExpose({
<span v-else>{{ scope.row['dictionaryCode'] ? (paramsList.find(p => p.value ==
scope.row['dictionaryCode'])?.label || "--") : '--' }}</span>
</template>
</el-table-column>
</el-table-column> -->
<el-table-column prop="isPrimary" label="是否主键" width="130px" align="left" show-overflow-tooltip>
<template #default="scope">
<el-select v-if="scope.row['isEdit'] && !tableCreateInfo.guid" v-model="scope.row['isPrimary']"
......
......@@ -192,6 +192,8 @@ const getDetailInfo = () => {
const data = res.data || {};
detailInfo.value = data;
publicDataProductsMainRSVO.value = detailInfo.value.publicDataProductsMainRSVO || {};
//TODO. 返回服务包信息
productTableInfo.value.data = detailInfo.value.associationApiVO || [];
// detailInfo.value.damTypeName = damTypes.find(d => d.value == detailInfo.value.damType)?.label;
detailInfo.value.dataSourcesName = dataSourcesList.find(d => d.value == detailInfo.value.dataSources)?.label;
if (!isJSZQ.value) {
......@@ -320,6 +322,25 @@ const getDetailInfo = () => {
})
}
/** ----------------- 数据包信息 --------------------- */
const productTableInfo = ref({
id: "input-product-table",
height: '214px',
fields: [
{ label: "序号", type: "index", width: TableColumnWidth.INDEX, align: "center" },
{ label: "服务名称", field: "apiGuid", width: 180 },
{ label: "API类型", field: "apiType", width: 100 },
{ label: "API地址", field: "requestUrl", width: 240 },
{ label: "描述", field: "apiDescription", width: 240 },
],
data: [],
showPage: false,
actionInfo: {
show: false
},
loading: false
});
onBeforeMount(() => {
if (!assetStore.isRefreshDamCatalog) {
getDetailInfo();
......@@ -357,11 +378,12 @@ const isTextTruncated = () => {
isTruncated.value = false;
isExpanded.value = false;
nextTick(() => {
let domDesc = document.getElementsByClassName('right-main')?.[0];
let dom = document.getElementsByClassName('right-main')?.[0];
let domDesc = dom?.children?.length && dom?.children?.[dom.children.length - 1];
if (!domDesc) {
return;
}
if (domDesc.clientHeight > 82) {
if (domDesc.clientHeight > 21) {
isTruncated.value = true;
} else {
isTruncated.value = false;
......@@ -1210,8 +1232,23 @@ const respParamsTableInfo = ref({
detailInfo.subjectDomain }}</div>
<div class="dataLabel dataLabel1" v-if="detailInfo.databaseType">{{ detailInfo.databaseType }}</div>
<div class="dataLabel dataLabel1">{{ detailInfo.dataSourcesName }}</div>
<div class="dataLabel dataLabel1" v-if="detailInfo.updateFrequency">{{ detailInfo.updateFrequencyName }}</div>
</div>
</div>
<template v-if="detailInfo?.foundMode == 1">
<div class="row-extra-desc">
<div class="per-extra-desc">{{ '行业分类:' + (detailInfo.industryName || '--') }}</div>
<div>{{ '机构分类:' + (detailInfo.institutionTypeName || '--') }}</div>
</div>
<div class="row-extra-desc">
<div class="per-extra-desc">{{ '领域:' + (detailInfo.domainName || '--') }}</div>
<div>{{ '应用场景:' + (detailInfo.scenarioName || '--') }}</div>
</div>
<div class="row-extra-desc">
<div class="per-extra-desc">{{ '是否缓存:' + (detailInfo.isCache == 'Y' ? '是' : '否') }}</div>
<div>{{ '是否加密存储:' + (detailInfo.scenario == 'Y' ? '是' : '否') }}</div>
</div>
</template>
<div v-show="detailInfo.rightMainName" class="applicationScenarios">{{ '权利主体:' + detailInfo.rightMainName }}
</div>
<div class="applicationScenarios"
......@@ -1300,7 +1337,7 @@ const respParamsTableInfo = ref({
</div>
<div class="list_item is_block">
<span class="item_label">产品关键词:</span>
<span class="item_value">{{ publicDataProductsMainRSVO.productKeywords?.join(',') || '--' }}</span>
<span class="item_value">{{ publicDataProductsMainRSVO?.productKeywords?.join(',') || '--' }}</span>
</div>
<div class="list_item is_block">
<span class="item_label">产品描述:</span>
......@@ -1308,6 +1345,9 @@ const respParamsTableInfo = ref({
</div>
</div>
</ContentWrap>
<ContentWrap v-if="productTableInfo.data?.length" id="product-info" title="服务包信息" style="margin: 16px 16px 16px">
<Table ref="productTableRef" :tableInfo="productTableInfo" class="fiveRow-table" />
</ContentWrap>
<ContentWrap v-if="isJSZQ" id="id-paramsInfo" title="入参出参信息" description="" style="margin: 16px 16px 16px">
<el-tabs v-model="activeTabName" class="param-tabs">
<el-tab-pane label="入参信息" name="reqParamList">
......@@ -1355,7 +1395,7 @@ const respParamsTableInfo = ref({
<span>{{ scope.row["fieldPrecision"] == null ? '--' : scope.row["fieldPrecision"] }}</span>
</template>
</el-table-column>
<el-table-column prop="dictionaryCode" label="关联字典" width="130px" align="left" show-overflow-tooltip>
<el-table-column v-if="detailInfo.foundMode != 1" prop="dictionaryCode" label="关联字典" width="130px" align="left" show-overflow-tooltip>
<template #default="scope">
<span>{{ scope.row["dictionaryName"] || '--' }}</span>
</template>
......@@ -1852,7 +1892,7 @@ const respParamsTableInfo = ref({
letter-spacing: 0;
line-height: 30px;
font-weight: 600;
max-width: calc(100% - 250px);
max-width: calc(100% - 320px);
}
.dataLabel {
......@@ -1891,10 +1931,25 @@ const respParamsTableInfo = ref({
.expand_btn {
position: absolute;
right: 0px;
top: 58px;
bottom: 0px;
font-size: 14px;
line-height: 21px;
}
.row-extra-desc {
width: 100%;
display: flex;
margin-top: 4px;
font-size: 14px;
color: #666666;
letter-spacing: 0;
line-height: 21px;
font-weight: 400;
.per-extra-desc {
width: 400px;
}
}
}
}
......
......@@ -5,9 +5,7 @@ name: registerCatalogManagement
<script lang="ts" setup name="registerCatalogManagement">
import { ref } from "vue";
import TableTools from "@/components/Tools/table_tools.vue";
import { ElMessageBox } from "element-plus";
import { useRouter, useRoute } from "vue-router";
import { MoreFilled } from "@element-plus/icons-vue";
import {
getParamsList,
getDamCatalogTable,
......@@ -49,7 +47,7 @@ const damTypesOptions = ref<any>([
{ label: "加工交付", value: 2 },
{ label: "专区", value: 3 },
{ label: "江苏专区", value: 4 },
{ label: "数据港", value: 5 },
// { label: "数据港", value: 5 },
])
const searchItemList = ref([
{
......@@ -110,20 +108,20 @@ const searchItemList = ref([
label: 'label'
}
},
{
type: "select",
label: "",
field: "isRegister",
default: "",
placeholder: "登记状态",
clearable: true,
filterable: true,
options: isRegisterOptions.value,
props: {
value: 'value',
label: 'label'
}
},
// {
// type: "select",
// label: "",
// field: "isRegister",
// default: "",
// placeholder: "登记状态",
// clearable: true,
// filterable: true,
// options: isRegisterOptions.value,
// props: {
// value: 'value',
// label: 'label'
// }
// },
]);
const pageInfo = ref({
......
......@@ -259,6 +259,14 @@ const apiManageTableBtnMap = {
/** 详情 */
DETAIL: (scope) => {
let row = scope.row;
const approveVO = row.approveVO || {};
if (!approveVO && row.isApprove == 'N') {
router.push({
name: 'apiDetail',
query: { guid: row.guid, type: 'detail' }
});
return;
}
if (!row.approveGuid) {
proxy.$ElMessage.error(`【${row.apiName}】关联流程已删除!`);
return;
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!