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
2c467c9c
authored
2025-07-11 10:31:11 +0800
by
lihua
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
标准代码表新增排序字段
1 parent
1d54f177
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
42 additions
and
4 deletions
src/components/Tree/index.vue
src/views/data_meta/components/standardDialog.vue
src/views/data_meta/standard-codetable.vue
src/views/data_meta/standard.vue
src/components/Tree/index.vue
View file @
2c467c9
...
...
@@ -45,6 +45,9 @@ const currentNodeKey = computed(() => {
if
(
props
.
treeInfo
.
currentNodeKey
)
{
nextTick
(()
=>
{
let
domItems
=
treeRef
.
value
?.
$el
.
getElementsByClassName
(
'el-tree-node'
);
if
(
!
domItems
?.
length
)
{
return
;
}
let
clientHeight
=
treeRef
.
value
?.
$el
.
clientHeight
;
for
(
const
item
of
domItems
)
{
if
(
item
.
getAttribute
(
'data-key'
)
==
props
.
treeInfo
.
currentNodeKey
)
{
...
...
src/views/data_meta/components/standardDialog.vue
View file @
2c467c9
...
...
@@ -62,6 +62,22 @@
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"12"
style=
"padding-right:10px;display: inline-flex;"
>
<el-form-item
label=
"排序字段"
prop=
"orderField"
style=
"width: 70%;"
>
<el-select
v-model=
"form.orderField"
placeholder=
"请选择"
>
<el-option
v-for=
"item in form.fieldRQVOS?.filter(f => f.fileNameCode != '').map(f =>
{
return {
value: f.fileNameCode,
label: fieldOptions.find(s => s.value == f.fileNameCode).label
}
}) || []" :label="item.label" :value="item.value" :key="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
""
prop=
"isDisplay"
style=
"margin-left: 12px;margin-top: 26px;"
>
<el-checkbox
v-model=
"form.isDisplay"
:true-label=
"'Y'"
:false-label=
"'N'"
>
是否展示
</el-checkbox>
</el-form-item>
</el-col>
<el-col
:span=
"24"
>
<el-form-item
label=
"描述"
prop=
"description"
>
...
...
@@ -78,6 +94,8 @@
<el-form-item
label=
"自定义字段选择"
v-if=
"fieldsTableShow"
required
>
<div
class=
"table-form"
>
<div
class=
"table-form-wrapper"
v-for=
"item,index in form.fieldRQVOS"
:key=
"index"
>
<div
:style=
"
{ display: 'inline-flex', width: !fieldsDisabled ? 'calc(100% - 30px)' : '100%' }">
<div
class=
"table-form-item"
>
<el-select
v-model=
"item.fileNameCode"
style=
"width:160px"
filterable
clearable
:disabled=
"fieldsDisabled"
>
<el-option
v-for=
"item in fieldOptions"
:label=
"item.label"
:value=
"item.value"
:key=
"item.value"
></el-option>
...
...
@@ -114,6 +132,7 @@
placeholder=
"请输入"
></el-input>
</div>
</div>
<div
class=
"table-form-operation"
v-if=
"!fieldsDisabled"
>
<!--
<el-icon
color=
"#4fa1a4"
@
click=
"() => addTableItem(index)"
>
<CirclePlus
/>
...
...
@@ -219,13 +238,16 @@ const formTpl = {
publishingUnitCode
:
''
,
parentGuid
:
''
,
description
:
''
,
fieldRQVOS
:
null
fieldRQVOS
:
null
,
orderField
:
''
,
//排序字段
isDisplay
:
'Y'
//是否显示
}
const
form
=
ref
({...
formTpl
})
const
formRules
=
{
standardName
:
{
required
:
true
,
message
:
'请填写元数据标准名称'
},
orderNum
:
{
required
:
true
,
message
:
'请填写排序'
},
publishingUnitCode
:
{
required
:
false
,
message
:
'请选择发布的单位'
}
publishingUnitCode
:
{
required
:
false
,
message
:
'请选择发布的单位'
},
orderField
:
{
required
:
true
,
message
:
'请选择排序字段'
},
}
function
parentGuidChange
(
val
)
{
...
...
@@ -325,7 +347,11 @@ function addTableItem (index) {
})
}
function
deleteTableItem
(
index
)
{
form
.
value
.
fieldRQVOS
.
splice
(
index
,
1
)
let
item
=
form
.
value
.
fieldRQVOS
[
index
];
form
.
value
.
fieldRQVOS
.
splice
(
index
,
1
);
if
(
form
.
value
.
orderField
==
item
.
fileNameCode
)
{
form
.
value
.
orderField
=
''
;
}
}
function
inputTypeChange
(
val
,
item
)
{
console
.
log
(
val
)
...
...
src/views/data_meta/standard-codetable.vue
View file @
2c467c9
...
...
@@ -1471,7 +1471,9 @@ const radioGroupChange = async (val, info) => {
}
function
initTree
()
{
treeInfo
.
value
.
loading
=
true
;
return
Promise
.
all
([
getParamsList
({
dictType
:
'标准类型'
}),
getStandardCodeTree
()]).
then
((
resList
:
any
)
=>
{
treeInfo
.
value
.
loading
=
false
;
let
treeRoot
=
resList
[
0
].
data
||
[]
let
treeData
=
resList
[
1
].
data
||
[]
// console.log('treeRoot', treeRoot)
...
...
src/views/data_meta/standard.vue
View file @
2c467c9
...
...
@@ -242,13 +242,20 @@ function getTableFields () {
if
(
res
.
code
===
proxy
.
$passCode
&&
res
.
data
)
{
const
data
=
res
.
data
standardFields
.
value
=
data
const
fields
=
data
.
map
(
item
=>
{
let
orderFieldIndex
=
null
;
const
fields
=
data
.
map
((
item
,
index
)
=>
{
if
(
currentObj
.
orderField
&&
currentObj
.
orderField
==
item
.
fileNameCode
)
{
orderFieldIndex
=
index
;
}
return
{
label
:
item
.
fileNameCodeName
,
field
:
item
.
fileNameCode
,
width
:
140
}
})
if
(
currentObj
.
orderField
&&
currentObj
.
isDisplay
==
'N'
)
{
fields
.
splice
(
orderFieldIndex
,
1
);
}
fields
.
unshift
(
indexField
)
tableInfo
.
value
.
fields
=
fields
}
else
{
...
...
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