8ad5d02b by xukangle

Merge branch 'develop' into dev_20241202_xukangle

2 parents 8e994be3 f86a61ed
...@@ -6,7 +6,11 @@ VITE_APP_TITLE = 数据资产管理系统 ...@@ -6,7 +6,11 @@ VITE_APP_TITLE = 数据资产管理系统
6 VITE_API_BASEURL = http://localhost:9000 6 VITE_API_BASEURL = http://localhost:9000
7 # VITE_API_BASEURL = http://10.4.82.1:28052/ 7 # VITE_API_BASEURL = http://10.4.82.1:28052/
8 # 平台用户 接口请地址 8 # 平台用户 接口请地址
9 VITE_APP_USER_API_BASEURL = gateway-server/user 9 VITE_APP_USER_API_BASEURL = gateway-server
10
11 #AUTH服务
12 VITE_APP_AUTH_URL = 'ms-daop-auth-service'
13
10 # 系统管理 接口地址 14 # 系统管理 接口地址
11 VITE_APP_API_BASEURL = ms-daop-zcgl-system-manager-service 15 VITE_APP_API_BASEURL = ms-daop-zcgl-system-manager-service
12 # 文件上传请求地址 16 # 文件上传请求地址
...@@ -42,3 +46,4 @@ VITE_API_MESSAGE = ms-swzl-message-notification-service ...@@ -42,3 +46,4 @@ VITE_API_MESSAGE = ms-swzl-message-notification-service
42 VITE_BUILD_SOURCEMAP = false 46 VITE_BUILD_SOURCEMAP = false
43 # 是否在打包时开启压缩,支持 gzip 和 brotli 47 # 是否在打包时开启压缩,支持 gzip 和 brotli
44 VITE_BUILD_COMPRESS = gzip,brotli 48 VITE_BUILD_COMPRESS = gzip,brotli
49
......
...@@ -4,7 +4,7 @@ VITE_APP_TITLE = 数据资产管理系统 ...@@ -4,7 +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 = http://49.4.26.201:31709/ 5 # VITE_API_BASEURL = http://49.4.26.201:31709/
6 # 平台用户 接口请地址 6 # 平台用户 接口请地址
7 VITE_APP_USER_API_BASEURL = gateway-server/user 7 VITE_APP_USER_API_BASEURL = gateway-server
8 # 系统管理 接口地址 8 # 系统管理 接口地址
9 VITE_APP_API_BASEURL = ms-daop-zcgl-system-manager-service 9 VITE_APP_API_BASEURL = ms-daop-zcgl-system-manager-service
10 # 文件上传请求地址 10 # 文件上传请求地址
......
...@@ -3,15 +3,16 @@ import request from "@/utils/request"; ...@@ -3,15 +3,16 @@ import request from "@/utils/request";
3 /** 获取数往知来接入idaas的token。 */ 3 /** 获取数往知来接入idaas的token。 */
4 export const getTokenByCode = (params) => { 4 export const getTokenByCode = (params) => {
5 return request({ 5 return request({
6 url: `/csbr-zuul/user/idaas-login?code=${params.code}&platformGuid=${params.platformGuid}&userType=${params.userType}`, 6 url: `${import.meta.env.VITE_APP_USER_API_BASEURL}/staff/login`,
7 method: 'post' 7 method: 'post',
8 data: params
8 }) 9 })
9 } 10 }
10 11
11 /** 退出登录 */ 12 /** 退出登录 */
12 export const loginOut = () => { 13 export const loginOut = () => {
13 return request({ 14 return request({
14 url: `/csbr-zuul/user/logout`, 15 url: `${import.meta.env.VITE_APP_USER_API_BASEURL}/user/logout`,
15 method: 'get' 16 method: 'get'
16 }) 17 })
17 } 18 }
...@@ -19,11 +20,20 @@ export const loginOut = () => { ...@@ -19,11 +20,20 @@ export const loginOut = () => {
19 /** 刷新token,延长过期时间 */ 20 /** 刷新token,延长过期时间 */
20 export const refreshToken = (params) => { 21 export const refreshToken = (params) => {
21 return request({ 22 return request({
22 url: `/csbr-zuul/user/refreshToken?refreshToken=${params.refreshToken}`, 23 url: `${import.meta.env.VITE_APP_USER_API_BASEURL}/user/refreshToken?refreshToken=${params.refreshToken}`,
23 method: 'post' 24 method: 'post'
24 }) 25 })
25 } 26 }
26 27
28 export const getSystemMenu = (params) => {
29 return request({
30 url: `${
31 import.meta.env.VITE_APP_AUTH_URL
32 }/product-menu-permission/tenant/get-product-menu?tenantGuid=${params.tenantGuid}&platformSystemGuid=32774fcfdf5e43e8b866660374d8bced`,
33 method: "get",
34 });
35 };
36
27 // 获取当前用户对应的产品和菜单 37 // 获取当前用户对应的产品和菜单
28 export const getUserInfo = () => { 38 export const getUserInfo = () => {
29 return request({ 39 return request({
......
...@@ -50,7 +50,7 @@ router.beforeEach(async (to, from, next) => { ...@@ -50,7 +50,7 @@ router.beforeEach(async (to, from, next) => {
50 }) 50 })
51 } 51 }
52 // 如果未开启主页,但进入的是主页,则会进入侧边栏导航第一个模块 52 // 如果未开启主页,但进入的是主页,则会进入侧边栏导航第一个模块
53 else if (!settingsStore.settings.home.enable && to.name === 'home') { 53 else if (!settingsStore.settings.home.enable && (to.name === 'home' || to.name === undefined)) {
54 if (menuStore.sidebarMenus.length > 0) { 54 if (menuStore.sidebarMenus.length > 0) {
55 next({ 55 next({
56 path: menuStore.sidebarMenusFirstDeepestPath, 56 path: menuStore.sidebarMenusFirstDeepestPath,
......
...@@ -34,7 +34,7 @@ const routes: RouteRecordRaw[] = [ ...@@ -34,7 +34,7 @@ const routes: RouteRecordRaw[] = [
34 cache: true, 34 cache: true,
35 reuse: true, 35 reuse: true,
36 editPage: true, 36 editPage: true,
37 activeMenu: '/data-inventory/classify-grade-manage/template-config' 37 activeMenu: '/data-inventory/classify-grade-manage/task-config'
38 }, 38 },
39 beforeEnter: (to, from) => { 39 beforeEnter: (to, from) => {
40 if (to.query.name) { 40 if (to.query.name) {
...@@ -45,6 +45,46 @@ const routes: RouteRecordRaw[] = [ ...@@ -45,6 +45,46 @@ const routes: RouteRecordRaw[] = [
45 } 45 }
46 }, 46 },
47 { 47 {
48 path: 'task-detail',
49 name: 'taskDetail',
50 component: () => import('@/views/data_inventory/taskDetail.vue'),
51 meta: {
52 title: '结果-',
53 sidebar: false,
54 breadcrumb: false,
55 cache: true,
56 reuse: true,
57 editPage: true,
58 activeMenu: '/data-inventory/classify-grade-manage/task-config'
59 },
60 beforeEnter: (to, from) => {
61 if (to.query.type == 'confirm') {
62 to.meta.title = `${to.query.name}-结果确认`;
63 } else {
64 to.meta.title = `${to.query.name}-结果修改`;
65 }
66 }
67 },
68 {
69 path: 'task-log',
70 name: 'taskLog',
71 component: () => import('@/views/data_inventory/taskLog.vue'),
72 meta: {
73 title: '分级分类日志',
74 sidebar: false,
75 breadcrumb: false,
76 cache: true,
77 reuse: true,
78 editPage: true,
79 activeMenu: '/data-inventory/classify-grade-manage/task-config'
80 },
81 beforeEnter: (to, from) => {
82 // if (to.query.name) {
83 // to.meta.title = `编辑-${to.query.name}`;
84 // }
85 }
86 },
87 {
48 path: 'template-config', 88 path: 'template-config',
49 name: 'templateConfig', 89 name: 'templateConfig',
50 component: () => import('@/views/data_inventory/templateConfig.vue'), 90 component: () => import('@/views/data_inventory/templateConfig.vue'),
......
...@@ -4,7 +4,7 @@ import router from '@/router' ...@@ -4,7 +4,7 @@ import router from '@/router'
4 import { ElMessage } from 'element-plus' 4 import { ElMessage } from 'element-plus'
5 import apiUser from '@/api/modules/user' 5 import apiUser from '@/api/modules/user'
6 import { getCurrentTime } from '@/utils/common' 6 import { getCurrentTime } from '@/utils/common'
7 import { getUserInfo, getTokenByCode, loginOut, refreshToken, editPasswordInterface } from '@/api/modules/queryService' 7 import { getSystemMenu, getUserInfo, getTokenByCode, loginOut, refreshToken, editPasswordInterface } from '@/api/modules/queryService'
8 8
9 const useUserStore = defineStore( 9 const useUserStore = defineStore(
10 // 唯一ID 10 // 唯一ID
...@@ -17,6 +17,7 @@ const useUserStore = defineStore( ...@@ -17,6 +17,7 @@ const useUserStore = defineStore(
17 const userId = ref(localStorage.userId ?? '') 17 const userId = ref(localStorage.userId ?? '')
18 const userName = ref(localStorage.userName ?? '') 18 const userName = ref(localStorage.userName ?? '')
19 const userData = ref(localStorage.userData ?? '{}') 19 const userData = ref(localStorage.userData ?? '{}')
20 const currentTenantGuid = ref(localStorage.currentTenantGuid ?? '');
20 const userInfoData = ref(JSON.parse(localStorage.userInfoData ?? "[]")) 21 const userInfoData = ref(JSON.parse(localStorage.userInfoData ?? "[]"))
21 const token = ref(localStorage.token ?? '') 22 const token = ref(localStorage.token ?? '')
22 const tabbarMap: any = ref({}) 23 const tabbarMap: any = ref({})
...@@ -30,10 +31,14 @@ const useUserStore = defineStore( ...@@ -30,10 +31,14 @@ const useUserStore = defineStore(
30 const timer: any = ref(null); 31 const timer: any = ref(null);
31 //获取token. 32 //获取token.
32 function getToken(data, state) { 33 function getToken(data, state) {
33 data.platformGuid = "6646dcad76c411eea911fa163e419da9"; 34 data.platformGuid = "7f16f697aec111ef8656fa163e60becd";
34 data.userType = 2; 35 data.userType = 2;
35 isLogin.value = true; 36 data.validateUri = location.origin + '/';
37 debugger
38 debugger
36 return getTokenPromise.value = getTokenByCode(data).then((res: any) => { 39 return getTokenPromise.value = getTokenByCode(data).then((res: any) => {
40 debugger
41 debugger
37 getTokenPromise.value = null; 42 getTokenPromise.value = null;
38 console.log(res); 43 console.log(res);
39 if (res.code == '00000') { 44 if (res.code == '00000') {
...@@ -41,25 +46,24 @@ const useUserStore = defineStore( ...@@ -41,25 +46,24 @@ const useUserStore = defineStore(
41 isLogin.value = true; 46 isLogin.value = true;
42 localStorage.setItem('code', `${data.code}`); 47 localStorage.setItem('code', `${data.code}`);
43 localStorage.setItem('state', state); 48 localStorage.setItem('state', state);
44 localStorage.setItem('token', res.data.access_token || ""); 49 localStorage.setItem('token', res.data.token || "");
45 token.value = res.data.access_token; 50 token.value = res.data.access_token;
46 localStorage.setItem('refresh_token', res.data.refresh_token || ""); 51 localStorage.setItem('refresh_token', res.data.refreshToken || "");
47 const expiresIn = (Date.now() + 1700000) + ""; 52 const expiresIn = (Date.now() + 1700000) + "";
48 localStorage.setItem('expiresIn', expiresIn); 53 localStorage.setItem('expiresIn', expiresIn);
49 refreshUserToken(); 54 refreshUserToken();
50 //获取用户信息 55 //获取用户信息
51 localStorage.setItem('account', res.data.logonUser)
52 localStorage.setItem('userId', res.data.userId)
53 localStorage.setItem('userName', res.data.userName)
54 localStorage.setItem('userData', JSON.stringify(res.data.data))
55 account.value = res.data.logonUser 56 account.value = res.data.logonUser
56 userId.value = res.data.userId 57 userId.value = res.data.userId
57 userName.value = res.data.userName 58 userName.value = res.data.userName
58 userData.value = JSON.stringify(res.data.data) 59 // userData.value = JSON.stringify(res.data.data);
59 return getUserInfo().then((info: any) => { 60 currentTenantGuid.value = res.data.tenantInfoList && res.data.tenantInfoList.length ? res.data.tenantInfoList[0].guid : '';
61 let currentTenant = res.data.tenantInfoList?.[0];
62 return getSystemMenu({ tenantGuid: currentTenantGuid.value }).then((info: any) => {
60 if (info.code == '00000') { 63 if (info.code == '00000') {
61 localStorage.setItem('userInfoData', JSON.stringify(info.data)) 64 localStorage.setItem('userName', currentTenant?.name)
62 userInfoData.value = info.data 65 localStorage.setItem('userInfoData', JSON.stringify(info.data));
66 userInfoData.value = info.data;
63 } else { 67 } else {
64 ElMessage.error(info.msg) 68 ElMessage.error(info.msg)
65 } 69 }
......
...@@ -20,68 +20,7 @@ const userStore = useUserStore(); ...@@ -20,68 +20,7 @@ const userStore = useUserStore();
20 const userData = JSON.parse(userStore.userData); 20 const userData = JSON.parse(userStore.userData);
21 const assetStore = useDataAssetStore(); 21 const assetStore = useDataAssetStore();
22 22
23 const step = ref(0); 23 const data1 = [
24 const selectIndex = ref(0);
25 const asideSearchInput = ref("");
26 const permissionList: any = ref([])
27 const listLoading = ref(false)
28 const listPage = ref({
29 limit: 50,
30 curr: 1,
31 totalPages: 0
32 })
33 const currpermissionList: any = ref([
34 {
35 "guid": "62d01ad586774db2bb3955dfb2d18366",
36 "productGuid": null,
37 "productName": null,
38 "dataPermissionName": "当前用户",
39 "bizState": "Y",
40 "createUserName": "数往知来管理员",
41 "createTime": "2024-01-24 14:08:43",
42 "sqlScript": null,
43 "dataSourceGuid": null
44 },
45 {
46 "guid": "d68a27c1998540a2b8e8f22a2d5eebef",
47 "productGuid": null,
48 "productName": null,
49 "dataPermissionName": "组织权限",
50 "bizState": "Y",
51 "createUserName": "数往知来管理员",
52 "createTime": "2024-01-24 11:47:02",
53 "sqlScript": null,
54 "dataSourceGuid": null
55 }
56 ])
57 const templateInfo = ref({
58 title: '医疗数据分类分级模板',
59 descGroup: [
60 { label: '模型确认人', value: '管理员 ' },
61 { label: '模型确认时间', value: '2021-12-12 09:12:13' },
62 ],
63 tags: [
64 { type: 'info', name: '医疗行业分类' },
65 { type: 'success', name: '五级' },
66 { type: 'primary', name: 'V5' },
67 ],
68 desc: '适用于各级医疗机构、卫生健康管理部门、公共卫生服务机构、相关专项业务服务机构、相关信息技术服务机构等开展医疗健康数据分类分级。适用于各级医疗机构、卫生健康管理部门、公共卫生服务机构、相关专项业务服务机构、相关信息技术服务机构等开展医疗健康数据分类分级。适用于各级医疗机构、卫生健康。'
69 })
70 const treeIndex: any = ref({})
71
72 const treeInfo = ref({
73 id: "data-pickup-tree",
74 filter: true,
75 queryValue: "",
76 queryPlaceholder: "输入组织名称搜索",
77 props: {
78 label: "organisationName",
79 value: "guid",
80 },
81 nodeKey: 'guid',
82 expandedKey: [],
83 expandOnNodeClick: false,
84 data: [
85 { 24 {
86 "children": [ 25 "children": [
87 { 26 {
...@@ -363,7 +302,70 @@ const treeInfo = ref({ ...@@ -363,7 +302,70 @@ const treeInfo = ref({
363 "levelCode": "8", 302 "levelCode": "8",
364 "displayCreateTime": "2024-01-16 11:38:24" 303 "displayCreateTime": "2024-01-16 11:38:24"
365 } 304 }
305 ]
306
307 const step = ref(0);
308 const selectIndex = ref(0);
309 const asideSearchInput = ref("");
310 const permissionList: any = ref([])
311 const listLoading = ref(false)
312 const listPage = ref({
313 limit: 50,
314 curr: 1,
315 totalPages: 0
316 })
317 const currpermissionList: any = ref([
318 {
319 "guid": "62d01ad586774db2bb3955dfb2d18366",
320 "productGuid": null,
321 "productName": null,
322 "dataPermissionName": "当前用户",
323 "bizState": "Y",
324 "createUserName": "数往知来管理员",
325 "createTime": "2024-01-24 14:08:43",
326 "sqlScript": null,
327 "dataSourceGuid": null
328 },
329 {
330 "guid": "d68a27c1998540a2b8e8f22a2d5eebef",
331 "productGuid": null,
332 "productName": null,
333 "dataPermissionName": "组织权限",
334 "bizState": "Y",
335 "createUserName": "数往知来管理员",
336 "createTime": "2024-01-24 11:47:02",
337 "sqlScript": null,
338 "dataSourceGuid": null
339 }
340 ])
341 const templateInfo = ref({
342 title: '医疗数据分类',
343 descGroup: [
344 { label: '模型确认人', value: '管理员 ' },
345 { label: '模型确认时间', value: '2021-12-12 09:12:13' },
366 ], 346 ],
347 tags: [
348 { type: 'info', name: '医疗行业分类' },
349 { type: 'success', name: '五级' },
350 { type: 'primary', name: 'V5' },
351 ],
352 desc: '适用于各级医疗机构、卫生健康管理部门、公共卫生服务机构、相关专项业务服务机构、相关信息技术服务机构等开展医疗健康数据分类分级。适用于各级医疗机构、卫生健康管理部门、公共卫生服务机构、相关专项业务服务机构、相关信息技术服务机构等开展医疗健康数据分类分级。适用于各级医疗机构、卫生健康。'
353 })
354 const treeIndex: any = ref({})
355
356 const treeInfo = ref({
357 id: "data-pickup-tree",
358 filter: true,
359 queryValue: "",
360 queryPlaceholder: "输入组织名称搜索",
361 props: {
362 label: "organisationName",
363 value: "guid",
364 },
365 nodeKey: 'guid',
366 expandedKey: [],
367 expandOnNodeClick: false,
368 data: data1 || [],
367 }); 369 });
368 370
369 const expand1 = ref(true) 371 const expand1 = ref(true)
...@@ -436,6 +438,8 @@ const tableInfo = ref({ ...@@ -436,6 +438,8 @@ const tableInfo = ref({
436 438
437 const metadataTableInfo = ref({ 439 const metadataTableInfo = ref({
438 id: "metadata-table", 440 id: "metadata-table",
441 multiple: true,
442 rowKey: 'guid',
439 fields: [ 443 fields: [
440 { label: "序号", type: "index", width: 56, align: "center", fixed: "left" }, 444 { label: "序号", type: "index", width: 56, align: "center", fixed: "left" },
441 { label: "数据库名称", field: "damCode", width: 200 }, 445 { label: "数据库名称", field: "damCode", width: 200 },
...@@ -607,7 +611,7 @@ onBeforeMount(() => { ...@@ -607,7 +611,7 @@ onBeforeMount(() => {
607 <template> 611 <template>
608 <div class="container_wrap full flex"> 612 <div class="container_wrap full flex">
609 <div class="aside_wrap" v-show="step == 0"> 613 <div class="aside_wrap" v-show="step == 0">
610 <div class="aside_title">选择分类分级模板</div> 614 <div class="aside_title">选择分类</div>
611 <div class="aside_search"> 615 <div class="aside_search">
612 <el-input v-model.trim="asideSearchInput" placeholder="请输入关键字" :prefix-icon="Search" clearable 616 <el-input v-model.trim="asideSearchInput" placeholder="请输入关键字" :prefix-icon="Search" clearable
613 @change="querySearch" /> 617 @change="querySearch" />
...@@ -773,9 +777,11 @@ onBeforeMount(() => { ...@@ -773,9 +777,11 @@ onBeforeMount(() => {
773 } 777 }
774 778
775 .panel_desc { 779 .panel_desc {
776 margin: 8px 0; 780 margin: 8px 0 16px;
777 font-size: 14px; 781 font-size: 14px;
778 color: #666; 782 color: #666;
783 line-height: 1.5;
784 text-align: justify;
779 } 785 }
780 } 786 }
781 787
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!