ca58d6b4 by lihua

数据产品目录

1 parent 9eadeb70
...@@ -4,8 +4,7 @@ VITE_APP_TITLE = 可信数据空间 ...@@ -4,8 +4,7 @@ VITE_APP_TITLE = 可信数据空间
4 # VITE_API_BASEURL = https://www.zgsjzc.com/api 4 # VITE_API_BASEURL = https://www.zgsjzc.com/api
5 # VITE_API_BASEURL = https://swzl-test.csbr.cn/api 5 # VITE_API_BASEURL = https://swzl-test.csbr.cn/api
6 # VITE_API_BASEURL = http://localhost:9000 6 # VITE_API_BASEURL = http://localhost:9000
7 VITE_API_BASEURL = http://192.168.9.1:58052/ 7 VITE_API_BASEURL = http://192.168.6.20:58052/
8 # VITE_API_BASEURL = http://192.168.6.20:8052/
9 8
10 VITE_IDASS_BASEURL = https://daop-test.zgsjzc.com/portalLogin 9 VITE_IDASS_BASEURL = https://daop-test.zgsjzc.com/portalLogin
11 10
......
...@@ -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']"
......
...@@ -191,6 +191,8 @@ const getDetailInfo = () => { ...@@ -191,6 +191,8 @@ const getDetailInfo = () => {
191 const data = res.data || {}; 191 const data = res.data || {};
192 detailInfo.value = data; 192 detailInfo.value = data;
193 publicDataProductsMainRSVO.value = detailInfo.value.publicDataProductsMainRSVO || {}; 193 publicDataProductsMainRSVO.value = detailInfo.value.publicDataProductsMainRSVO || {};
194 //TODO. 返回服务包信息
195 productTableInfo.value.data = detailInfo.value.associationApiVO || [];
194 // detailInfo.value.damTypeName = damTypes.find(d => d.value == detailInfo.value.damType)?.label; 196 // detailInfo.value.damTypeName = damTypes.find(d => d.value == detailInfo.value.damType)?.label;
195 detailInfo.value.dataSourcesName = dataSourcesList.find(d => d.value == detailInfo.value.dataSources)?.label; 197 detailInfo.value.dataSourcesName = dataSourcesList.find(d => d.value == detailInfo.value.dataSources)?.label;
196 if (!isJSZQ.value) { 198 if (!isJSZQ.value) {
...@@ -319,6 +321,25 @@ const getDetailInfo = () => { ...@@ -319,6 +321,25 @@ const getDetailInfo = () => {
319 }) 321 })
320 } 322 }
321 323
324 /** ----------------- 数据包信息 --------------------- */
325 const productTableInfo = ref({
326 id: "input-product-table",
327 height: '214px',
328 fields: [
329 { label: "序号", type: "index", width: TableColumnWidth.INDEX, align: "center" },
330 { label: "服务名称", field: "apiGuid", width: 180 },
331 { label: "API类型", field: "apiType", width: 100 },
332 { label: "API地址", field: "requestUrl", width: 240 },
333 { label: "描述", field: "apiDescription", width: 240 },
334 ],
335 data: [],
336 showPage: false,
337 actionInfo: {
338 show: false
339 },
340 loading: false
341 });
342
322 onBeforeMount(() => { 343 onBeforeMount(() => {
323 if (!assetStore.isRefreshDamCatalog) { 344 if (!assetStore.isRefreshDamCatalog) {
324 getDetailInfo(); 345 getDetailInfo();
...@@ -356,11 +377,12 @@ const isTextTruncated = () => { ...@@ -356,11 +377,12 @@ const isTextTruncated = () => {
356 isTruncated.value = false; 377 isTruncated.value = false;
357 isExpanded.value = false; 378 isExpanded.value = false;
358 nextTick(() => { 379 nextTick(() => {
359 let domDesc = document.getElementsByClassName('right-main')?.[0]; 380 let dom = document.getElementsByClassName('right-main')?.[0];
381 let domDesc = dom?.children?.length && dom?.children?.[dom.children.length - 1];
360 if (!domDesc) { 382 if (!domDesc) {
361 return; 383 return;
362 } 384 }
363 if (domDesc.clientHeight > 82) { 385 if (domDesc.clientHeight > 21) {
364 isTruncated.value = true; 386 isTruncated.value = true;
365 } else { 387 } else {
366 isTruncated.value = false; 388 isTruncated.value = false;
...@@ -1195,8 +1217,23 @@ const respParamsTableInfo = ref({ ...@@ -1195,8 +1217,23 @@ const respParamsTableInfo = ref({
1195 detailInfo.subjectDomain }}</div> 1217 detailInfo.subjectDomain }}</div>
1196 <div class="dataLabel dataLabel1" v-if="detailInfo.databaseType">{{ detailInfo.databaseType }}</div> 1218 <div class="dataLabel dataLabel1" v-if="detailInfo.databaseType">{{ detailInfo.databaseType }}</div>
1197 <div class="dataLabel dataLabel1">{{ detailInfo.dataSourcesName }}</div> 1219 <div class="dataLabel dataLabel1">{{ detailInfo.dataSourcesName }}</div>
1220 <div class="dataLabel dataLabel1" v-if="detailInfo.updateFrequency">{{ detailInfo.updateFrequencyName }}</div>
1221 </div>
1222 </div>
1223 <template v-if="detailInfo?.foundMode == 1">
1224 <div class="row-extra-desc">
1225 <div class="per-extra-desc">{{ '行业分类:' + (detailInfo.industryName || '--') }}</div>
1226 <div>{{ '机构分类:' + (detailInfo.institutionTypeName || '--') }}</div>
1227 </div>
1228 <div class="row-extra-desc">
1229 <div class="per-extra-desc">{{ '领域:' + (detailInfo.domainName || '--') }}</div>
1230 <div>{{ '应用场景:' + (detailInfo.scenarioName || '--') }}</div>
1198 </div> 1231 </div>
1232 <div class="row-extra-desc">
1233 <div class="per-extra-desc">{{ '是否缓存:' + (detailInfo.isCache == 'Y' ? '是' : '否') }}</div>
1234 <div>{{ '是否加密存储:' + (detailInfo.scenario == 'Y' ? '是' : '否') }}</div>
1199 </div> 1235 </div>
1236 </template>
1200 <div v-show="detailInfo.rightMainName" class="applicationScenarios">{{ '权利主体:' + detailInfo.rightMainName }} 1237 <div v-show="detailInfo.rightMainName" class="applicationScenarios">{{ '权利主体:' + detailInfo.rightMainName }}
1201 </div> 1238 </div>
1202 <div class="applicationScenarios" 1239 <div class="applicationScenarios"
...@@ -1285,7 +1322,7 @@ const respParamsTableInfo = ref({ ...@@ -1285,7 +1322,7 @@ const respParamsTableInfo = ref({
1285 </div> 1322 </div>
1286 <div class="list_item is_block"> 1323 <div class="list_item is_block">
1287 <span class="item_label">产品关键词:</span> 1324 <span class="item_label">产品关键词:</span>
1288 <span class="item_value">{{ publicDataProductsMainRSVO.productKeywords?.join(',') || '--' }}</span> 1325 <span class="item_value">{{ publicDataProductsMainRSVO?.productKeywords?.join(',') || '--' }}</span>
1289 </div> 1326 </div>
1290 <div class="list_item is_block"> 1327 <div class="list_item is_block">
1291 <span class="item_label">产品描述:</span> 1328 <span class="item_label">产品描述:</span>
...@@ -1293,6 +1330,9 @@ const respParamsTableInfo = ref({ ...@@ -1293,6 +1330,9 @@ const respParamsTableInfo = ref({
1293 </div> 1330 </div>
1294 </div> 1331 </div>
1295 </ContentWrap> 1332 </ContentWrap>
1333 <ContentWrap v-if="productTableInfo.data?.length" id="product-info" title="服务包信息" style="margin: 16px 16px 16px">
1334 <Table ref="productTableRef" :tableInfo="productTableInfo" class="fiveRow-table" />
1335 </ContentWrap>
1296 <ContentWrap v-if="isJSZQ" id="id-paramsInfo" title="入参出参信息" description="" style="margin: 16px 16px 16px"> 1336 <ContentWrap v-if="isJSZQ" id="id-paramsInfo" title="入参出参信息" description="" style="margin: 16px 16px 16px">
1297 <el-tabs v-model="activeTabName" class="param-tabs"> 1337 <el-tabs v-model="activeTabName" class="param-tabs">
1298 <el-tab-pane label="入参信息" name="reqParamList"> 1338 <el-tab-pane label="入参信息" name="reqParamList">
...@@ -1340,7 +1380,7 @@ const respParamsTableInfo = ref({ ...@@ -1340,7 +1380,7 @@ const respParamsTableInfo = ref({
1340 <span>{{ scope.row["fieldPrecision"] == null ? '--' : scope.row["fieldPrecision"] }}</span> 1380 <span>{{ scope.row["fieldPrecision"] == null ? '--' : scope.row["fieldPrecision"] }}</span>
1341 </template> 1381 </template>
1342 </el-table-column> 1382 </el-table-column>
1343 <el-table-column prop="dictionaryCode" label="关联字典" width="130px" align="left" show-overflow-tooltip> 1383 <el-table-column v-if="detailInfo.foundMode != 1" prop="dictionaryCode" label="关联字典" width="130px" align="left" show-overflow-tooltip>
1344 <template #default="scope"> 1384 <template #default="scope">
1345 <span>{{ scope.row["dictionaryName"] || '--' }}</span> 1385 <span>{{ scope.row["dictionaryName"] || '--' }}</span>
1346 </template> 1386 </template>
...@@ -1838,7 +1878,7 @@ const respParamsTableInfo = ref({ ...@@ -1838,7 +1878,7 @@ const respParamsTableInfo = ref({
1838 letter-spacing: 0; 1878 letter-spacing: 0;
1839 line-height: 30px; 1879 line-height: 30px;
1840 font-weight: 600; 1880 font-weight: 600;
1841 max-width: calc(100% - 250px); 1881 max-width: calc(100% - 320px);
1842 } 1882 }
1843 1883
1844 .dataLabel { 1884 .dataLabel {
...@@ -1877,9 +1917,24 @@ const respParamsTableInfo = ref({ ...@@ -1877,9 +1917,24 @@ const respParamsTableInfo = ref({
1877 .expand_btn { 1917 .expand_btn {
1878 position: absolute; 1918 position: absolute;
1879 right: 0px; 1919 right: 0px;
1880 top: 58px; 1920 bottom: 0px;
1921 font-size: 14px;
1922 line-height: 21px;
1923 }
1924
1925 .row-extra-desc {
1926 width: 100%;
1927 display: flex;
1928 margin-top: 4px;
1881 font-size: 14px; 1929 font-size: 14px;
1930 color: #666666;
1931 letter-spacing: 0;
1882 line-height: 21px; 1932 line-height: 21px;
1933 font-weight: 400;
1934
1935 .per-extra-desc {
1936 width: 400px;
1937 }
1883 } 1938 }
1884 } 1939 }
1885 } 1940 }
......
...@@ -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,
...@@ -49,7 +47,7 @@ const damTypesOptions = ref<any>([ ...@@ -49,7 +47,7 @@ const damTypesOptions = ref<any>([
49 { label: "加工交付", value: 2 }, 47 { label: "加工交付", value: 2 },
50 { label: "深圳专区", value: 3 }, 48 { label: "深圳专区", value: 3 },
51 { label: "江苏专区", value: 4 }, 49 { label: "江苏专区", value: 4 },
52 { label: "可信数据空间", value: 5 }, 50 // { label: "数据港", value: 5 },
53 ]) 51 ])
54 const searchItemList = ref([ 52 const searchItemList = ref([
55 { 53 {
...@@ -110,20 +108,20 @@ const searchItemList = ref([ ...@@ -110,20 +108,20 @@ const searchItemList = ref([
110 label: 'label' 108 label: 'label'
111 } 109 }
112 }, 110 },
113 { 111 // {
114 type: "select", 112 // type: "select",
115 label: "", 113 // label: "",
116 field: "isRegister", 114 // field: "isRegister",
117 default: "", 115 // default: "",
118 placeholder: "登记状态", 116 // placeholder: "登记状态",
119 clearable: true, 117 // clearable: true,
120 filterable: true, 118 // filterable: true,
121 options: isRegisterOptions.value, 119 // options: isRegisterOptions.value,
122 props: { 120 // props: {
123 value: 'value', 121 // value: 'value',
124 label: 'label' 122 // label: 'label'
125 } 123 // }
126 }, 124 // },
127 ]); 125 ]);
128 126
129 const pageInfo = ref({ 127 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!