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
cf478289
authored
2024-12-25 20:21:45 +0800
by
xukangle
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix : 修改分类分级和标签管理问题
1 parent
7166760b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
209 additions
and
67 deletions
src/api/modules/dataInventory.ts
src/components/Tools/table_search.vue
src/router/modules/dataInventory.ts
src/views/data_inventory/classStandardEdit.vue
src/views/data_inventory/classifyGradEdit.vue
src/views/data_inventory/classifyGradeCatalogue.vue
src/views/data_inventory/dataLabel.vue
src/views/data_inventory/tableCreateExisting.vue
src/views/data_inventory/templateConfig.vue
src/api/modules/dataInventory.ts
View file @
cf47828
...
...
@@ -603,7 +603,7 @@ export const getDictionary = (params) => request({
* @path /biz-rule-config/save
*/
export
const
saveBizRuleConfig
=
(
data
)
=>
request
({
url
:
`
${
import
.
meta
.
env
.
VITE_APP_CHECK_BASEURL
}
/biz-rule-config/save`
,
url
:
`
${
import
.
meta
.
env
.
VITE_APP_CHECK_BASEURL
}
/biz-rule-config/save
-or-update
`
,
method
:
'post'
,
data
})
...
...
src/components/Tools/table_search.vue
View file @
cf47828
...
...
@@ -99,8 +99,9 @@ onMounted(() => {
<el-form-item
v-if=
"item.visible ?? true"
:key=
"'item_' + index"
:class=
"
{ 'width_auto': item.type == 'radio-button' }" :prop="item.field">
<template
v-if=
"item.type == 'select'"
>
<el-select
:class=
"
{ 'is-multiple': item.multiple }" v-model="formInline[item.field]"
:placeholder="item.placeholder" :clearable="item.clearable" :filterable="item.filterable"
<el-select
collapse-tags
collapse-tags-tooltip
:class=
"
{ 'is-multiple': item.multiple }"
v-model="formInline[item.field]" :placeholder="item.placeholder" :clearable="item.clearable"
:filterable="item.filterable" :multiple="item.multiple" :max-collapse-tags="3"
:disabled="item.disabled ?? false" @change="(val) => selectChange(val, item)">
<el-option
v-for=
"opt in item.options"
:label=
"item.props?.label ? opt[item.props.label] : opt.label"
:value=
"item.props?.value ? opt[item.props.value] : opt.value"
/>
...
...
src/router/modules/dataInventory.ts
View file @
cf47828
...
...
@@ -82,7 +82,7 @@ const routes: RouteRecordRaw[] = [
name
:
'templateConfig'
,
component
:
()
=>
import
(
'@/views/data_inventory/templateConfig.vue'
),
meta
:
{
title
:
'分类分级
标准
'
,
title
:
'分类分级
规则
'
,
breadcrumb
:
false
,
cache
:
true
},
...
...
src/views/data_inventory/classStandardEdit.vue
View file @
cf47828
...
...
@@ -42,7 +42,7 @@ const classStandardFormItems = ref([{
// clearable: true,
// disabled: false,
// visible: true,
label
:
'分级
标准
'
,
label
:
'分级
名称
'
,
type
:
'select'
,
placeholder
:
'请选择'
,
field
:
'gradeStandard'
,
...
...
@@ -83,7 +83,7 @@ const tableInfo = ref({
multiple
:
false
,
fields
:
[
{
label
:
"序号"
,
type
:
"index"
,
width
:
56
,
align
:
"center"
},
{
label
:
"
分类
"
,
field
:
"classifyName"
,
width
:
160
,
type
:
'expand'
},
{
label
:
"
规则名称
"
,
field
:
"classifyName"
,
width
:
160
,
type
:
'expand'
},
{
label
:
"层级"
,
field
:
"level"
,
width
:
120
,
getName
:
(
scope
)
=>
{
let
level
=
scope
.
row
.
level
;
...
...
@@ -121,7 +121,7 @@ const tableInfo = ref({
selectParentEdit
(
scope
.
row
.
guid
);
currTableInfo
.
value
=
scope
.
row
;
drawerInfo
.
value
.
visible
=
true
;
drawerInfo
.
value
.
header
.
title
=
'编辑
分类
'
;
drawerInfo
.
value
.
header
.
title
=
'编辑
规则
'
;
classEditFormItems
.
value
.
forEach
(
item
=>
{
item
.
default
=
scope
.
row
[
item
.
field
]
})
...
...
@@ -210,7 +210,7 @@ const classEditFormItems = ref([{
},
{
label
:
'定义说明'
,
type
:
'textarea'
,
placeholder
:
'
请输入
'
,
placeholder
:
'
分类规则的描述说明
'
,
field
:
'description'
,
default
:
''
,
clearable
:
true
,
...
...
@@ -305,7 +305,7 @@ const drawerInfo = ref({
direction
:
'rtl'
,
size
:
600
,
header
:
{
title
:
'添加
分类
'
,
title
:
'添加
规则
'
,
},
type
:
''
,
container
:
{
...
...
@@ -324,7 +324,7 @@ const drawerBtnClick = async (btn, info) => {
if
(
btn
.
value
==
'cancel'
)
{
drawerInfo
.
value
.
visible
=
false
;
}
else
{
if
(
drawerInfo
.
value
.
header
.
title
==
'添加
分类
'
)
{
if
(
drawerInfo
.
value
.
header
.
title
==
'添加
规则
'
)
{
drawerInfo
.
value
.
footer
.
btns
.
map
((
item
:
any
)
=>
(
item
.
disabled
=
true
));
const
params
=
{
...
info
,
...
...
@@ -332,7 +332,7 @@ const drawerBtnClick = async (btn, info) => {
}
const
res
:
any
=
await
saveClassify
(
params
);
if
(
res
.
code
==
proxy
.
$passCode
)
{
proxy
.
$ElMessage
.
success
(
'添加成功!'
);
proxy
.
$ElMessage
.
success
(
'添加
规则
成功!'
);
drawerInfo
.
value
.
visible
=
false
;
getTreeListData
();
drawerInfo
.
value
.
footer
.
btns
.
map
((
item
:
any
)
=>
delete
item
.
disabled
);
...
...
@@ -351,7 +351,7 @@ const drawerBtnClick = async (btn, info) => {
}
const
res
:
any
=
await
updateClassify
(
params
);
if
(
res
.
code
==
proxy
.
$passCode
)
{
proxy
.
$ElMessage
.
success
(
'
修改
成功!'
);
proxy
.
$ElMessage
.
success
(
'
编辑规则
成功!'
);
drawerInfo
.
value
.
visible
=
false
;
drawerInfo
.
value
.
footer
.
btns
.
map
((
item
:
any
)
=>
delete
item
.
disabled
);
getTreeListData
();
...
...
@@ -462,7 +462,7 @@ const newCreateClass = () => {
drawerInfo
.
value
.
visible
=
true
;
classEditFormItems
.
value
[
2
].
options
=
treeListData
.
value
;
drawerInfo
.
value
.
header
.
title
=
'添加
分类
'
;
drawerInfo
.
value
.
header
.
title
=
'添加
规则
'
;
classEditFormItems
.
value
.
forEach
(
item
=>
{
if
(
item
.
field
==
'status'
)
{
item
.
default
=
'Y'
;
...
...
@@ -481,7 +481,7 @@ const saveUpdate = async () => {
return
;
}
if
(
!
formRef
.
value
.
formInline
.
gradeStandard
)
{
proxy
.
$ElMessage
.
error
(
'分级
标准
不能为空'
);
proxy
.
$ElMessage
.
error
(
'分级
名称
不能为空'
);
return
;
}
saveLoading
.
value
=
true
;
...
...
@@ -495,7 +495,7 @@ const saveUpdate = async () => {
console
.
log
(
params
);
const
res
:
any
=
await
updateClassifyGrad
(
params
);
if
(
res
.
code
==
proxy
.
$passCode
)
{
proxy
.
$ElMessage
.
success
(
'修改成功'
);
proxy
.
$ElMessage
.
success
(
'修改
分类
成功'
);
router
.
push
({
name
:
'templateConfig'
});
...
...
@@ -512,9 +512,21 @@ const importClass = () => {
}
const
dataShowMethod
=
ref
(
'table'
);
// 创建聚合数据
const
updatedTreeData
=
ref
<
any
>
();
/** 切换是图形展示,还是表格展示。 */
const
changeShowMethod
=
()
=>
{
dataShowMethod
.
value
=
dataShowMethod
.
value
==
'table'
?
'shape'
:
'table'
;
console
.
log
(
shapeTreeListData
.
value
);
if
(
dataShowMethod
.
value
==
'shape'
)
{
const
tempArr
=
{
classifyName
:
router
.
currentRoute
.
value
.
query
.
classStandardName
,
guid
:
"1"
,
children
:
shapeTreeListData
.
value
}
updatedTreeData
.
value
=
[
tempArr
];
console
.
log
(
'updatedTreeData'
,
[
tempArr
]);
}
}
const
cancel
=
()
=>
{
...
...
@@ -679,10 +691,11 @@ const initGraph = () => {
},
}
});
graph
.
data
(
shapeTreeList
Data
.
value
[
0
]);
graph
.
data
(
updatedTree
Data
.
value
[
0
]);
graph
.
on
(
'node:mouseenter'
,
(
e
)
=>
{
const
nodeItem
=
e
.
item
;
// 获取鼠标进入的节点元素对象
const
nodeModel
=
nodeItem
.
getModel
();
if
(
nodeModel
.
guid
==
'1'
)
return
;
// 根节点不显示
// 更新弹窗位置和显示节点详情
nodeDetails
.
value
=
nodeModel
;
showNodeDetails
.
value
=
true
;
...
...
@@ -804,7 +817,6 @@ onMounted(() => {
const
isExpand
=
ref
<
boolean
>
(
router
.
currentRoute
.
value
.
query
.
isExpand
==
'true'
);
</
script
>
<
template
>
...
...
@@ -814,10 +826,10 @@ const isExpand = ref<boolean>(router.currentRoute.value.query.isExpand == 'true'
:isExpand=
"isExpand"
>
<Form
ref=
"formRef"
:itemList=
"classStandardFormItems"
formId=
"main-model-edit"
col=
"col3"
/>
</ContentWrap>
<ContentWrap
id=
"id-classStandard"
class=
"detail-content"
title=
"分类
标准
"
description=
""
<ContentWrap
id=
"id-classStandard"
class=
"detail-content"
title=
"分类
规则
"
description=
""
style=
"margin-top:16px; height: calc(100% - 161px)"
>
<div
class=
"tools_btns"
>
<el-button
v-show=
"dataShowMethod == 'table'"
type=
"primary"
@
click=
"newCreateClass"
>
添加
分类
</el-button>
<el-button
v-show=
"dataShowMethod == 'table'"
type=
"primary"
@
click=
"newCreateClass"
>
添加
规则
</el-button>
<!--
<el-button
v-show=
"dataShowMethod == 'table'"
@
click=
"importClass"
>
导入分类
</el-button>
-->
<el-button
class=
"show-change-btn"
@
click=
"changeShowMethod"
>
{{
'图形展示'
}}
</el-button>
</div>
...
...
src/views/data_inventory/classifyGradEdit.vue
View file @
cf47828
...
...
@@ -127,7 +127,7 @@ const tableInfo = ref({
return
classDataRef
.
value
.
find
((
item
:
any
)
=>
item
.
value
===
dataClassify
)?.
label
;
}
},
{
label
:
"
分级
描述"
,
field
:
"gradeDesc"
,
align
:
"left"
},
{
label
:
"
规则
描述"
,
field
:
"gradeDesc"
,
align
:
"left"
},
],
actionInfo
:
{
...
...
@@ -242,10 +242,10 @@ const newCreateGradeFormItems = ref([{
regexp
:
/
\D
/g
},
{
label
:
'
分级
描述'
,
label
:
'
规则
描述'
,
type
:
'textarea'
,
maxlength
:
500
,
placeholder
:
'分
类分级
的描述说明'
,
placeholder
:
'分
级规则
的描述说明'
,
field
:
'gradeDesc'
,
default
:
''
,
clearable
:
true
,
...
...
@@ -326,6 +326,7 @@ const newCreateGradeStandardDialogInfo = ref({
const
newStandard
=
()
=>
{
filterDataGrade
();
newCreateGradeStandardDialogInfo
.
value
.
title
=
'新增标准'
;
newCreateGradeStandardDialogInfo
.
value
.
visible
=
true
;
newCreateGradeFormItems
.
value
.
forEach
(
item
=>
item
.
default
=
''
);
}
...
...
@@ -362,7 +363,7 @@ const saveUpdate = async () => {
console
.
log
(
params
);
const
res
:
any
=
await
updateClassifyGrad
(
params
);
if
(
res
.
code
==
proxy
.
$passCode
)
{
proxy
.
$ElMessage
.
success
(
'修改成功'
);
proxy
.
$ElMessage
.
success
(
'修改
分级
成功'
);
router
.
push
({
name
:
'templateConfig'
});
...
...
@@ -392,7 +393,7 @@ const cancel = () => {
<ContentWrap
id=
"id-baseInfo"
title=
"基础信息"
description=
""
style=
"margin-top: 8px;"
>
<Form
ref=
"formRef"
:itemList=
"classStandardFormItems"
formId=
"main-model-edit"
col=
"col3"
/>
</ContentWrap>
<ContentWrap
id=
"id-grade-info"
title=
"分级
标准
"
class=
"detail-content"
description=
""
style=
"margin-top: 8px;"
>
<ContentWrap
id=
"id-grade-info"
title=
"分级
规则
"
class=
"detail-content"
description=
""
style=
"margin-top: 8px;"
>
<div
class=
"content"
v-loading=
"fullscreenLoading"
>
<div
class=
"table-top-btns"
>
<el-button
type=
"primary"
@
click=
"newStandard"
>
新增标准
</el-button>
...
...
src/views/data_inventory/classifyGradeCatalogue.vue
View file @
cf47828
This diff is collapsed.
Click to expand it.
src/views/data_inventory/dataLabel.vue
View file @
cf47828
...
...
@@ -9,6 +9,7 @@ import { getLabelList, getClassifyGradeTreeList, saveLabel, getLabelPageList, de
import
{
CirclePlus
,
Delete
}
from
"@element-plus/icons-vue"
;
const
{
proxy
}
=
getCurrentInstance
()
as
any
;
const
dialogLabelFormRef
=
ref
();
...
...
@@ -74,6 +75,7 @@ const transformDataForTree = (data: any[]) => {
const
labelPageList
=
ref
<
any
>
()
const
getLabelPageData
=
async
()
=>
{
refCount
.
value
++
;
tableInfo
.
value
.
loading
=
true
;
const
params
=
{
pageIndex
:
page
.
value
.
curr
,
...
...
@@ -111,7 +113,7 @@ const getLabelListData = async () => {
}
}
on
Mounted
(
async
()
=>
{
on
BeforeMount
(
async
()
=>
{
await
getClassifyGradeTree
();
await
getLabelPageData
();
await
getLabelListData
();
...
...
@@ -136,8 +138,45 @@ const treeInfo = ref<any>({
loading
:
false
});
// 点击树节点修改分类guid 和 分类明细guid
const
nodeClick
=
(
data
:
any
)
=>
{
console
.
log
(
'nodeClick'
,
data
);
// 存储大类的数据。
const
findNodeDetails
=
ref
<
any
>
(
''
);
const
isLastLayer
=
ref
<
boolean
>
(
false
);
// 所在层级的info
const
atGradeinfo
=
ref
<
any
>
(
''
);
const
findTopParentNode
=
(
node
:
any
)
=>
{
if
(
!
node
)
return
;
// 判断是否为最后一层
if
(
node
.
childNodes
.
length
===
0
)
{
isLastLayer
.
value
=
true
;
atGradeinfo
.
value
=
node
.
data
;
}
else
{
isLastLayer
.
value
=
false
;
}
// 如果当前节点的父节点符合条件
if
(
node
.
parent
&&
node
.
parent
.
data
.
type
===
'C'
)
{
findNodeDetails
.
value
=
node
.
parent
.
data
;
return
;
// 停止递归
}
// 如果当前节点的祖父节点符合条件
if
(
node
.
parent
?.
parent
&&
node
.
parent
.
parent
.
data
.
type
===
'C'
)
{
findNodeDetails
.
value
=
node
.
parent
.
parent
.
data
;
return
;
// 停止递归
}
// 如果未找到,继续递归向上查找
if
(
node
.
parent
)
{
findTopParentNode
(
node
.
parent
);
}
};
const
nodeClick
=
(
data
,
node
)
=>
{
findTopParentNode
(
node
);
newCreateGradeFormItems
.
value
[
1
].
options
=
transformDataForTree
([
findNodeDetails
.
value
])
// 分类guid
if
(
Object
.
keys
(
data
).
includes
(
"type"
))
{
classifyGuid
.
value
=
data
.
guid
;
...
...
@@ -180,8 +219,13 @@ const tableInfo = ref({
fixedSelection
:
true
,
fields
:
[
{
label
:
"序号"
,
type
:
"index"
,
width
:
56
,
align
:
"center"
},
{
label
:
"标签名"
,
field
:
"label"
,
type
:
'text_btn'
,
class
:
'drawer-detail-cell'
,
width
:
120
,
value
:
'detail'
,
columClass
:
'text_btn'
},
{
label
:
"分类"
,
field
:
"classifyDetailName"
,
width
:
140
},
{
label
:
"标签名"
,
field
:
"label"
,
type
:
'text_btn'
,
class
:
'drawer-detail-cell'
,
width
:
160
,
value
:
'detail'
,
columClass
:
'text_btn'
},
{
label
:
"分类"
,
field
:
"classifyNames"
,
getName
:
(
scope
)
=>
{
let
tempInfo
=
scope
.
row
.
classifyNames
;
return
tempInfo
.
join
(
'/'
)
},
},
{
label
:
"分级"
,
field
:
"gradeDetailName"
,
width
:
140
},
{
label
:
'状态'
,
field
:
'bizState'
,
type
:
'switch'
,
activeText
:
'启用'
,
inactiveText
:
'停用'
,
activeValue
:
'Y'
,
inactiveValue
:
'N'
,
switchWidth
:
56
,
width
:
100
,
align
:
'center'
...
...
@@ -280,7 +324,6 @@ const batchRemobe = async () => {
message
:
'已取消删除'
});
});
};
const
tableSwitchBeforeChange
=
(
scope
,
field
,
callback
)
=>
{
...
...
@@ -410,7 +453,7 @@ const newCreateGradeFormItems = ref<any>([{
{
label
:
'精确匹配'
,
type
:
'textarea'
,
maxlength
:
50
0
,
maxlength
:
26
0
,
placeholder
:
'请输入字段中文,中间用英文“,”分号隔开'
,
field
:
'matchChValue'
,
default
:
''
,
...
...
@@ -421,7 +464,7 @@ const newCreateGradeFormItems = ref<any>([{
{
label
:
''
,
type
:
'textarea'
,
maxlength
:
50
0
,
maxlength
:
26
0
,
placeholder
:
'请输入字段中文,中间用英文“,”分号隔开'
,
field
:
'matchEnValue'
,
default
:
''
,
...
...
@@ -459,7 +502,18 @@ const newCreateGradeStandardDialogInfo = ref({
newCreateGradeStandardDialogInfo
.
value
.
submitBtnLoading
=
false
;
},
submit
:
async
(
btn
,
info
)
=>
{
console
.
log
(
info
);
for
(
let
i
=
0
;
i
<
formRows
.
value
.
length
;
i
++
)
{
const
row
=
formRows
.
value
[
i
];
// 如果某一条数据的 matchValue, position, name 都为空,则跳过,不校验
if
(
!
row
.
matchValue
&&
!
row
.
position
&&
!
row
.
name
)
{
continue
;
// 如果全为空,跳过这一行的校验
}
if
(
!
row
.
matchValue
||
!
row
.
position
||
!
row
.
name
)
{
proxy
.
$ElMessage
.
error
(
'请填写完整的模糊匹配规则'
);
return
;
}
}
newCreateGradeStandardDialogInfo
.
value
.
submitBtnLoading
=
true
;
if
(
newCreateGradeStandardDialogInfo
.
value
.
title
===
"添加标签"
)
{
const
tempParams
=
formRows
.
value
.
map
((
item
)
=>
({
...
...
@@ -482,6 +536,7 @@ const newCreateGradeStandardDialogInfo = ref({
getLabelPageData
();
getLabelListData
();
}
else
{
newCreateGradeStandardDialogInfo
.
value
.
submitBtnLoading
=
false
;
proxy
.
$ElMessage
.
error
(
res
.
msg
);
}
}
...
...
@@ -508,6 +563,7 @@ const newCreateGradeStandardDialogInfo = ref({
getLabelPageData
();
getLabelListData
();
}
else
{
newCreateGradeStandardDialogInfo
.
value
.
submitBtnLoading
=
false
;
proxy
.
$ElMessage
.
error
(
res
.
msg
);
}
}
...
...
@@ -516,30 +572,63 @@ const newCreateGradeStandardDialogInfo = ref({
})
// 新增标签
const
addNewLabel
=
()
=>
{
console
.
log
(
'addNewLabel'
)
;
const
addNewLabel
=
async
()
=>
{
newCreateGradeStandardDialogInfo
.
value
.
submitBtnLoading
=
false
;
newCreateGradeFormItems
.
value
.
forEach
(
item
=>
{
item
.
default
=
''
;
item
.
disabled
=
false
;
});
formRows
.
value
=
[{
matchValue
:
''
,
position
:
''
,
name
:
''
,
disabled
:
false
}];
//
if
(
isLastLayer
.
value
)
{
// 选择了最后一级
newCreateGradeFormItems
.
value
[
1
].
default
=
atGradeinfo
.
value
.
guid
;
treeInfo
.
value
.
expandedKey
=
[];
treeInfo
.
value
.
currentNodeKey
=
atGradeinfo
.
value
.
guid
;
treeInfo
.
value
.
expandedKey
.
push
(
atGradeinfo
.
value
.
classifyGradeGuid
);
if
(
atGradeinfo
.
value
?.
classifyGradeGuid
)
{
classifyGuid
.
value
=
atGradeinfo
.
value
.
classifyGradeGuid
;
tempName
.
value
=
atGradeinfo
.
value
.
name
;
classifyDetailGuid
.
value
=
atGradeinfo
.
value
.
guid
;
}
// 遍历classGradeTreeData 找到对应的guid item的refGradeGuid
classGradeTreeData
.
value
.
forEach
((
element
:
any
)
=>
{
if
(
element
.
guid
===
classifyGuid
.
value
)
{
tempRefGradeGuid
.
value
=
element
.
refGradeGuid
;
}
});
if
(
tempRefGradeGuid
.
value
)
{
await
getGradeListData
(
tempRefGradeGuid
.
value
);
const
matchedGrade
=
gradeListData
.
value
.
find
(
(
element
:
any
)
=>
element
.
name
===
tempName
.
value
);
if
(
matchedGrade
)
{
newCreateGradeFormItems
.
value
[
2
].
default
=
matchedGrade
.
guid
;
}
}
}
newCreateGradeStandardDialogInfo
.
value
.
title
=
'添加标签'
;
newCreateGradeStandardDialogInfo
.
value
.
visible
=
true
;
newCreateGradeStandardDialogInfo
.
value
.
submitBtnLoading
=
false
;
}
const
classSearchItemList
=
ref
<
any
>
([
{
type
:
'select
-slots
'
,
type
:
'select'
,
multiple
:
true
,
label
:
''
,
field
:
'labelName'
,
default
:
[],
options
:
[],
placeholder
:
'请选择标签名称'
,
clearable
:
fals
e
,
clearable
:
tru
e
,
filterable
:
true
,
visible
:
true
}
]);
...
...
@@ -551,6 +640,7 @@ const selectChange = async (val: any, row: any) => {
};
/** 搜索查询分类标准 */
const
refCount
=
ref
(
0
);
const
searchClass
=
async
(
val
:
any
,
clear
:
boolean
=
false
)
=>
{
console
.
log
(
'searchClass'
,
val
,
clear
);
if
(
clear
)
{
...
...
@@ -559,7 +649,7 @@ const searchClass = async (val: any, clear: boolean = false) => {
getLabelPageData
();
return
;
}
if
(
val
?.
labelName
?.
length
!==
0
)
{
if
(
val
?.
labelName
?.
length
!==
0
||
refCount
.
value
>=
1
)
{
tableInfo
.
value
.
loading
=
true
;
const
params
=
{
pageIndex
:
page
.
value
.
curr
,
...
...
@@ -579,7 +669,6 @@ const searchClass = async (val: any, clear: boolean = false) => {
}
}
};
...
...
@@ -601,12 +690,13 @@ const handleSelectChange = async (val, row, info) => {
newCreateGradeFormItems
.
value
[
2
].
default
=
matchedGrade
.
guid
;
newCreateGradeFormItems
.
value
[
0
].
default
=
tempFormData
.
value
.
label
;
newCreateGradeFormItems
.
value
[
1
].
default
=
tempFormData
.
value
.
classifyDetailGuid
;
newCreateGradeFormItems
.
value
[
3
].
default
=
tempFormData
.
value
.
matchChValue
;
newCreateGradeFormItems
.
value
[
4
].
default
=
tempFormData
.
value
.
matchEnValue
;
}
}
};
const
handleTreeSelectNodeChange
=
(
node
,
item
,
nodeObj
)
=>
{
console
.
log
(
'handleTreeSelectNodeChange'
,
node
,
item
,
nodeObj
);
treeInfo
.
value
.
expandedKey
=
[];
treeInfo
.
value
.
currentNodeKey
=
node
.
guid
;
treeInfo
.
value
.
expandedKey
.
push
(
node
.
classifyGradeGuid
);
...
...
@@ -702,8 +792,8 @@ const deleteRow = (index: number) => {
</div>
<div>
<el-button
type=
"primary"
class=
"v-add"
@
click=
"addNewLabel"
>
新增
</el-button>
<el-button
class=
"v-import"
>
导入
</el-button>
<el-button>
导出
</el-button>
<
!--
<
el-button
class=
"v-import"
>
导入
</el-button>
<el-button>
导出
</el-button>
-->
</div>
<div
class=
"table_panel_wrap"
>
<Table
:tableInfo=
"tableInfo"
@
tableSwitchBeforeChange=
"tableSwitchBeforeChange"
...
...
@@ -868,6 +958,11 @@ const deleteRow = (index: number) => {
line-height
:
24px
;
font-weight
:
600
;
}
.el-dialog__body
{
height
:
510px
;
overflow
:
auto
;
}
}
}
</
style
>
...
...
src/views/data_inventory/tableCreateExisting.vue
View file @
cf47828
...
...
@@ -96,7 +96,7 @@ const getFieldTypeData = async () => {
}
const
res
:
any
=
await
getFieldTypeList
(
params
);
if
(
res
.
code
==
proxy
.
$passCode
)
{
fieldData
.
value
=
options
;
fieldData
.
value
=
res
.
data
;
}
else
{
proxy
.
$ElMessage
.
error
(
res
.
msg
);
}
...
...
@@ -253,6 +253,8 @@ const editableFields = {
gradeDetailName
:
true
,
// 分级可编辑
sourceFieldName
:
true
,
// 源字段英文名可编辑
classifyDetailGuid
:
true
,
// 分类可编辑
fieldType
:
true
,
// 字段类型可编辑
fieldChName
:
true
,
// 字段中文名可编辑
}
const
tableFieldsLoading
=
ref
(
false
)
...
...
@@ -542,7 +544,6 @@ const saveOrUpdate = async (params: any = {}, type) => {
database
:
''
,
databaseChName
:
''
,
foundMode
:
0
,
state
:
0
,
isDraft
:
''
,
fieldRQVOList
:
tableDataDetailInfo
.
value
}
...
...
@@ -716,16 +717,24 @@ const createNewSql = () => {
<el-table-column
type=
"selection"
:width=
"32"
align=
"center"
/>
<!-- 排序列(不可编辑) -->
<el-table-column
type=
"index"
label=
"排序"
width=
"80"
align=
"center"
/>
<!-- 字段中文名(
不
可编辑)fieldChName -->
<!-- 字段中文名(可编辑)fieldChName -->
<el-table-column
prop=
"fieldChName"
label=
"目标字段中文名"
width=
"150"
>
<!-- 可以编辑 -->
<
template
#
default=
"scope"
>
{{
scope
.
row
.
fieldChName
?
scope
.
row
.
fieldChName
:
'--'
}}
<span
v-if=
"!scope.row.isEdit || !editableFields.fieldChName"
>
{{
scope
.
row
.
fieldChName
?
scope
.
row
.
fieldChName
:
'--'
}}
</span>
<el-input
v-else
v-model=
"scope.row.fieldChName"
placeholder=
"请输入"
/>
</
template
>
</el-table-column>
<!-- 字段英文名(
不
可编辑) -->
<!-- 字段英文名(可编辑) -->
<el-table-column
prop=
"fieldName"
label=
"目标字段英文名"
width=
"150"
>
<
template
#
default=
"scope"
>
{{
scope
.
row
.
fieldName
?
scope
.
row
.
fieldName
:
'--'
}}
<span
v-if=
"!scope.row.isEdit || !editableFields.fieldName"
>
{{
scope
.
row
.
fieldName
?
scope
.
row
.
fieldName
:
'--'
}}
</span>
<el-input
v-else
v-model=
"scope.row.fieldName"
placeholder=
"请输入"
/>
</
template
>
</el-table-column>
<!-- 源数据库 -->
...
...
@@ -756,10 +765,19 @@ const createNewSql = () => {
<el-input
v-else
v-model=
"scope.row.sourceFieldName"
placeholder=
"请输入长度"
/>
</
template
>
</el-table-column>
<!-- 源端字段 fieldType-->
<!-- 源端字段 fieldType
fieldTypeProps
-->
<el-table-column
prop=
"fieldType"
label=
"源端字段类型"
width=
"150"
>
<
template
#
default=
"scope"
>
{{
scope
.
row
.
fieldType
?
scope
.
row
.
fieldType
:
'--'
}}
<div
v-if=
"scope.row.isEdit"
>
<el-select
v-model=
"scope.row.fieldType"
placeholder=
"选择类型"
clearable
filterable
:props=
"fieldTypeProps"
>
<el-option
v-for=
"(item, index) in fieldData"
:key=
"index"
:label=
"item.label"
:value=
"item.value"
></el-option>
</el-select>
</div>
<div
v-else
>
{{
fieldData
.
find
(
item
=>
item
.
value
===
scope
.
row
.
fieldType
)?.
label
||
'--'
}}
</div>
</
template
>
</el-table-column>
...
...
src/views/data_inventory/templateConfig.vue
View file @
cf47828
...
...
@@ -57,9 +57,18 @@ const getClassifyGradListData = async () => {
}
//获取分类列表
const
getClassListData
=
async
()
=>
{
const
getClassListData
=
async
(
params
=
{})
=>
{
const
inParams
=
{
type
:
'C'
,
pageIndex
:
1
,
pageSize
:
-
1
}
const
finalParams
=
{
...
inParams
,
...
params
}
classListDataLoading
.
value
=
true
;
const
res
:
any
=
await
getClassifyGradList
(
refClassifyPageParams
.
value
);
const
res
:
any
=
await
getClassifyGradList
(
finalParams
);
if
(
res
.
code
==
proxy
.
$passCode
)
{
classListData
.
value
=
res
.
data
.
records
||
[];
classListDataLoading
.
value
=
false
;
...
...
@@ -70,7 +79,7 @@ const getClassListData = async () => {
onMounted
(()
=>
{
getClassifyGradListData
();
getClassListData
();
//
getClassListData();
})
...
...
@@ -108,24 +117,30 @@ const cardBtnVisible: any = ref(false);
/** 搜索查询分类标准 */
const
searchClass
=
async
(
val
:
any
,
clear
:
boolean
=
false
)
=>
{
console
.
log
(
val
,
'val'
);
if
(
clear
)
{
classSearchItemList
.
value
.
map
(
item
=>
item
.
default
=
''
)
getClassListData
();
return
;
}
const
params
=
{
type
:
'C'
,
name
:
val
.
classStandardName
,
pageIndex
:
1
,
pageSize
:
-
1
}
const
res
:
any
=
await
getClassifyGradList
(
params
);
if
(
res
.
code
==
proxy
.
$passCode
)
{
classListData
.
value
=
res
.
data
.
records
||
[];
}
else
{
proxy
.
$ElMessage
.
error
(
res
.
msg
);
}
// const params = {
// type: 'C',
// name: val.classStandardName,
// pageIndex: 1,
// pageSize: -1
// }
// const res: any = await getClassifyGradList(params);
// if (res.code == proxy.$passCode) {
// classListData.value = res.data.records || [];
// } else {
// proxy.$ElMessage.error(res.msg);
// }
getClassListData
(
{
name
:
val
.
classStandardName
}
);
};
/** 编辑分类 */
...
...
@@ -232,7 +247,7 @@ const classStandardFormItems = ref([{
const
classStandardFormRules
=
ref
({
classStandardName
:
[
required
(
'请填写分类名称'
)],
gradeStandar
d
:
[
required
(
'请选择分级标准'
)]
refGradeGui
d
:
[
required
(
'请选择分级标准'
)]
});
const
newCreateClassStandardDialogInfo
=
ref
({
...
...
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