8ad5d02b by xukangle

Merge branch 'develop' into dev_20241202_xukangle

2 parents 8e994be3 f86a61ed
......@@ -6,7 +6,11 @@ VITE_APP_TITLE = 数据资产管理系统
VITE_API_BASEURL = http://localhost:9000
# VITE_API_BASEURL = http://10.4.82.1:28052/
# 平台用户 接口请地址
VITE_APP_USER_API_BASEURL = gateway-server/user
VITE_APP_USER_API_BASEURL = gateway-server
#AUTH服务
VITE_APP_AUTH_URL = 'ms-daop-auth-service'
# 系统管理 接口地址
VITE_APP_API_BASEURL = ms-daop-zcgl-system-manager-service
# 文件上传请求地址
......@@ -42,3 +46,4 @@ VITE_API_MESSAGE = ms-swzl-message-notification-service
VITE_BUILD_SOURCEMAP = false
# 是否在打包时开启压缩,支持 gzip 和 brotli
VITE_BUILD_COMPRESS = gzip,brotli
......
......@@ -4,7 +4,7 @@ VITE_APP_TITLE = 数据资产管理系统
VITE_API_BASEURL = https://www.zgsjzc.com/api
# VITE_API_BASEURL = http://49.4.26.201:31709/
# 平台用户 接口请地址
VITE_APP_USER_API_BASEURL = gateway-server/user
VITE_APP_USER_API_BASEURL = gateway-server
# 系统管理 接口地址
VITE_APP_API_BASEURL = ms-daop-zcgl-system-manager-service
# 文件上传请求地址
......
......@@ -3,15 +3,16 @@ import request from "@/utils/request";
/** 获取数往知来接入idaas的token。 */
export const getTokenByCode = (params) => {
return request({
url: `/csbr-zuul/user/idaas-login?code=${params.code}&platformGuid=${params.platformGuid}&userType=${params.userType}`,
method: 'post'
url: `${import.meta.env.VITE_APP_USER_API_BASEURL}/staff/login`,
method: 'post',
data: params
})
}
/** 退出登录 */
export const loginOut = () => {
return request({
url: `/csbr-zuul/user/logout`,
url: `${import.meta.env.VITE_APP_USER_API_BASEURL}/user/logout`,
method: 'get'
})
}
......@@ -19,11 +20,20 @@ export const loginOut = () => {
/** 刷新token,延长过期时间 */
export const refreshToken = (params) => {
return request({
url: `/csbr-zuul/user/refreshToken?refreshToken=${params.refreshToken}`,
url: `${import.meta.env.VITE_APP_USER_API_BASEURL}/user/refreshToken?refreshToken=${params.refreshToken}`,
method: 'post'
})
}
export const getSystemMenu = (params) => {
return request({
url: `${
import.meta.env.VITE_APP_AUTH_URL
}/product-menu-permission/tenant/get-product-menu?tenantGuid=${params.tenantGuid}&platformSystemGuid=32774fcfdf5e43e8b866660374d8bced`,
method: "get",
});
};
// 获取当前用户对应的产品和菜单
export const getUserInfo = () => {
return request({
......
......@@ -50,7 +50,7 @@ router.beforeEach(async (to, from, next) => {
})
}
// 如果未开启主页,但进入的是主页,则会进入侧边栏导航第一个模块
else if (!settingsStore.settings.home.enable && to.name === 'home') {
else if (!settingsStore.settings.home.enable && (to.name === 'home' || to.name === undefined)) {
if (menuStore.sidebarMenus.length > 0) {
next({
path: menuStore.sidebarMenusFirstDeepestPath,
......
......@@ -34,7 +34,7 @@ const routes: RouteRecordRaw[] = [
cache: true,
reuse: true,
editPage: true,
activeMenu: '/data-inventory/classify-grade-manage/template-config'
activeMenu: '/data-inventory/classify-grade-manage/task-config'
},
beforeEnter: (to, from) => {
if (to.query.name) {
......@@ -45,6 +45,46 @@ const routes: RouteRecordRaw[] = [
}
},
{
path: 'task-detail',
name: 'taskDetail',
component: () => import('@/views/data_inventory/taskDetail.vue'),
meta: {
title: '结果-',
sidebar: false,
breadcrumb: false,
cache: true,
reuse: true,
editPage: true,
activeMenu: '/data-inventory/classify-grade-manage/task-config'
},
beforeEnter: (to, from) => {
if (to.query.type == 'confirm') {
to.meta.title = `${to.query.name}-结果确认`;
} else {
to.meta.title = `${to.query.name}-结果修改`;
}
}
},
{
path: 'task-log',
name: 'taskLog',
component: () => import('@/views/data_inventory/taskLog.vue'),
meta: {
title: '分级分类日志',
sidebar: false,
breadcrumb: false,
cache: true,
reuse: true,
editPage: true,
activeMenu: '/data-inventory/classify-grade-manage/task-config'
},
beforeEnter: (to, from) => {
// if (to.query.name) {
// to.meta.title = `编辑-${to.query.name}`;
// }
}
},
{
path: 'template-config',
name: 'templateConfig',
component: () => import('@/views/data_inventory/templateConfig.vue'),
......
......@@ -4,7 +4,7 @@ import router from '@/router'
import { ElMessage } from 'element-plus'
import apiUser from '@/api/modules/user'
import { getCurrentTime } from '@/utils/common'
import { getUserInfo, getTokenByCode, loginOut, refreshToken, editPasswordInterface } from '@/api/modules/queryService'
import { getSystemMenu, getUserInfo, getTokenByCode, loginOut, refreshToken, editPasswordInterface } from '@/api/modules/queryService'
const useUserStore = defineStore(
// 唯一ID
......@@ -17,6 +17,7 @@ const useUserStore = defineStore(
const userId = ref(localStorage.userId ?? '')
const userName = ref(localStorage.userName ?? '')
const userData = ref(localStorage.userData ?? '{}')
const currentTenantGuid = ref(localStorage.currentTenantGuid ?? '');
const userInfoData = ref(JSON.parse(localStorage.userInfoData ?? "[]"))
const token = ref(localStorage.token ?? '')
const tabbarMap: any = ref({})
......@@ -30,10 +31,14 @@ const useUserStore = defineStore(
const timer: any = ref(null);
//获取token.
function getToken(data, state) {
data.platformGuid = "6646dcad76c411eea911fa163e419da9";
data.platformGuid = "7f16f697aec111ef8656fa163e60becd";
data.userType = 2;
isLogin.value = true;
data.validateUri = location.origin + '/';
debugger
debugger
return getTokenPromise.value = getTokenByCode(data).then((res: any) => {
debugger
debugger
getTokenPromise.value = null;
console.log(res);
if (res.code == '00000') {
......@@ -41,25 +46,24 @@ const useUserStore = defineStore(
isLogin.value = true;
localStorage.setItem('code', `${data.code}`);
localStorage.setItem('state', state);
localStorage.setItem('token', res.data.access_token || "");
localStorage.setItem('token', res.data.token || "");
token.value = res.data.access_token;
localStorage.setItem('refresh_token', res.data.refresh_token || "");
localStorage.setItem('refresh_token', res.data.refreshToken || "");
const expiresIn = (Date.now() + 1700000) + "";
localStorage.setItem('expiresIn', expiresIn);
refreshUserToken();
//获取用户信息
localStorage.setItem('account', res.data.logonUser)
localStorage.setItem('userId', res.data.userId)
localStorage.setItem('userName', res.data.userName)
localStorage.setItem('userData', JSON.stringify(res.data.data))
account.value = res.data.logonUser
userId.value = res.data.userId
userName.value = res.data.userName
userData.value = JSON.stringify(res.data.data)
return getUserInfo().then((info: any) => {
// userData.value = JSON.stringify(res.data.data);
currentTenantGuid.value = res.data.tenantInfoList && res.data.tenantInfoList.length ? res.data.tenantInfoList[0].guid : '';
let currentTenant = res.data.tenantInfoList?.[0];
return getSystemMenu({ tenantGuid: currentTenantGuid.value }).then((info: any) => {
if (info.code == '00000') {
localStorage.setItem('userInfoData', JSON.stringify(info.data))
userInfoData.value = info.data
localStorage.setItem('userName', currentTenant?.name)
localStorage.setItem('userInfoData', JSON.stringify(info.data));
userInfoData.value = info.data;
} else {
ElMessage.error(info.msg)
}
......
......@@ -20,68 +20,7 @@ const userStore = useUserStore();
const userData = JSON.parse(userStore.userData);
const assetStore = useDataAssetStore();
const step = ref(0);
const selectIndex = ref(0);
const asideSearchInput = ref("");
const permissionList: any = ref([])
const listLoading = ref(false)
const listPage = ref({
limit: 50,
curr: 1,
totalPages: 0
})
const currpermissionList: any = ref([
{
"guid": "62d01ad586774db2bb3955dfb2d18366",
"productGuid": null,
"productName": null,
"dataPermissionName": "当前用户",
"bizState": "Y",
"createUserName": "数往知来管理员",
"createTime": "2024-01-24 14:08:43",
"sqlScript": null,
"dataSourceGuid": null
},
{
"guid": "d68a27c1998540a2b8e8f22a2d5eebef",
"productGuid": null,
"productName": null,
"dataPermissionName": "组织权限",
"bizState": "Y",
"createUserName": "数往知来管理员",
"createTime": "2024-01-24 11:47:02",
"sqlScript": null,
"dataSourceGuid": null
}
])
const templateInfo = ref({
title: '医疗数据分类分级模板',
descGroup: [
{ label: '模型确认人', value: '管理员 ' },
{ label: '模型确认时间', value: '2021-12-12 09:12:13' },
],
tags: [
{ type: 'info', name: '医疗行业分类' },
{ type: 'success', name: '五级' },
{ type: 'primary', name: 'V5' },
],
desc: '适用于各级医疗机构、卫生健康管理部门、公共卫生服务机构、相关专项业务服务机构、相关信息技术服务机构等开展医疗健康数据分类分级。适用于各级医疗机构、卫生健康管理部门、公共卫生服务机构、相关专项业务服务机构、相关信息技术服务机构等开展医疗健康数据分类分级。适用于各级医疗机构、卫生健康。'
})
const treeIndex: any = ref({})
const treeInfo = ref({
id: "data-pickup-tree",
filter: true,
queryValue: "",
queryPlaceholder: "输入组织名称搜索",
props: {
label: "organisationName",
value: "guid",
},
nodeKey: 'guid',
expandedKey: [],
expandOnNodeClick: false,
data: [
const data1 = [
{
"children": [
{
......@@ -363,7 +302,70 @@ const treeInfo = ref({
"levelCode": "8",
"displayCreateTime": "2024-01-16 11:38:24"
}
]
const step = ref(0);
const selectIndex = ref(0);
const asideSearchInput = ref("");
const permissionList: any = ref([])
const listLoading = ref(false)
const listPage = ref({
limit: 50,
curr: 1,
totalPages: 0
})
const currpermissionList: any = ref([
{
"guid": "62d01ad586774db2bb3955dfb2d18366",
"productGuid": null,
"productName": null,
"dataPermissionName": "当前用户",
"bizState": "Y",
"createUserName": "数往知来管理员",
"createTime": "2024-01-24 14:08:43",
"sqlScript": null,
"dataSourceGuid": null
},
{
"guid": "d68a27c1998540a2b8e8f22a2d5eebef",
"productGuid": null,
"productName": null,
"dataPermissionName": "组织权限",
"bizState": "Y",
"createUserName": "数往知来管理员",
"createTime": "2024-01-24 11:47:02",
"sqlScript": null,
"dataSourceGuid": null
}
])
const templateInfo = ref({
title: '医疗数据分类',
descGroup: [
{ label: '模型确认人', value: '管理员 ' },
{ label: '模型确认时间', value: '2021-12-12 09:12:13' },
],
tags: [
{ type: 'info', name: '医疗行业分类' },
{ type: 'success', name: '五级' },
{ type: 'primary', name: 'V5' },
],
desc: '适用于各级医疗机构、卫生健康管理部门、公共卫生服务机构、相关专项业务服务机构、相关信息技术服务机构等开展医疗健康数据分类分级。适用于各级医疗机构、卫生健康管理部门、公共卫生服务机构、相关专项业务服务机构、相关信息技术服务机构等开展医疗健康数据分类分级。适用于各级医疗机构、卫生健康。'
})
const treeIndex: any = ref({})
const treeInfo = ref({
id: "data-pickup-tree",
filter: true,
queryValue: "",
queryPlaceholder: "输入组织名称搜索",
props: {
label: "organisationName",
value: "guid",
},
nodeKey: 'guid',
expandedKey: [],
expandOnNodeClick: false,
data: data1 || [],
});
const expand1 = ref(true)
......@@ -436,6 +438,8 @@ const tableInfo = ref({
const metadataTableInfo = ref({
id: "metadata-table",
multiple: true,
rowKey: 'guid',
fields: [
{ label: "序号", type: "index", width: 56, align: "center", fixed: "left" },
{ label: "数据库名称", field: "damCode", width: 200 },
......@@ -607,7 +611,7 @@ onBeforeMount(() => {
<template>
<div class="container_wrap full flex">
<div class="aside_wrap" v-show="step == 0">
<div class="aside_title">选择分类分级模板</div>
<div class="aside_title">选择分类</div>
<div class="aside_search">
<el-input v-model.trim="asideSearchInput" placeholder="请输入关键字" :prefix-icon="Search" clearable
@change="querySearch" />
......@@ -773,9 +777,11 @@ onBeforeMount(() => {
}
.panel_desc {
margin: 8px 0;
margin: 8px 0 16px;
font-size: 14px;
color: #666;
line-height: 1.5;
text-align: justify;
}
}
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!