9ba51b92 by lihua

数据产品目录

1 parent fe68b0ea
...@@ -5,6 +5,8 @@ import useUserStore from "@/store/modules/user"; ...@@ -5,6 +5,8 @@ import useUserStore from "@/store/modules/user";
5 import useKeepAliveStore from '@/store/modules/keepAlive' 5 import useKeepAliveStore from '@/store/modules/keepAlive'
6 import { ElMessageBox, ElMessage } from "element-plus"; 6 import { ElMessageBox, ElMessage } from "element-plus";
7 import { isEqual } from "lodash-es"; 7 import { isEqual } from "lodash-es";
8 import useMenuStore from "@/store/modules/menu";
9 import useSettingsStore from '@/store/modules/settings'
8 10
9 const router = useRouter(); 11 const router = useRouter();
10 const route = useRoute(); 12 const route = useRoute();
...@@ -38,6 +40,17 @@ watch( ...@@ -38,6 +40,17 @@ watch(
38 pathIndex = index 40 pathIndex = index
39 return item.path === newRouter.path 41 return item.path === newRouter.path
40 }) 42 })
43 if (!newRouter?.meta.title) {
44 let title: any = '';
45 for (const m of (useMenuStore().allMenus || [])) {
46 let child = m.children?.find(cc => cc.path == newRouter.fullPath);
47 if (child) {
48 title = child.meta?.title;
49 break;
50 }
51 }
52 newRouter.meta.title = title;
53 }
41 if (option) { 54 if (option) {
42 list.splice(pathIndex, 1, newRouter); 55 list.splice(pathIndex, 1, newRouter);
43 } else { 56 } else {
...@@ -45,9 +58,11 @@ watch( ...@@ -45,9 +58,11 @@ watch(
45 } 58 }
46 59
47 } 60 }
61 const settingsStore = useSettingsStore();
62 settingsStore.setTitle(newRouter.meta.title);
48 } 63 }
49 tabbarList.value = list; 64 tabbarList.value = list;
50 tabbarActive.value = isExist[0]?.fullPath || newRouter.fullPath; 65 tabbarActive.value = newRouter.fullPath;
51 userStore.setTabbar(tabbarList.value); 66 userStore.setTabbar(tabbarList.value);
52 userStore.setActiveTabbar(combPath, newRouter.fullPath); 67 userStore.setActiveTabbar(combPath, newRouter.fullPath);
53 }, 68 },
......
...@@ -153,7 +153,12 @@ router.afterEach((to, from) => { ...@@ -153,7 +153,12 @@ router.afterEach((to, from) => {
153 settingsStore.settings.app.enableProgress && (isLoading.value = false) 153 settingsStore.settings.app.enableProgress && (isLoading.value = false)
154 // 设置页面 title 154 // 设置页面 title
155 if (settingsStore.settings.app.routeBaseOn !== 'filesystem') { 155 if (settingsStore.settings.app.routeBaseOn !== 'filesystem') {
156 settingsStore.setTitle(to.meta.title) 156 let title: any = '';
157 if (!to.meta.title) {
158 let child = userStore.tabbar?.find((t: any) => t.fullPath == to.fullPath);
159 title = child?.meta?.title;
160 }
161 settingsStore.setTitle(to.meta.title || title)
157 } 162 }
158 else { 163 else {
159 settingsStore.setTitle(to.meta.title) 164 settingsStore.setTitle(to.meta.title)
......
...@@ -7,7 +7,7 @@ const routes: RouteRecordRaw[] = [ ...@@ -7,7 +7,7 @@ const routes: RouteRecordRaw[] = [
7 path: '/data-asset/register-catalog', 7 path: '/data-asset/register-catalog',
8 component: Layout, 8 component: Layout,
9 meta: { 9 meta: {
10 title: '自有数据产品', 10 title: '数据产品',
11 icon: 'sidebar-videos', 11 icon: 'sidebar-videos',
12 }, 12 },
13 children: [ 13 children: [
...@@ -16,7 +16,7 @@ const routes: RouteRecordRaw[] = [ ...@@ -16,7 +16,7 @@ const routes: RouteRecordRaw[] = [
16 name: 'registerCatalogManagement', 16 name: 'registerCatalogManagement',
17 component: () => import('@/views/data_asset/registerCatalogManagement.vue'), 17 component: () => import('@/views/data_asset/registerCatalogManagement.vue'),
18 meta: { 18 meta: {
19 title: '自有数据产品', 19 title: '',
20 sidebar: false, 20 sidebar: false,
21 breadcrumb: false, 21 breadcrumb: false,
22 cache: true 22 cache: true
...@@ -27,7 +27,7 @@ const routes: RouteRecordRaw[] = [ ...@@ -27,7 +27,7 @@ const routes: RouteRecordRaw[] = [
27 name: 'registerCatalogCreate', 27 name: 'registerCatalogCreate',
28 component: () => import('@/views/data_asset/registerCatalogCreate.vue'), 28 component: () => import('@/views/data_asset/registerCatalogCreate.vue'),
29 meta: { 29 meta: {
30 title: '新建自有数据产品', 30 title: '新建数据产品',
31 sidebar: false, 31 sidebar: false,
32 breadcrumb: false, 32 breadcrumb: false,
33 cache: true, 33 cache: true,
...@@ -149,7 +149,7 @@ const routes: RouteRecordRaw[] = [ ...@@ -149,7 +149,7 @@ const routes: RouteRecordRaw[] = [
149 name: 'authorDataCatalogManagement', 149 name: 'authorDataCatalogManagement',
150 component: () => import('@/views/data_asset/authorDataCatalogManagement.vue'), 150 component: () => import('@/views/data_asset/authorDataCatalogManagement.vue'),
151 meta: { 151 meta: {
152 title: '授权数据产品', 152 title: '',
153 sidebar: false, 153 sidebar: false,
154 breadcrumb: false, 154 breadcrumb: false,
155 cache: true 155 cache: true
......
...@@ -6,6 +6,27 @@ function Layout() { ...@@ -6,6 +6,27 @@ function Layout() {
6 6
7 const routes: RouteRecordRaw[] = [ 7 const routes: RouteRecordRaw[] = [
8 { 8 {
9 path: '/data-asset/data-source',
10 component: Layout,
11 meta: {
12 title: '数据源管理',
13 icon: 'sidebar-videos',
14 },
15 children: [
16 {
17 path: '',
18 name: 'dataSource',
19 component: () => import('@/views/data_service/dataSource.vue'),
20 meta: {
21 title: '',
22 sidebar: false,
23 breadcrumb: false,
24 cache: true
25 },
26 },
27 ],
28 },
29 {
9 path: '/data-service/api-management', 30 path: '/data-service/api-management',
10 component: Layout, 31 component: Layout,
11 meta: { 32 meta: {
...@@ -18,7 +39,7 @@ const routes: RouteRecordRaw[] = [ ...@@ -18,7 +39,7 @@ const routes: RouteRecordRaw[] = [
18 name: 'apiManagement', 39 name: 'apiManagement',
19 component: () => import('@/views/data_service/apiManagement.vue'), 40 component: () => import('@/views/data_service/apiManagement.vue'),
20 meta: { 41 meta: {
21 title: '管理API', 42 title: '',
22 sidebar: false, 43 sidebar: false,
23 breadcrumb: false, 44 breadcrumb: false,
24 cache: true 45 cache: true
...@@ -90,7 +111,7 @@ const routes: RouteRecordRaw[] = [ ...@@ -90,7 +111,7 @@ const routes: RouteRecordRaw[] = [
90 name: 'apiTest', 111 name: 'apiTest',
91 component: () => import('@/views/data_service/apiTest.vue'), 112 component: () => import('@/views/data_service/apiTest.vue'),
92 meta: { 113 meta: {
93 title: '测试API', 114 title: '',
94 sidebar: false, 115 sidebar: false,
95 breadcrumb: false, 116 breadcrumb: false,
96 cache: true 117 cache: true
......
...@@ -659,7 +659,8 @@ defineExpose({ ...@@ -659,7 +659,8 @@ defineExpose({
659 <span v-else>{{ scope.row["fieldPrecision"] == null ? '--' : scope.row["fieldPrecision"] }}</span> 659 <span v-else>{{ scope.row["fieldPrecision"] == null ? '--' : scope.row["fieldPrecision"] }}</span>
660 </template> 660 </template>
661 </el-table-column> 661 </el-table-column>
662 <el-table-column prop="dictionaryCode" label="关联字典" width="130px" align="left" show-overflow-tooltip> 662 <!-- 直接去掉这一列 -->
663 <!-- <el-table-column prop="dictionaryCode" label="关联字典" width="130px" align="left" show-overflow-tooltip>
663 <template #default="scope"> 664 <template #default="scope">
664 <el-select v-if="scope.row['isEdit'] && !(tableCreateInfo.guid && scope.row['isPrimary'] == 'Y')" 665 <el-select v-if="scope.row['isEdit'] && !(tableCreateInfo.guid && scope.row['isPrimary'] == 'Y')"
665 v-model="scope.row['dictionaryCode']" placeholder="请选择" clearable filterable> 666 v-model="scope.row['dictionaryCode']" placeholder="请选择" clearable filterable>
...@@ -669,7 +670,7 @@ defineExpose({ ...@@ -669,7 +670,7 @@ defineExpose({
669 <span v-else>{{ scope.row['dictionaryCode'] ? (paramsList.find(p => p.value == 670 <span v-else>{{ scope.row['dictionaryCode'] ? (paramsList.find(p => p.value ==
670 scope.row['dictionaryCode'])?.label || "--") : '--' }}</span> 671 scope.row['dictionaryCode'])?.label || "--") : '--' }}</span>
671 </template> 672 </template>
672 </el-table-column> 673 </el-table-column> -->
673 <el-table-column prop="isPrimary" label="是否主键" width="130px" align="left" show-overflow-tooltip> 674 <el-table-column prop="isPrimary" label="是否主键" width="130px" align="left" show-overflow-tooltip>
674 <template #default="scope"> 675 <template #default="scope">
675 <el-select v-if="scope.row['isEdit'] && !tableCreateInfo.guid" v-model="scope.row['isPrimary']" 676 <el-select v-if="scope.row['isEdit'] && !tableCreateInfo.guid" v-model="scope.row['isPrimary']"
......
...@@ -192,6 +192,8 @@ const getDetailInfo = () => { ...@@ -192,6 +192,8 @@ const getDetailInfo = () => {
192 const data = res.data || {}; 192 const data = res.data || {};
193 detailInfo.value = data; 193 detailInfo.value = data;
194 publicDataProductsMainRSVO.value = detailInfo.value.publicDataProductsMainRSVO || {}; 194 publicDataProductsMainRSVO.value = detailInfo.value.publicDataProductsMainRSVO || {};
195 //TODO. 返回服务包信息
196 productTableInfo.value.data = detailInfo.value.associationApiVO || [];
195 // detailInfo.value.damTypeName = damTypes.find(d => d.value == detailInfo.value.damType)?.label; 197 // detailInfo.value.damTypeName = damTypes.find(d => d.value == detailInfo.value.damType)?.label;
196 detailInfo.value.dataSourcesName = dataSourcesList.find(d => d.value == detailInfo.value.dataSources)?.label; 198 detailInfo.value.dataSourcesName = dataSourcesList.find(d => d.value == detailInfo.value.dataSources)?.label;
197 if (!isJSZQ.value) { 199 if (!isJSZQ.value) {
...@@ -320,6 +322,25 @@ const getDetailInfo = () => { ...@@ -320,6 +322,25 @@ const getDetailInfo = () => {
320 }) 322 })
321 } 323 }
322 324
325 /** ----------------- 数据包信息 --------------------- */
326 const productTableInfo = ref({
327 id: "input-product-table",
328 height: '214px',
329 fields: [
330 { label: "序号", type: "index", width: TableColumnWidth.INDEX, align: "center" },
331 { label: "服务名称", field: "apiGuid", width: 180 },
332 { label: "API类型", field: "apiType", width: 100 },
333 { label: "API地址", field: "requestUrl", width: 240 },
334 { label: "描述", field: "apiDescription", width: 240 },
335 ],
336 data: [],
337 showPage: false,
338 actionInfo: {
339 show: false
340 },
341 loading: false
342 });
343
323 onBeforeMount(() => { 344 onBeforeMount(() => {
324 if (!assetStore.isRefreshDamCatalog) { 345 if (!assetStore.isRefreshDamCatalog) {
325 getDetailInfo(); 346 getDetailInfo();
...@@ -357,11 +378,12 @@ const isTextTruncated = () => { ...@@ -357,11 +378,12 @@ const isTextTruncated = () => {
357 isTruncated.value = false; 378 isTruncated.value = false;
358 isExpanded.value = false; 379 isExpanded.value = false;
359 nextTick(() => { 380 nextTick(() => {
360 let domDesc = document.getElementsByClassName('right-main')?.[0]; 381 let dom = document.getElementsByClassName('right-main')?.[0];
382 let domDesc = dom?.children?.length && dom?.children?.[dom.children.length - 1];
361 if (!domDesc) { 383 if (!domDesc) {
362 return; 384 return;
363 } 385 }
364 if (domDesc.clientHeight > 82) { 386 if (domDesc.clientHeight > 21) {
365 isTruncated.value = true; 387 isTruncated.value = true;
366 } else { 388 } else {
367 isTruncated.value = false; 389 isTruncated.value = false;
...@@ -1209,8 +1231,23 @@ const respParamsTableInfo = ref({ ...@@ -1209,8 +1231,23 @@ const respParamsTableInfo = ref({
1209 detailInfo.subjectDomain }}</div> 1231 detailInfo.subjectDomain }}</div>
1210 <div class="dataLabel dataLabel1" v-if="detailInfo.databaseType">{{ detailInfo.databaseType }}</div> 1232 <div class="dataLabel dataLabel1" v-if="detailInfo.databaseType">{{ detailInfo.databaseType }}</div>
1211 <div class="dataLabel dataLabel1">{{ detailInfo.dataSourcesName }}</div> 1233 <div class="dataLabel dataLabel1">{{ detailInfo.dataSourcesName }}</div>
1234 <div class="dataLabel dataLabel1" v-if="detailInfo.updateFrequency">{{ detailInfo.updateFrequencyName }}</div>
1212 </div> 1235 </div>
1213 </div> 1236 </div>
1237 <template v-if="detailInfo?.foundMode == 1">
1238 <div class="row-extra-desc">
1239 <div class="per-extra-desc">{{ '行业分类:' + (detailInfo.industryName || '--') }}</div>
1240 <div>{{ '机构分类:' + (detailInfo.institutionTypeName || '--') }}</div>
1241 </div>
1242 <div class="row-extra-desc">
1243 <div class="per-extra-desc">{{ '领域:' + (detailInfo.domainName || '--') }}</div>
1244 <div>{{ '应用场景:' + (detailInfo.scenarioName || '--') }}</div>
1245 </div>
1246 <div class="row-extra-desc">
1247 <div class="per-extra-desc">{{ '是否缓存:' + (detailInfo.isCache == 'Y' ? '是' : '否') }}</div>
1248 <div>{{ '是否加密存储:' + (detailInfo.scenario == 'Y' ? '是' : '否') }}</div>
1249 </div>
1250 </template>
1214 <div v-show="detailInfo.rightMainName" class="applicationScenarios">{{ '权利主体:' + detailInfo.rightMainName }} 1251 <div v-show="detailInfo.rightMainName" class="applicationScenarios">{{ '权利主体:' + detailInfo.rightMainName }}
1215 </div> 1252 </div>
1216 <div class="applicationScenarios" 1253 <div class="applicationScenarios"
...@@ -1299,7 +1336,7 @@ const respParamsTableInfo = ref({ ...@@ -1299,7 +1336,7 @@ const respParamsTableInfo = ref({
1299 </div> 1336 </div>
1300 <div class="list_item is_block"> 1337 <div class="list_item is_block">
1301 <span class="item_label">产品关键词:</span> 1338 <span class="item_label">产品关键词:</span>
1302 <span class="item_value">{{ publicDataProductsMainRSVO.productKeywords?.join(',') || '--' }}</span> 1339 <span class="item_value">{{ publicDataProductsMainRSVO?.productKeywords?.join(',') || '--' }}</span>
1303 </div> 1340 </div>
1304 <div class="list_item is_block"> 1341 <div class="list_item is_block">
1305 <span class="item_label">产品描述:</span> 1342 <span class="item_label">产品描述:</span>
...@@ -1307,6 +1344,9 @@ const respParamsTableInfo = ref({ ...@@ -1307,6 +1344,9 @@ const respParamsTableInfo = ref({
1307 </div> 1344 </div>
1308 </div> 1345 </div>
1309 </ContentWrap> 1346 </ContentWrap>
1347 <ContentWrap v-if="productTableInfo.data?.length" id="product-info" title="服务包信息" style="margin: 16px 16px 16px">
1348 <Table ref="productTableRef" :tableInfo="productTableInfo" class="fiveRow-table" />
1349 </ContentWrap>
1310 <ContentWrap v-if="isJSZQ" id="id-paramsInfo" title="入参出参信息" description="" style="margin: 16px 16px 16px"> 1350 <ContentWrap v-if="isJSZQ" id="id-paramsInfo" title="入参出参信息" description="" style="margin: 16px 16px 16px">
1311 <el-tabs v-model="activeTabName" class="param-tabs"> 1351 <el-tabs v-model="activeTabName" class="param-tabs">
1312 <el-tab-pane label="入参信息" name="reqParamList"> 1352 <el-tab-pane label="入参信息" name="reqParamList">
...@@ -1354,7 +1394,7 @@ const respParamsTableInfo = ref({ ...@@ -1354,7 +1394,7 @@ const respParamsTableInfo = ref({
1354 <span>{{ scope.row["fieldPrecision"] == null ? '--' : scope.row["fieldPrecision"] }}</span> 1394 <span>{{ scope.row["fieldPrecision"] == null ? '--' : scope.row["fieldPrecision"] }}</span>
1355 </template> 1395 </template>
1356 </el-table-column> 1396 </el-table-column>
1357 <el-table-column prop="dictionaryCode" label="关联字典" width="130px" align="left" show-overflow-tooltip> 1397 <el-table-column v-if="detailInfo.foundMode != 1" prop="dictionaryCode" label="关联字典" width="130px" align="left" show-overflow-tooltip>
1358 <template #default="scope"> 1398 <template #default="scope">
1359 <span>{{ scope.row["dictionaryName"] || '--' }}</span> 1399 <span>{{ scope.row["dictionaryName"] || '--' }}</span>
1360 </template> 1400 </template>
...@@ -1851,7 +1891,7 @@ const respParamsTableInfo = ref({ ...@@ -1851,7 +1891,7 @@ const respParamsTableInfo = ref({
1851 letter-spacing: 0; 1891 letter-spacing: 0;
1852 line-height: 30px; 1892 line-height: 30px;
1853 font-weight: 600; 1893 font-weight: 600;
1854 max-width: calc(100% - 250px); 1894 max-width: calc(100% - 320px);
1855 } 1895 }
1856 1896
1857 .dataLabel { 1897 .dataLabel {
...@@ -1890,10 +1930,25 @@ const respParamsTableInfo = ref({ ...@@ -1890,10 +1930,25 @@ const respParamsTableInfo = ref({
1890 .expand_btn { 1930 .expand_btn {
1891 position: absolute; 1931 position: absolute;
1892 right: 0px; 1932 right: 0px;
1893 top: 58px; 1933 bottom: 0px;
1894 font-size: 14px; 1934 font-size: 14px;
1895 line-height: 21px; 1935 line-height: 21px;
1896 } 1936 }
1937
1938 .row-extra-desc {
1939 width: 100%;
1940 display: flex;
1941 margin-top: 4px;
1942 font-size: 14px;
1943 color: #666666;
1944 letter-spacing: 0;
1945 line-height: 21px;
1946 font-weight: 400;
1947
1948 .per-extra-desc {
1949 width: 400px;
1950 }
1951 }
1897 } 1952 }
1898 } 1953 }
1899 1954
......
...@@ -5,9 +5,7 @@ name: registerCatalogManagement ...@@ -5,9 +5,7 @@ name: registerCatalogManagement
5 <script lang="ts" setup name="registerCatalogManagement"> 5 <script lang="ts" setup name="registerCatalogManagement">
6 import { ref } from "vue"; 6 import { ref } from "vue";
7 import TableTools from "@/components/Tools/table_tools.vue"; 7 import TableTools from "@/components/Tools/table_tools.vue";
8 import { ElMessageBox } from "element-plus";
9 import { useRouter, useRoute } from "vue-router"; 8 import { useRouter, useRoute } from "vue-router";
10 import { MoreFilled } from "@element-plus/icons-vue";
11 import { 9 import {
12 getParamsList, 10 getParamsList,
13 getDamCatalogTable, 11 getDamCatalogTable,
...@@ -48,7 +46,7 @@ const damTypesOptions = ref<any>([ ...@@ -48,7 +46,7 @@ const damTypesOptions = ref<any>([
48 { label: "自建", value: 1 }, 46 { label: "自建", value: 1 },
49 { label: "加工交付", value: 2 }, 47 { label: "加工交付", value: 2 },
50 { label: "江苏专区", value: 4 }, 48 { label: "江苏专区", value: 4 },
51 { label: "可信数据空间", value: 5 }, 49 // { label: "可信数据空间", value: 5 },
52 ]) 50 ])
53 const searchItemList = ref([ 51 const searchItemList = ref([
54 { 52 {
...@@ -109,20 +107,20 @@ const searchItemList = ref([ ...@@ -109,20 +107,20 @@ const searchItemList = ref([
109 label: 'label' 107 label: 'label'
110 } 108 }
111 }, 109 },
112 { 110 // {
113 type: "select", 111 // type: "select",
114 label: "", 112 // label: "",
115 field: "isRegister", 113 // field: "isRegister",
116 default: "", 114 // default: "",
117 placeholder: "登记状态", 115 // placeholder: "登记状态",
118 clearable: true, 116 // clearable: true,
119 filterable: true, 117 // filterable: true,
120 options: isRegisterOptions.value, 118 // options: isRegisterOptions.value,
121 props: { 119 // props: {
122 value: 'value', 120 // value: 'value',
123 label: 'label' 121 // label: 'label'
124 } 122 // }
125 }, 123 // },
126 ]); 124 ]);
127 125
128 const pageInfo = ref({ 126 const pageInfo = ref({
......
...@@ -259,6 +259,14 @@ const apiManageTableBtnMap = { ...@@ -259,6 +259,14 @@ const apiManageTableBtnMap = {
259 /** 详情 */ 259 /** 详情 */
260 DETAIL: (scope) => { 260 DETAIL: (scope) => {
261 let row = scope.row; 261 let row = scope.row;
262 const approveVO = row.approveVO || {};
263 if (!approveVO && row.isApprove == 'N') {
264 router.push({
265 name: 'apiDetail',
266 query: { guid: row.guid, type: 'detail' }
267 });
268 return;
269 }
262 if (!row.approveGuid) { 270 if (!row.approveGuid) {
263 proxy.$ElMessage.error(`【${row.apiName}】关联流程已删除!`); 271 proxy.$ElMessage.error(`【${row.apiName}】关联流程已删除!`);
264 return; 272 return;
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!