Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
csbr-daop
/
fe-data-trusted-space
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
4dff1f01
authored
2026-04-08 13:53:07 +0800
by
lihua
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
连接器注销后进入系统,只提示一次无法使用
1 parent
6dd3525f
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
126 additions
and
25 deletions
src/api/modules/dataRequire.ts
src/api/modules/queryService.ts
src/layouts/components/Tools/index.vue
src/store/modules/user.ts
src/utils/request.ts
src/views/data_asset/productApplicationManage.vue
src/views/data_facilitator/authenticationManagement.vue
src/views/data_facilitator/certificationAuditDetail.vue
src/views/data_product/productListing.vue
src/views/data_service/dataSource.vue
src/views/data_smart_contract/smartContractCreate.vue
src/api/modules/dataRequire.ts
View file @
4dff1f0
...
...
@@ -141,6 +141,12 @@ export const getConnectorDetail = (guid) => request({
method
:
'get'
})
/** 获取当前连接器状态 */
export
const
getConnectorStatus
=
()
=>
request
({
url
:
`
${
import
.
meta
.
env
.
VITE_APP_DIGITAL_CONTRACT_URL
}
/tds-connector-identity/get-connector`
,
method
:
'get'
})
/** 判断当前用户企业是否已申请连接器 */
export
const
checkConnector
=
()
=>
request
({
url
:
`
${
import
.
meta
.
env
.
VITE_APP_DIGITAL_CONTRACT_URL
}
/tds-connector-identity/check-connector `
,
...
...
src/api/modules/queryService.ts
View file @
4dff1f0
...
...
@@ -318,6 +318,12 @@ export const getCurrentUserInfo = (params) => {
});
};
/** 管理员连接器注销 */
export
const
stopLogonUserConnector
=
()
=>
request
({
url
:
`
${
import
.
meta
.
env
.
VITE_APP_PERSONAL_URL
}
/tenant/connect/log-out`
,
method
:
'get'
})
/** 下载文件模板 */
export
const
exportTemplate
=
(
params
)
=>
request
({
url
:
`
${
import
.
meta
.
env
.
VITE_APP_ADD_FILE
}
/import-config/export-template?bizGuid=
${
params
.
bizGuid
}
&importType=
${
params
.
importType
}
`
,
...
...
src/layouts/components/Tools/index.vue
View file @
4dff1f0
...
...
@@ -5,13 +5,17 @@ import useSettingsStore from '@/store/modules/settings'
import
useUserStore
from
'@/store/modules/user'
import
{
USERROLE
}
from
'@/utils/enum'
import
{
ElMessage
}
from
'element-plus'
import
{
stopLogonUserConnector
}
from
'@/api/modules/queryService'
const
router
=
useRouter
()
const
settingsStore
=
useSettingsStore
()
const
userStore
=
useUserStore
()
const
userData
=
JSON
.
parse
(
userStore
.
userData
);
const
tenantInfo
=
JSON
.
parse
(
localStorage
.
getItem
(
'tenantInfo'
)
||
'{}'
);
const
mainPage
=
useMainPage
()
const
{
isFullscreen
,
toggle
}
=
useFullscreen
()
const
{
proxy
}
=
getCurrentInstance
()
as
any
;
const
dataRole
=
computed
(()
=>
{
return
localStorage
.
getItem
(
'userRole'
);
})
...
...
@@ -19,7 +23,7 @@ const dataRole = computed(() => {
/** 记录用户选择的角色 */
const
selectRole
:
any
=
ref
(
USERROLE
.
USE
);
//TODO,在专区需要默认值是平台运营方。
function
userCommand
(
command
:
'home'
|
'setting'
|
'updatePwd'
|
'hotkeys'
|
'logout'
|
'changeRole'
)
{
function
userCommand
(
command
:
'home'
|
'setting'
|
'updatePwd'
|
'hotkeys'
|
'logout'
|
'changeRole'
|
'stopConnector'
)
{
switch
(
command
)
{
case
'home'
:
router
.
push
({
...
...
@@ -46,8 +50,32 @@ function userCommand(command: 'home' | 'setting' | 'updatePwd' | 'hotkeys' | 'lo
selectRole
.
value
=
dataRole
.
value
;
verifyDialogInfo
.
value
.
visible
=
true
;
break
;
case
'stopConnector'
:
stopConnector
()
break
;
}
}
function
stopConnector
()
{
proxy
.
$openMessageBox
(
"是否确认注销当前连接器?"
,
"warning"
,
()
=>
{
stopLogonUserConnector
().
then
((
res
:
any
)
=>
{
if
(
res
?.
code
==
'00000'
)
{
localStorage
.
setItem
(
'isLogOutConnector'
,
'Y'
);
userStore
.
isLogOutConnector
=
'Y'
;
ElMessage
({
type
:
"success"
,
message
:
"连接器注销成功"
,
});
}
});
},
()
=>
{
ElMessage
({
type
:
"info"
,
message
:
"已取消"
,
});
})
}
function
pro
()
{
window
.
open
(
'https://hooray.gitee.io/fantastic-admin-pro-example/'
,
'_blank'
)
}
...
...
@@ -158,6 +186,19 @@ const verifyDialogBtnClick = (btn, info) => {
<
/span
>
<
/div
>
<
/div
>
<
template
v
-
if
=
"tenantInfo?.logonUser == userData?.mobileNo"
>
<
div
class
=
"horizontal-line"
><
/div
>
<
div
class
=
"user-setting-menu"
>
<
div
class
=
"menu-wrapper"
@
click
=
"userCommand('stopConnector')"
>
<
span
class
=
"color-21"
>
连接器注销
<
/span
>
<
span
>
<
el
-
icon
>
<
svg
-
icon
name
=
"ep:arrow-right"
/>
<
/el-icon
>
<
/span
>
<
/div
>
<
/div
>
<
/template
>
<
div
class
=
"horizontal-line"
><
/div
>
<
div
class
=
"login-out"
>
<
div
class
=
"login-out-btn"
@
click
=
"userCommand('logout')"
>
...
...
src/store/modules/user.ts
View file @
4dff1f0
...
...
@@ -6,6 +6,7 @@ import { ElMessage } from 'element-plus'
import
apiUser
from
'@/api/modules/user'
import
{
getCurrentTime
}
from
'@/utils/common'
import
{
getSystemMenu
,
getUserInfo
,
getTokenByCode
,
loginOut
,
refreshToken
,
editPasswordInterface
,
getCurrentUserInfo
,
getTenantDetailInfo
}
from
'@/api/modules/queryService'
import
{
getConnectorStatus
}
from
'@/api/modules/dataRequire'
const
useUserStore
=
defineStore
(
// 唯一ID
...
...
@@ -26,6 +27,8 @@ const useUserStore = defineStore(
const
permissions
=
ref
<
string
[]
>
([])
const
isLoginOut
=
ref
(
false
);
const
isLogin
=
ref
(
token
.
value
?
true
:
false
);
//退出登录。
//当前连接器是否已注销
const
isLogOutConnector
=
ref
(
localStorage
.
isLogOutConnector
??
'N'
);
const
getTokenPromise
:
any
=
ref
(
null
);
/* idass的登录页面url,退出登录需要跳转到登录页。*/
const
idassLoginUrl
=
import
.
meta
.
env
.
VITE_IDASS_BASEURL
;
...
...
@@ -64,6 +67,14 @@ const useUserStore = defineStore(
ElMessage
.
error
(
res
.
msg
)
}
})
getConnectorStatus
().
then
((
res
:
any
)
=>
{
if
(
res
.
code
==
'00000'
)
{
isLogOutConnector
.
value
=
res
.
data
?.
isLogOut
||
'N'
;
localStorage
.
setItem
(
'isLogOutConnector'
,
isLogOutConnector
.
value
);
}
else
{
// 暂不弹错误提示
}
})
return
getCurrentUserInfo
({
tenantGuid
:
currentTenantGuid
.
value
}).
then
((
res
:
any
)
=>
{
console
.
log
(
res
,
'getCurrentUserInfo'
);
if
(
res
.
code
==
'00000'
)
{
...
...
@@ -358,6 +369,7 @@ const useUserStore = defineStore(
isLogin
,
isGetCurrUserInfo
,
isLoginOut
,
isLogOutConnector
,
getTokenPromise
,
getToken
,
getUserSystemMenuByRole
,
...
...
src/utils/request.ts
View file @
4dff1f0
...
...
@@ -3,6 +3,7 @@ import Storage from './composables/storage-helper';
import
CryptoHelper
from
'./composables/cryptoJs-helper'
;
import
{
ElMessage
}
from
'element-plus'
import
useUserStore
from
'@/store/modules/user'
import
router
from
'@/router'
const
CANCELTTYPE
=
{
CACHE
:
1
,
...
...
@@ -13,8 +14,9 @@ interface Request {
source
:
CancelTokenSource
;
}
const
pendingRequests
:
Request
[]
=
[];
const
storage
=
new
Storage
();
const
cryptoHelper
=
new
CryptoHelper
(
'cacheKey'
);
// 记录当前提示过的路由,用于判断是否需要重复提示
let
currentNotifiedRoute
:
string
|
null
=
null
;
const
service
=
axios
.
create
({
baseURL
:
(
import
.
meta
.
env
.
VITE_OPEN_PROXY
===
'true'
)
?
`/api/`
:
`
${
import
.
meta
.
env
.
VITE_API_BASEURL
}
`
,
...
...
@@ -33,6 +35,48 @@ service.interceptors.request.use(
const
source
=
axios
.
CancelToken
.
source
();
config
.
headers
.
tenant
=
localStorage
.
getItem
(
'currentTenantGuid'
);
//会员guid先写死
config
.
cancelToken
=
source
.
token
;
// 检查isLogOutConnector为Y的情况
const
isLogOutConnector
=
localStorage
.
getItem
(
'isLogOutConnector'
);
if
(
isLogOutConnector
===
'Y'
)
{
// 使用router.currentRoute.value获取当前路由信息
const
currentRoute
=
router
.
currentRoute
.
value
;
const
routePath
=
currentRoute
.
path
;
// 检查api的url是否包含/connector-invoke
if
(
config
.
url
.
includes
(
'/connector-invoke'
))
{
try
{
// 检查路由的meta配置中editPage是否为true
if
(
currentRoute
.
meta
?.
editPage
===
true
||
routePath
.
includes
(
'data-product/product-catalog'
))
{
//产品目录功能比较特殊。
// 确保同一个路由只提示一次,但路由切换后再次回来需要重新提示
if
(
currentNotifiedRoute
!==
routePath
)
{
ElMessage
({
message
:
'连接器已注销,无法使用该功能'
,
type
:
'error'
,
});
currentNotifiedRoute
=
routePath
;
}
// 取消请求
source
.
cancel
(
JSON
.
stringify
({
type
:
CANCELTTYPE
.
REPEAT
,
data
:
'连接器已注销,取消请求'
,
}));
}
else
{
// 取消请求
source
.
cancel
(
JSON
.
stringify
({
type
:
CANCELTTYPE
.
REPEAT
,
data
:
'连接器已注销,取消请求'
,
}));
}
}
catch
(
error
)
{
// 路由获取失败时的处理
console
.
error
(
'获取路由信息失败:'
,
error
);
}
}
else
{
if
(
currentNotifiedRoute
!==
routePath
)
{
currentNotifiedRoute
=
null
;
}
}
}
if
(
config
.
method
===
"postfile"
)
{
config
.
method
=
"post"
;
config
.
headers
=
Object
.
assign
({},
config
.
headers
,
{
...
...
@@ -79,7 +123,7 @@ service.interceptors.request.use(
// }));
// }
/** 若是门户的url,则不做重复请求处理,会出现不同标签页都需要查同一个字典参数列表的 */
if
(
config
.
url
.
indexOf
(
'/portal/portal'
))
{
if
(
config
.
url
.
indexOf
(
'/portal/portal'
)
>
-
1
)
{
config
.
headers
.
Authorization
=
localStorage
.
getItem
(
'token'
);
config
.
headers
[
'real-ip'
]
=
localStorage
.
getItem
(
'ipAddress'
);
return
config
;
...
...
src/views/data_asset/productApplicationManage.vue
View file @
4dff1f0
...
...
@@ -306,11 +306,11 @@ onBeforeMount(() => {
getDamTypesList
({
dictType
:
"资产类型"
,
}).
then
((
res
:
any
)
=>
{
if
(
res
.
code
==
proxy
.
$passCode
)
{
damTypes
.
value
=
res
.
data
||
[];
if
(
res
?
.
code
==
proxy
.
$passCode
)
{
damTypes
.
value
=
res
?
.
data
||
[];
searchItemList
.
value
[
1
].
options
=
damTypes
.
value
;
}
else
{
proxy
.
$ElMessage
.
error
(
res
.
msg
);
res
?.
msg
&&
proxy
.
$ElMessage
.
error
(
res
.
msg
);
}
})
})
...
...
src/views/data_facilitator/authenticationManagement.vue
View file @
4dff1f0
...
...
@@ -868,7 +868,7 @@ const getUserTenantInfo = () => {
}
})
}
else
{
ElMessage
.
error
(
res1
.
msg
);
res1
?.
msg
&&
ElMessage
.
error
(
res1
.
msg
);
}
// 处理公司信息
let
res
=
resInfos
?.[
1
];
...
...
src/views/data_facilitator/certificationAuditDetail.vue
View file @
4dff1f0
...
...
@@ -649,7 +649,7 @@ const promiseList = async (...promises: (() => Promise<void>)[]) => {
const
getDataType
=
async
(
dictType
,
fieldName
)
=>
{
try
{
const
res
:
any
=
await
getParamsList
({
dictType
});
if
(
res
.
code
===
proxy
.
$passCode
)
{
if
(
res
?
.
code
===
proxy
.
$passCode
)
{
const
data
=
res
.
data
||
[];
typeMap
.
value
[
fieldName
]
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
if
(
fieldName
==
'tenantType'
||
fieldName
==
'institutionType'
)
{
...
...
@@ -665,7 +665,7 @@ const getDataType = async (dictType, fieldName) => {
}
}
}
else
{
proxy
.
$ElMessage
.
error
(
res
.
msg
);
res
?.
msg
&&
proxy
.
$ElMessage
.
error
(
res
.
msg
);
}
}
catch
(
error
)
{
throw
error
;
// 将错误向上抛出
...
...
@@ -790,7 +790,6 @@ const setFormItems = () => {
// 获取详情
const
getDetail
=
async
()
=>
{
try
{
const
res1
:
any
=
await
getParamsList
({
dictType
:
'开发主体附件类型'
});
if
(
res1
?.
code
===
proxy
.
$passCode
)
{
uploadFileList
.
value
=
res1
.
data
||
[];
...
...
@@ -808,10 +807,10 @@ const getDetail = async () => {
}
})
}
else
{
proxy
.
$ElMessage
.
error
(
res1
.
msg
);
res1
?.
msg
&&
proxy
.
$ElMessage
.
error
(
res1
.
msg
);
}
const
res
:
any
=
await
getEnterpriseDetail
({
guid
:
bizGuid
});
if
(
res
.
code
===
proxy
.
$passCode
)
{
if
(
res
?
.
code
===
proxy
.
$passCode
)
{
const
data
=
res
.
data
||
{};
deploymentId
.
value
=
''
;
processInstanceId
.
value
=
''
;
...
...
@@ -840,16 +839,12 @@ const getDetail = async () => {
item
.
disabled
=
true
;
})
}
else
{
proxy
.
$ElMessage
.
error
(
res
.
msg
);
}
}
catch
(
error
)
{
throw
error
;
// 将错误向上抛出
res
?.
msg
&&
proxy
.
$ElMessage
.
error
(
res
.
msg
);
}
}
// 获取变更详情
const
getChangeDetail
=
async
()
=>
{
try
{
const
res
:
any
=
await
getLastChange
(
bizGuid
);
if
(
res
.
code
===
proxy
.
$passCode
)
{
const
data
=
res
.
data
||
{};
...
...
@@ -860,9 +855,6 @@ const getChangeDetail = async () => {
}
else
{
proxy
.
$ElMessage
.
error
(
res
.
msg
);
}
}
catch
(
error
)
{
throw
error
;
// 将错误向上抛出
}
}
const
setTableField
=
()
=>
{
...
...
@@ -1314,7 +1306,7 @@ const viewVoucherFile = () => {
@
expand=
"(v) => expand7 = v"
>
<Table
ref=
"orgsTableRef"
:tableInfo=
"orgTableInfo"
class=
"fiveRow-table"
/>
</ContentWrap>
<ContentWrap
id=
"id-files"
title=
"开发主体附件信息"
description=
""
expandSwicth
style=
"margin-top: 15px"
<ContentWrap
id=
"id-files"
v-show=
"uploadFormItems?.length"
title=
"开发主体附件信息"
description=
""
expandSwicth
style=
"margin-top: 15px"
:isExpand=
"uploadInfoExpand"
@
expand=
"(v) => uploadInfoExpand = v"
>
<Form
class=
'uploadForm'
ref=
"uploadFormRef"
:itemList=
"uploadFormItems"
formId=
"upload-form"
:rules=
"uploadFormRules"
col=
"col2"
/>
...
...
src/views/data_product/productListing.vue
View file @
4dff1f0
...
...
@@ -624,13 +624,13 @@ onBeforeMount(() => {
getDamTypesList
({
dictType
:
"资产类型"
,
}).
then
((
res
:
any
)
=>
{
if
(
res
.
code
==
proxy
.
$passCode
)
{
if
(
res
?
.
code
==
proxy
.
$passCode
)
{
damTypes
.
value
=
res
.
data
||
[];
searchItemList
.
value
[
1
].
options
=
damTypes
.
value
;
// let item = searchItemList.value.find(item => item.field == 'damType');
// item && (item.options = damTypes.value);
}
else
{
proxy
.
$ElMessage
.
error
(
res
.
msg
);
res
?.
msg
&&
proxy
.
$ElMessage
.
error
(
res
.
msg
);
}
})
// 连接器没有通过和驳回,不需要审批通过时填写合规信息。
...
...
src/views/data_service/dataSource.vue
View file @
4dff1f0
...
...
@@ -1022,7 +1022,7 @@ const getFirstPageData = () => {
};
onMounted
(()
=>
{
getParamsList
({
dictType
:
"业务系统"
}).
then
((
res
)
=>
{
flowList
.
value
=
res
.
data
flowList
.
value
=
res
?.
data
||
[]
contents
.
value
.
normal
.
items
[
3
].
options
=
flowList
.
value
})
})
...
...
src/views/data_smart_contract/smartContractCreate.vue
View file @
4dff1f0
...
...
@@ -850,7 +850,7 @@ onBeforeMount(() => {
nodeInfoFormItems
.
value
[
1
].
default
=
''
;
//如果是中介的话,不能选择自己吧。
}
}
getContractDataProduct
(
userData
.
tenantGuid
).
then
((
res
:
any
)
=>
{
userStore
.
isLogOutConnector
!=
'Y'
&&
getContractDataProduct
(
userData
.
tenantGuid
).
then
((
res
:
any
)
=>
{
if
(
res
?.
code
==
proxy
.
$passCode
)
{
productList
.
value
=
res
.
data
||
[];
productTableInfo
.
value
.
editInfo
.
dataProductId
.
options
=
productList
.
value
;
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment