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
2c58d9fe
authored
2025-01-03 09:44:57 +0800
by
lxs
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'develop' of
http://117.78.60.236:8000/csbr-daop/fe-data-asset-management
into develop
2 parents
19a713f9
6429bf56
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
233 additions
and
112 deletions
src/api/modules/dataInventory.ts
src/views/data_inventory/classifyGradeCatalogue.vue
src/views/data_inventory/configureRules.vue
src/views/data_inventory/dictionary.vue
src/views/data_inventory/tableCreateExisting.vue
src/views/data_inventory/tableCreateFile.vue
src/api/modules/dataInventory.ts
View file @
2c58d9f
...
...
@@ -49,11 +49,11 @@ export const checkDeleteDictionaryScheme = (params) => request({
data
:
params
})
// 分页查询
//
export const getDictionary = (params) => request({
//
url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/data-dictionary-general/page-list`,
//
method: 'post',
//
data: params
//
})
export
const
getDictionary
=
(
params
)
=>
request
({
url
:
`
${
import
.
meta
.
env
.
VITE_APP_PLAN_BASEURL
}
/data-dictionary-general/page-list`
,
method
:
'post'
,
data
:
params
})
// 查询数据字典启用状态的数据
export
const
getDictionaryAll
=
(
params
)
=>
request
({
url
:
`
${
import
.
meta
.
env
.
VITE_APP_PLAN_BASEURL
}
/data-dictionary-general/list-all`
,
...
...
@@ -598,10 +598,10 @@ export const filterVal = (val, type) => {
/** 获取字典列表
* VITE_APP_PLAN_BASEURL 为环境变量 现在只是mock数据
*/
export
const
getDictionary
=
(
params
)
=>
request
({
url
:
`
${
import
.
meta
.
env
.
VITE_APP_CHECK_BASEURL
}
/data-dictionary-general/list-all?state=1`
,
method
:
'post'
})
//
export const getDictionary = (params) => request({
//
url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/data-dictionary-general/list-all?state=1`,
//
method: 'post'
//
})
...
...
src/views/data_inventory/classifyGradeCatalogue.vue
View file @
2c58d9f
...
...
@@ -24,7 +24,8 @@ import {
getDbDirDetail
,
getDbDirTableSelectList
,
getDbDirFieldSelectList
,
updateDataAsset
updateDataAsset
,
getDictionaryAll
}
from
'@/api/modules/dataInventory'
;
import
{
TableColumnWidth
}
from
"@/utils/enum"
;
import
router
from
"@/router"
;
...
...
@@ -34,6 +35,10 @@ import { getLabelList } from "@/api/modules/dataLabel";
const
currentPath
=
ref
<
string
[]
>
([]);
const
{
proxy
}
=
getCurrentInstance
()
as
any
;
const
route
=
useRoute
();
// 分级引用refGradeGuid
const
refGradeGuid
=
ref
(
''
);
// 初始分类classifyDetailGuid
const
classifyDetailGuidInfo
=
ref
(
''
);
// 分级分类树形列表
const
CgDirTreeList
=
ref
();
const
getCgDirTreeData
=
async
()
=>
{
...
...
@@ -48,7 +53,9 @@ const getCgDirTreeData = async () => {
currentPath
.
value
=
[
res
.
data
[
0
].
classifyName
];
treeInfo
.
value
.
expandedKey
.
push
(
res
.
data
[
0
].
classifyDetailGuid
);
treeInfo
.
value
.
currentNodeKey
=
res
.
data
[
0
].
classifyDetailGuid
;
classifyDetailGuidInfo
.
value
=
res
.
data
[
0
].
classifyDetailGuid
;
searchItemList
.
value
[
1
].
options
=
res
.
data
;
refGradeGuid
.
value
=
res
.
data
[
0
].
refGradeGuid
;
treeInfo
.
value
.
loading
=
false
;
}
else
{
proxy
.
$ElMessage
.
error
(
res
.
msg
);
...
...
@@ -63,8 +70,9 @@ const getCgDirFieldPage = async (params = {}) => {
pageIndex
:
1
,
pageSize
:
50
,
execGuid
:
''
,
classifyDetail
:
''
,
gradeDetailGuid
:
''
,
classifyDetail
:
''
,
// 分类guid
gradeDetailGuid
:
''
,
// 分级guid
labelGuid
:
''
,
databaseGuid
:
''
,
tableGuid
:
''
,
fieldGuid
:
''
,
...
...
@@ -84,8 +92,9 @@ const getCgDirFieldPage = async (params = {}) => {
};
const
dictionaryList
=
ref
([]);
const
getDictionaryList
=
()
=>
{
getDictionary
({
}).
then
((
res
:
any
)
=>
{
getDictionary
All
({
state
:
1
}).
then
((
res
:
any
)
=>
{
dictionaryList
.
value
=
[];
if
(
res
.
code
==
proxy
.
$passCode
)
{
dictionaryList
.
value
=
res
.
data
||
[];
...
...
@@ -112,11 +121,13 @@ onMounted(async () => {
await
getExecGuid
();
await
getCgDirTreeData
();
await
getCgDirFieldPage
({
execGuid
:
execGuidInfo
.
value
.
execGuid
execGuid
:
execGuidInfo
.
value
.
execGuid
,
classifyDetail
:
classifyDetailGuidInfo
.
value
});
getDictionaryList
();
getSearchTableList
();
getLabelListData
();
getGradeData
(
refGradeGuid
.
value
);
})
...
...
@@ -159,7 +170,7 @@ const searchItemList = ref([
options
:
[],
props
:
{
label
:
'label'
,
value
:
'
label
'
,
value
:
'
guid
'
,
},
clearable
:
true
,
filterable
:
true
,
...
...
@@ -176,7 +187,7 @@ const searchItemList = ref([
lazy
:
false
,
props
:
{
label
:
"classifyName"
,
value
:
"classify
Name
"
,
value
:
"classify
DetailGuid
"
,
},
block
:
false
,
filterable
:
false
,
...
...
@@ -192,7 +203,7 @@ const searchItemList = ref([
options
:
[],
props
:
{
label
:
'name'
,
value
:
'
name
'
,
value
:
'
guid
'
,
},
clearable
:
true
,
},
...
...
@@ -207,16 +218,15 @@ const toSearch = (val: any, clear: boolean = false) => {
selectedC
.
value
=
null
;
searchItemList
.
value
.
map
(
item
=>
item
.
default
=
''
)
}
console
.
log
(
'toSearch'
,
val
);
// 差一个label标签 -- 未完成
console
.
log
(
'toSearch'
,
val
,
classifyDetailGuidInfo
.
value
);
if
(
activeName
.
value
===
'first'
)
{
getCgDirFieldPage
({
pageIndex
:
1
,
pageSize
:
50
,
execGuid
:
execGuidInfo
.
value
.
execGuid
,
classifyDetail
:
val
.
classifyNam
e
,
classifyDetail
:
classifyDetailGuidInfo
.
valu
e
,
gradeDetailGuid
:
val
.
levelName
,
label
:
val
.
labelName
,
label
Guid
:
val
.
labelName
,
databaseGuid
:
selectedA
.
value
,
tableGuid
:
selectedB
.
value
,
fieldGuid
:
selectedC
.
value
,
...
...
@@ -227,12 +237,11 @@ const toSearch = (val: any, clear: boolean = false) => {
pageIndex
:
1
,
pageSize
:
50
,
execGuid
:
execGuidInfo
.
value
.
execGuid
,
database
:
selectedA
.
value
||
''
,
tableName
:
selectedB
.
value
||
''
,
fieldName
:
selectedC
.
value
||
''
,
classifyDetailName
:
val
.
classifyName
,
gradeDetailName
:
val
.
levelName
,
label
:
val
.
labelName
,
tableGuid
:
selectedB
.
value
||
tableGuid
.
value
||
''
,
databaseGuid
:
selectedA
.
value
||
dataBaseGuid
.
value
||
''
,
classifyDetailGuid
:
val
.
classifyName
,
gradeDetailGuid
:
val
.
levelName
,
labelGuid
:
val
.
labelName
,
});
}
if
(
activeName
.
value
===
'second'
&&
activeTab
.
value
===
'word'
)
{
...
...
@@ -240,11 +249,12 @@ const toSearch = (val: any, clear: boolean = false) => {
pageIndex
:
1
,
pageSize
:
50
,
execGuid
:
execGuidInfo
.
value
.
execGuid
,
database
:
selectedA
.
value
||
''
,
tableName
:
selectedB
.
value
||
''
,
classifyDetailName
:
val
.
classifyName
,
gradeDetailName
:
val
.
levelName
,
label
:
val
.
labelName
,
tableGuid
:
selectedB
.
value
||
tableGuid
.
value
||
''
,
databaseGuid
:
selectedA
.
value
||
dataBaseGuid
.
value
||
''
,
fieldGuid
:
selectedC
.
value
||
''
,
classifyDetailGuid
:
val
.
classifyName
,
gradeDetailGuid
:
val
.
levelName
,
labelGuid
:
val
.
labelName
,
});
}
};
...
...
@@ -253,8 +263,10 @@ const toSearch = (val: any, clear: boolean = false) => {
const
nodeClick
=
async
(
data
:
any
)
=>
{
console
.
log
(
'nodeClick'
,
data
);
const
{
guid
,
classifyDetailGuid
,
refGradeGuid
}
=
data
getGradeData
(
refGradeGuid
);
classifyDetailGuidInfo
.
value
=
classifyDetailGuid
;
// getGradeData(refGradeGuid);
searchItemList
.
value
[
1
].
default
=
data
.
classifyName
;
await
getCgDirFieldPage
({
execGuid
:
execGuidInfo
.
value
.
execGuid
,
classifyDetail
:
classifyDetailGuid
,
...
...
@@ -368,7 +380,8 @@ const tablePageChange = (info) => {
getCgDirFieldPage
({
pageIndex
:
info
.
curr
,
pageSize
:
info
.
limit
,
execGuid
:
execGuidInfo
.
value
.
execGuid
execGuid
:
execGuidInfo
.
value
.
execGuid
,
classifyDetail
:
classifyDetailGuidInfo
.
value
});
}
...
...
@@ -403,11 +416,13 @@ const tableCheckboxAllSelectChange = (select) => {
// 批量配置业务规则
const
batchControlRules
=
()
=>
{
console
.
log
(
'selectedRulesData'
,
selectedRulesData
.
value
);
// 判断是否选中数据
if
(
!
selectedRulesData
.
value
||
!
selectedRulesData
.
value
.
guids
||
selectedRulesData
.
value
.
guids
.
length
==
0
)
{
proxy
.
$ElMessage
.
warning
(
'请选择数据'
);
return
;
}
drawerInfo
.
value
.
visible
=
true
;
classEditFormItems
.
value
[
0
].
default
=
selectedRulesData
.
value
.
rulesName
;
}
...
...
@@ -471,7 +486,7 @@ const dataBaseTableInfo = ref({
return
status
==
0
?
'草稿中'
:
status
==
1
?
'已建表'
:
'已有默认表'
;
}
},
{
label
:
"任务修改人"
,
field
:
"
u
pdateUserName"
,
width
:
100
},
{
label
:
"任务修改人"
,
field
:
"
taskU
pdateUserName"
,
width
:
100
},
{
label
:
"修改时间"
,
field
:
"updateTime"
,
width
:
TableColumnWidth
.
DATETIME
},
{
label
:
"描述"
,
field
:
"description"
,
width
:
120
,
align
:
'center'
},
{
label
:
"规划数据资产"
,
field
:
"isDataAsset"
,
type
:
'switch'
,
activeText
:
'是'
,
inactiveText
:
'否'
,
activeValue
:
'Y'
,
inactiveValue
:
'N'
,
switchWidth
:
56
,
width
:
120
,
align
:
'center'
},
...
...
@@ -778,22 +793,20 @@ const drawerBtnClick = async (btn, info) => {
execGuid
:
execGuidInfo
.
value
.
execGuid
})
});
// const params = {
// fieldPrecision,
// dictionaryGuid,
// isUnique,
// isNotNull,
// fieldLengthCondition,
// fieldValueRange,
// fieldGuid: selectedRulesData.value.guids,
// execGuid: execGuidInfo.value.execGuid
// }
const
res
:
any
=
await
saveBizRuleConfig
(
params
);
if
(
res
.
code
==
proxy
.
$passCode
)
{
btn
.
loading
=
false
;
proxy
.
$ElMessage
.
success
(
'配置成功!'
);
drawerInfo
.
value
.
visible
=
false
;
getCgDirFieldPage
();
getCgDirFieldPage
({
execGuid
:
execGuidInfo
.
value
.
execGuid
,
classifyDetail
:
classifyDetailGuidInfo
.
value
,
gradeDetailGuid
:
levelGuidInfo
.
value
,
labelGuid
:
labelGuidInfo
.
value
,
databaseGuid
:
selectedA
.
value
,
tableGuid
:
selectedB
.
value
,
fieldGuid
:
selectedC
.
value
,
});
}
else
{
btn
.
loading
=
false
;
proxy
.
$ElMessage
.
error
(
res
.
msg
);
...
...
@@ -817,6 +830,7 @@ const handleClick = (tab: any) => {
console
.
log
(
tab
.
props
.
name
);
activeName
.
value
=
tab
.
props
.
name
;
if
(
tab
.
props
.
name
===
'second'
)
{
classifyDetailGuidInfo
.
value
=
''
;
selectedA
.
value
=
null
;
selectedB
.
value
=
null
;
selectedC
.
value
=
null
;
...
...
@@ -845,8 +859,7 @@ const getDataBaseTreeData = async () => {
dataBaseTreeInfo
.
value
.
loading
=
true
;
const
res
:
any
=
await
getDbDirTreeList
({});
if
(
res
.
code
==
proxy
.
$passCode
)
{
const
dataArray
=
[
res
.
data
];
console
.
log
(
'dataArray'
,
dataArray
,
typeof
dataArray
);
const
dataArray
=
res
.
data
;
// 遍历并添加 GUIDs
dataArray
.
forEach
(
addGuids
);
// 更新到绑定的响应式数据
...
...
@@ -865,11 +878,7 @@ const addGuids = (node) => {
}
else
if
(
node
.
tableGuid
)
{
node
.
guid
=
node
.
tableGuid
;
node
.
name
=
node
.
tableChName
;
}
else
{
node
.
guid
=
'1'
;
node
.
name
=
node
.
cgDirName
;
}
if
(
node
.
children
&&
Array
.
isArray
(
node
.
children
))
{
node
.
children
.
forEach
(
addGuids
);
}
...
...
@@ -883,14 +892,14 @@ const getDataBaseTableData = async (params = {}) => {
const
dataBaseParams
=
{
pageIndex
:
dataBasePage
.
value
.
curr
,
pageSize
:
dataBasePage
.
value
.
limit
,
databaseGuid
:
""
,
isDataAsset
:
''
,
execGuid
:
execGuidInfo
.
value
.
execGuid
,
tableName
:
""
,
database
:
""
,
label
:
""
,
classifyDetailName
:
""
,
gradeDetailName
:
""
tableGuid
:
tableGuid
.
value
,
databaseGuid
:
dataBaseGuid
.
value
,
fieldGuid
:
""
,
labelGuid
:
""
,
classifyDetailGuid
:
""
,
gradeDetailGuid
:
""
};
const
finalParams
=
{
...
dataBaseParams
,
...
params
};
...
...
@@ -934,11 +943,13 @@ const getDataBaseFieldData = async (params = {}) => {
const
dataBaseParams
=
{
pageIndex
:
dataFieldPage
.
value
.
curr
,
pageSize
:
dataFieldPage
.
value
.
limit
,
tableGuid
:
""
,
execGuid
:
execGuidInfo
.
value
.
execGuid
,
databaseGuid
:
""
,
fieldName
:
''
,
gradeDetailName
:
''
,
tableGuid
:
tableGuid
.
value
||
''
,
databaseGuid
:
dataBaseGuid
.
value
||
''
,
fieldGuid
:
""
,
labelGuid
:
""
,
classifyDetailGuid
:
""
,
gradeDetailGuid
:
""
};
const
finalParams
=
{
...
dataBaseParams
,
...
params
};
const
res
:
any
=
await
getDbDirFieldPageList
(
finalParams
);
...
...
@@ -1007,12 +1018,6 @@ const dataBaseInfo = ref<any>({});
const
dataBasenodeClick
=
(
data
:
any
)
=>
{
isShowCreateBtn
.
value
=
false
;
console
.
log
(
'dataBasenodeClick'
,
data
);
if
(
data
.
cgDirName
)
{
tableGuid
.
value
=
''
;
dataBaseGuid
.
value
=
''
;
getDataBaseFieldData
();
getDataBaseTableData
();
}
if
(
data
.
databaseGuid
)
{
dataBaseInfo
.
value
=
data
;
dataBaseGuid
.
value
=
data
.
databaseGuid
;
...
...
@@ -1031,9 +1036,7 @@ const dataBasenodeClick = (data: any) => {
getDataBaseFieldData
({
tableGuid
:
data
.
tableGuid
});
// getDataBaseTableData({
// tableGuid: data.tableGuid
// });
}
if
(
data
.
databaseGuid
||
data
.
cgDirName
)
{
...
...
@@ -1118,7 +1121,7 @@ const setActiveTab = (tab) => {
// 数据库字段搜索联动 getDbDirFieldSelectList
const
getDbDirFieldSelectData
=
async
(
type
,
params
=
{})
=>
{
const
inParams
=
{
condition
:
"
database
"
,
condition
:
"
1
"
,
database
:
""
,
tableName
:
""
,
execGuid
:
execGuidInfo
.
value
.
execGuid
,
...
...
@@ -1129,14 +1132,20 @@ const getDbDirFieldSelectData = async (type, params = {}) => {
console
.
log
(
'getDbDirFieldSelectData'
,
res
);
if
(
type
==
1
)
{
optionsA
.
value
=
res
.
data
.
map
((
item
)
=>
({
dbGuid
:
item
.
database
,
// 数据库标识
name
:
item
.
database
,
// 数据库名称
dbGuid
:
item
.
database
Guid
,
// 数据库标识
name
:
item
.
database
ChName
,
// 数据库名称
}));
}
if
(
type
==
2
)
{
optionsB
.
value
=
res
.
data
.
map
((
item
)
=>
({
dbGuid
:
item
.
tableName
,
// 表标识
name
:
item
.
tableName
,
// 表名称
dbGuid
:
item
.
tableGuid
,
// 表标识
name
:
item
.
tableChName
,
// 表名称
}));
}
if
(
type
==
3
)
{
optionsC
.
value
=
res
.
data
.
map
((
item
)
=>
({
dbGuid
:
item
.
fieldGuid
,
// 字段标识
name
:
item
.
fieldChName
,
// 字段名称
}));
}
}
else
{
...
...
@@ -1169,10 +1178,11 @@ const getSearchTableList = async (type = 1, dbGuid = '') => {
const
getDbDirTableSelectData
=
async
(
type
,
params
=
{})
=>
{
console
.
log
(
'getDbDirTableSelectData'
,
params
);
const
inParams
=
{
condition
:
"database"
,
database
:
""
,
tableName
:
""
,
condition
:
"1"
,
execGuid
:
execGuidInfo
.
value
.
execGuid
,
databaseGuid
:
""
,
tableGuid
:
""
,
};
const
finalParams
=
{
...
inParams
,
...
params
};
const
res
:
any
=
await
getDbDirTableSelectList
(
finalParams
);
...
...
@@ -1180,21 +1190,28 @@ const getDbDirTableSelectData = async (type, params = {}) => {
if
(
type
==
1
)
{
optionsA
.
value
=
res
.
data
.
map
((
item
)
=>
({
dbGuid
:
item
.
database
,
// 数据库标识
name
:
item
.
database
,
// 数据库名称
dbGuid
:
item
.
database
Guid
,
// 数据库标识
name
:
item
.
database
ChName
,
// 数据库名称
}));
}
if
(
type
==
2
)
{
console
.
log
(
'进来了吗'
,
res
);
if
(
activeTab
.
value
===
'word'
)
{
console
.
log
(
'进来了吗'
,
res
.
data
);
optionsC
.
value
=
res
.
data
.
map
((
item
)
=>
({
dbGuid
:
item
.
fieldName
,
// 字段标识
name
:
item
.
fieldName
,
// 字段名称
}));
return
;
}
optionsB
.
value
=
res
.
data
.
map
((
item
)
=>
({
dbGuid
:
item
.
database
,
// 表标识
name
:
item
.
databas
e
,
// 表名称
dbGuid
:
item
.
tableGuid
,
// 表标识
name
:
item
.
tableChNam
e
,
// 表名称
}));
}
if
(
type
==
3
)
{
optionsC
.
value
=
res
.
data
.
map
((
item
)
=>
({
dbGuid
:
item
.
database
,
// 字段标识
name
:
item
.
databas
e
,
// 字段名称
dbGuid
:
item
.
fieldGuid
,
// 字段标识
name
:
item
.
fieldChNam
e
,
// 字段名称
}));
}
...
...
@@ -1223,10 +1240,14 @@ const onAChange = async () => {
await
getSearchTableList
(
2
,
selectedA
.
value
);
// 分类分级搜索
}
if
(
activeName
.
value
==
'second'
)
{
console
.
log
(
'onAChange'
,
optionsA
.
value
);
await
getDbDirTableSelectData
(
2
,
{
database
:
selectedA
.
value
});
// 数据库搜索
if
(
activeTab
.
value
===
'word'
)
{
await
getDbDirFieldSelectData
(
2
,
{
databaseGuid
:
selectedA
.
value
,
condition
:
"2"
});
}
else
{
await
getDbDirTableSelectData
(
2
,
{
databaseGuid
:
selectedA
.
value
,
condition
:
"2"
});
// 数据库搜索
}
}
};
// 第二个下拉框值改变时
...
...
@@ -1239,7 +1260,9 @@ const onBChange = async () => {
await
getSearchTableList
(
3
,
selectedB
.
value
);
// 分类分级搜索
}
if
(
activeName
.
value
==
'second'
)
{
await
getDbDirTableSelectData
(
3
,
{
tableName
:
selectedB
.
value
});
// 数据库搜索
if
(
activeTab
.
value
===
'word'
)
{
await
getDbDirFieldSelectData
(
3
,
{
tableGuid
:
selectedB
.
value
,
databaseGuid
:
selectedA
.
value
,
condition
:
"3"
});
}
}
};
...
...
@@ -1261,10 +1284,19 @@ const exportDB = async () => {
});
}
// 分类选择
const
treeSelectNodeChange
=
(
node
,
item
)
=>
{
const
{
refGradeGuid
}
=
node
;
getGradeData
(
refGradeGuid
);
// 标签guid
const
labelGuidInfo
=
ref
(
''
);
// 分级guid信息
const
levelGuidInfo
=
ref
(
''
);
// 标签选择
const
selectChange
=
(
val
,
row
,
info
)
=>
{
console
.
log
(
'selectChange'
,
val
,
row
,
info
);
if
(
info
)
{
labelGuidInfo
.
value
=
info
.
labelName
;
classifyDetailGuidInfo
.
value
=
info
.
classifyName
;
levelGuidInfo
.
value
=
info
.
levelName
;
}
}
// 这里应该是onActivated 钩子,路由从configure-路由从configure-rules跳转过来要重新请求数据、
...
...
@@ -1285,6 +1317,12 @@ onActivated(async () => {
}
});
const
treeSelectNodeClick
=
(
node
,
item
)
=>
{
treeInfo
.
value
.
expandedKey
=
[];
treeInfo
.
value
.
expandedKey
.
push
(
node
.
classifyDetailGuid
);
treeInfo
.
value
.
currentNodeKey
=
node
.
classifyDetailGuid
;
}
</
script
>
<
template
>
...
...
@@ -1299,11 +1337,11 @@ onActivated(async () => {
<el-option
v-for=
"item in optionsB"
:key=
"item.dbGuid"
:label=
"item.name"
:value=
"item.dbGuid"
/>
</el-select>
<el-select
v-model=
"selectedC"
placeholder=
"选择字段名"
:disabled=
"!selectedB"
style=
"width: 140px;margin-right: 8px"
:clearable=
"true"
v-if=
"
isShowWordSearch
"
>
:clearable=
"true"
v-if=
"
!(activeTab === 'table' && activeName === 'second')
"
>
<el-option
v-for=
"item in optionsC"
:key=
"item.dbGuid"
:label=
"item.name"
:value=
"item.dbGuid"
/>
</el-select>
<TableTools
:searchItems=
"searchItemList"
:init=
"false"
:searchId=
"'files-standard-search'"
@
search=
"toSearch"
@
treeSelectNodeChange=
"treeSelectNodeChange
"
/>
@
selectChange=
"selectChange"
@
treeSelectNodeClick=
"treeSelectNodeClick
"
/>
</div>
<div
class=
"container_wrap full flex"
>
<div
class=
"aside_wrap"
>
...
...
@@ -1419,13 +1457,11 @@ onActivated(async () => {
<el-checkbox
v-model=
"checked"
label=
"仅看规划数据资产表"
size=
"large"
@
change=
"changeCheck"
/>
</div>
</div>
<div
class=
"table_panel_wrap_database"
v-if=
"!tableGuid && activeTab === 'table'"
:style=
"{ height: '483px', minHeight: '210px' }"
>
<div
class=
"table_panel_wrap_database"
v-if=
"!tableGuid && activeTab === 'table'"
>
<Table
:tableInfo=
"dataBaseTableInfo"
@
tablePageChange=
"dataBaseTablePageChange"
@
tableSwitchBeforeChange=
"tableSwitchBeforeChange"
/>
</div>
<div
class=
"table_field"
v-if=
"tableGuid || activeTab === 'word'"
:style=
"{ height: '523px', minHeight: '210px' }"
>
<div
class=
"table_field"
v-if=
"tableGuid || activeTab === 'word'"
>
<Table
:tableInfo=
"tableFieldsDataInfo"
@
tablePageChange=
"dataFieldTablePageChange"
/>
</div>
</div>
...
...
@@ -1455,6 +1491,7 @@ onActivated(async () => {
padding
:
0
;
display
:
flex
;
justify-content
:
space-between
;
height
:
calc
(
100%
-
44px
);
.aside_wrap
{
width
:
199px
;
...
...
@@ -1563,19 +1600,21 @@ onActivated(async () => {
.table_panel_wrap
{
width
:
100%
;
height
:
520px
;
height
:
calc
(
100%
-
130px
)
;
min-height
:
210px
;
overflow
:
visible
;
}
.table_panel_wrap_database
{
width
:
100%
;
height
:
calc
(
100%
-
170px
);
min-height
:
210px
;
overflow
:
visible
;
}
.table_field
{
width
:
100%
;
height
:
calc
(
100%
-
130px
);
min-height
:
210px
;
overflow
:
visible
;
}
...
...
src/views/data_inventory/configureRules.vue
View file @
2c58d9f
...
...
@@ -5,7 +5,7 @@
<
script
lang=
"ts"
setup
name=
"configureRules"
>
import
{
ref
}
from
"vue"
;
import
useUserStore
from
"@/store/modules/user"
;
import
{
getBizRuleConfigDetail
,
getNewDataTypeList
,
saveBizRuleConfig
,
}
from
'@/api/modules/dataInventory'
import
{
getBizRuleConfigDetail
,
get
DictionaryAll
,
get
NewDataTypeList
,
saveBizRuleConfig
,
}
from
'@/api/modules/dataInventory'
const
{
proxy
}
=
getCurrentInstance
()
as
any
;
const
router
=
useRouter
();
const
route
=
useRoute
();
...
...
@@ -45,9 +45,24 @@ const getFieldTypeData = async () => {
}
}
// 获取字典
const
dictionaryList
=
ref
([]);
const
getDictionaryList
=
()
=>
{
getDictionaryAll
({
state
:
1
}).
then
((
res
:
any
)
=>
{
dictionaryList
.
value
=
[];
if
(
res
.
code
==
proxy
.
$passCode
)
{
dictionaryList
.
value
=
res
.
data
||
[];
}
else
{
proxy
.
$ElMessage
.
error
(
res
.
msg
);
}
})
};
onMounted
(
async
()
=>
{
await
getFieldTypeData
()
await
getBizRuleConfigDetailData
()
getDictionaryList
()
})
...
...
@@ -78,6 +93,7 @@ const selectedRows = ref([]);
// 监听选中行变化
const
selectionFieldsChange
=
(
selection
)
=>
{
selectedRows
.
value
=
selection
;
console
.
log
(
'selectedRows'
,
selectedRows
.
value
)
};
// 上移操作
...
...
@@ -87,7 +103,7 @@ const moveUp = () => {
return
;
}
selectedRows
.
value
.
forEach
((
row
:
any
)
=>
{
const
index
=
tableData
.
value
.
findIndex
((
item
)
=>
item
.
tableData
===
row
.
tableData
);
const
index
=
tableData
.
value
.
findIndex
((
item
)
=>
item
.
fieldGuid
===
row
.
fieldGuid
);
if
(
index
>
0
)
{
[
tableData
.
value
[
index
-
1
],
tableData
.
value
[
index
]]
=
[
tableData
.
value
[
index
],
...
...
@@ -105,7 +121,7 @@ const moveDown = () => {
}
// 倒序遍历选中行
[...
selectedRows
.
value
].
reverse
().
forEach
((
row
:
any
)
=>
{
const
index
=
tableData
.
value
.
findIndex
((
item
)
=>
item
.
tableData
===
row
.
tableData
);
const
index
=
tableData
.
value
.
findIndex
((
item
)
=>
item
.
fieldGuid
===
row
.
fieldGuid
);
if
(
index
<
tableData
.
value
.
length
-
1
)
{
[
tableData
.
value
[
index
],
tableData
.
value
[
index
+
1
]]
=
[
tableData
.
value
[
index
+
1
],
...
...
@@ -383,10 +399,13 @@ const cancel = () => {
<!-- 关联字典(可编辑)el-tree-select 形式下拉形式 -->
<el-table-column
prop=
"dictionaryGuid"
label=
"关联字典"
width=
"150"
align=
"center"
>
<
template
#
default=
"scope"
>
<span
v-if=
"!scope.row.isEdit || !editableFields.dictionaryGuid"
>
{{
scope
.
row
.
isDict
?
scope
.
row
.
isDict
:
'--'
}}
</span>
<el-tree-select
v-else
v-model=
"scope.row.isDict"
:data=
"data"
placeholder=
"请选择"
/>
<span
v-if=
"!scope.row.isEdit"
>
{{
scope
.
row
.
dictionaryGuid
?
dictionaryList
.
find
((
item
:
any
)
=>
item
.
guid
===
scope
.
row
.
dictionaryGuid
)?.
chName
:
'--'
}}
</span>
<el-select
v-else
v-model=
"scope.row.dictionaryGuid"
placeholder=
"请选择"
>
<el-option
v-for=
"item in dictionaryList"
:key=
"item?.guid"
:label=
"item.chName"
:value=
"item.guid"
/>
</el-select>
</
template
>
</el-table-column>
<!-- 数据是否唯一(可编辑) -->
...
...
src/views/data_inventory/dictionary.vue
View file @
2c58d9f
...
...
@@ -677,7 +677,7 @@ const treePromise = ref();
// 获取数据字典树形数据
const
getTreeData
=
(
needClick
=
false
,
currData
=
{})
=>
{
const
params
=
{
paramCode
:
'
data_structure_code
'
paramCode
:
'
数据字典类型
'
}
treeInfo
.
value
.
loading
=
true
treePromise
.
value
=
getDictionaryTree
(
params
).
then
((
res
:
any
)
=>
{
...
...
src/views/data_inventory/tableCreateExisting.vue
View file @
2c58d9f
...
...
@@ -17,6 +17,7 @@ import {
getGradeList
,
getNewDataTypeList
,
getDbDirDetail
,
getDictionaryAll
,
}
from
"@/api/modules/dataInventory"
;
import
existingTableSelect
from
"./existingTableSelect.vue"
;
import
useUserStore
from
"@/store/modules/user"
;
...
...
@@ -30,6 +31,21 @@ const fullPath = route.fullPath;
const
userStore
=
useUserStore
();
const
execGuid
:
any
=
ref
(
route
.
query
.
execGuid
);
// 获取字典
const
dictionaryList
=
ref
([]);
const
getDictionaryList
=
()
=>
{
getDictionaryAll
({
state
:
1
}).
then
((
res
:
any
)
=>
{
dictionaryList
.
value
=
[];
if
(
res
.
code
==
proxy
.
$passCode
)
{
dictionaryList
.
value
=
res
.
data
||
[];
}
else
{
proxy
.
$ElMessage
.
error
(
res
.
msg
);
}
})
};
// 获取数据库列表
const
databaseList
:
any
=
ref
([]);
const
getDbDirDataSourceListData
=
async
()
=>
{
...
...
@@ -189,6 +205,7 @@ onMounted(async () => {
await
getDbDirDataSourceListData
();
}
await
getFieldTypeData
();
getDictionaryList
();
});
const
stepsInfo
=
ref
({
...
...
@@ -1034,10 +1051,13 @@ onActivated(() => {
<!-- 关联字典(可编辑)el-tree-select 形式下拉形式 -->
<el-table-column
prop=
"dictionaryGuid"
label=
"关联字典"
width=
"150"
align=
"center"
>
<
template
#
default=
"scope"
>
<span
v-if=
"!scope.row.isEdit || !editableFields.dictionaryGuid"
>
{{
scope
.
row
.
isDict
?
scope
.
row
.
isDict
:
'--'
}}
</span>
<el-tree-select
v-else
v-model=
"scope.row.isDict"
:data=
"data"
placeholder=
"请选择"
/>
<span
v-if=
"!scope.row.isEdit"
>
{{
scope
.
row
.
dictionaryGuid
?
dictionaryList
.
find
((
item
:
any
)
=>
item
.
guid
===
scope
.
row
.
dictionaryGuid
)?.
chName
:
'--'
}}
</span>
<el-select
v-else
v-model=
"scope.row.dictionaryGuid"
placeholder=
"请选择"
>
<el-option
v-for=
"item in dictionaryList"
:key=
"item?.guid"
:label=
"item.chName"
:value=
"item.guid"
/>
</el-select>
</
template
>
</el-table-column>
<!-- 数据是否唯一(可编辑) -->
...
...
src/views/data_inventory/tableCreateFile.vue
View file @
2c58d9f
...
...
@@ -33,7 +33,7 @@ import {
getSubjectTableDetail
,
checkSubjectTableData
}
from
"@/api/modules/dataCatalogService"
;
import
{
getFidldEnName
,
getGradeList
,
getNewDataTypeList
,
getTaskExeTreeList
,
saveDbDirTable
}
from
"@/api/modules/dataInventory"
;
import
{
get
DictionaryAll
,
get
FidldEnName
,
getGradeList
,
getNewDataTypeList
,
getTaskExeTreeList
,
saveDbDirTable
}
from
"@/api/modules/dataInventory"
;
import
{
useDefault
}
from
"@/hooks/useDefault"
;
import
uploadExcelFile
from
"./components/uploadExcelFile.vue"
;
import
{
add
}
from
"lodash-es"
;
...
...
@@ -131,6 +131,20 @@ const getSubjectField = () => {
});
}
// 获取字典
const
dictionaryList1
=
ref
([]);
const
getDictionaryList1
=
()
=>
{
getDictionaryAll
({
state
:
1
}).
then
((
res
:
any
)
=>
{
dictionaryList
.
value
=
[];
if
(
res
.
code
==
proxy
.
$passCode
)
{
dictionaryList1
.
value
=
res
.
data
||
[];
}
else
{
proxy
.
$ElMessage
.
error
(
res
.
msg
);
}
})
};
// 定义分类选择器的属性
const
treeSelectProps
=
{
label
:
"classifyName"
,
...
...
@@ -213,6 +227,7 @@ const nextStep = () => {
tableCreateInfo
.
value
.
isSync
=
'Y'
;
}
stepsInfo
.
value
.
step
=
1
;
getDictionaryList1
()
// getDictionaryList();
// getDimListData();
if
(
!
fieldTypes
.
value
.
length
)
{
...
...
@@ -1861,7 +1876,7 @@ const tableSelectFields = computed(() => {
<
span
v
-
else
>
{{
scope
.
row
[
"fieldPrecision"
]
==
null
?
'--'
:
scope
.
row
[
"fieldPrecision"
]
}}
<
/span
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
prop
=
"dimOrdictionaryGuid"
v
-
if
=
"!isDimTable"
label
=
"关联维度/字典"
width
=
"130px"
align
=
"left"
<
!--
<
el
-
table
-
column
prop
=
"dimOrdictionaryGuid"
v
-
if
=
"!isDimTable"
label
=
"关联维度/字典"
width
=
"130px"
align
=
"left"
show
-
overflow
-
tooltip
>
<
template
#
default
=
"scope"
>
<
el
-
tree
-
select
ref
=
"dimOrDictSelectRef"
v
-
if
=
"scope.row['isEdit']"
filterable
clearable
...
...
@@ -1883,7 +1898,35 @@ const tableSelectFields = computed(() => {
<
span
v
-
else
>
{{
(
scope
.
row
[
'dictionaryGuid'
]
?
scope
.
row
[
"dictionaryChName"
]
:
(
scope
.
row
[
'dimGuid'
]
?
scope
.
row
[
'dimChName'
]
:
'--'
))
||
'--'
}}
<
/span
>
<
/template
>
<
/el-table-column> --
>
<!--
<
el
-
table
-
column
prop
=
"dimOrdictionaryGuid"
v
-
if
=
"!isDimTable"
label
=
"关联字典"
width
=
"120px"
align
=
"left"
show
-
overflow
-
tooltip
>
<
template
#
default
=
"scope"
>
<
el
-
select
v
-
if
=
"scope.row['dimOrdictionaryGuid']"
v
-
model
=
"scope.row['dimOrdictionaryGuid']"
placeholder
=
"请选择"
>
<
el
-
option
v
-
for
=
"opt in dictionaryList"
:
key
=
"opt['guid']"
:
label
=
"opt['chName']"
:
value
=
"opt['guid']"
/>
<
/el-select
>
<
span
v
-
else
>
{{
dictionaryList
.
find
(
d
=>
d
.
guid
===
scope
.
row
[
'dimOrdictionaryGuid'
])?.
chName
||
'--'
}}
<
/span
>
<
/template
>
<
/el-table-column> --
>
<
el
-
table
-
column
prop
=
"dictionaryGuid"
label
=
"关联字典"
width
=
"120"
align
=
"center"
show
-
overflow
-
tooltip
>
<
template
#
default
=
"scope"
>
<
div
v
-
if
=
"scope.row.isEdit"
>
<
el
-
select
v
-
if
=
"scope.row['isEdit']"
v
-
model
=
"scope.row['dictionaryGuid']"
placeholder
=
"请选择分级"
clearable
filterable
>
<
el
-
option
v
-
for
=
"opt in dictionaryList1"
:
key
=
"opt['guid']"
:
label
=
"opt['chName']"
:
value
=
"opt['guid']"
/>
<
/el-select
>
<
/div
>
<
div
v
-
else
>
{{
dictionaryList1
.
find
(
d
=>
d
.
guid
===
scope
.
row
[
'dictionaryGuid'
])?.
chName
||
'--'
}}
<
/div
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
prop
=
"isPrimary"
label
=
"是否主键"
width
=
"90px"
align
=
"left"
show
-
overflow
-
tooltip
>
<
template
#
default
=
"scope"
>
<
el
-
select
v
-
if
=
"scope.row['isEdit']"
v
-
model
=
"scope.row['isPrimary']"
placeholder
=
"请选择"
>
...
...
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