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
e5e8fd45
authored
2025-06-27 14:07:34 +0800
by
fanguang
Committed by
lihua
2025-06-30 14:35:21 +0800
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix
1 parent
f900a1dd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
18 deletions
src/views/data_meta/components/standardDialog.vue
src/views/data_meta/components/standardFieldsDialog.vue
src/views/data_meta/components/standardDialog.vue
View file @
e5e8fd4
...
...
@@ -22,19 +22,19 @@
<el-input
v-model=
"form.standardCode"
placeholder=
"请输入"
maxlength=
"20"
/>
</el-form-item>
</el-col>
<el-col
:span=
"
4
"
style=
"padding-right:10px"
>
<el-col
:span=
"
12
"
style=
"padding-right:10px"
>
<el-form-item
label=
"排序"
prop=
"orderNum"
>
<el-input
v-model=
"form.orderNum"
placeholder=
"请输入"
type=
"number"
maxlength=
"2"
/>
</el-form-item>
</el-col>
<el-col
:span=
"
8
"
style=
"padding-right:10px"
>
<el-col
:span=
"
12
"
style=
"padding-right:10px"
>
<el-form-item
label=
"发布单位"
prop=
"publishingUnitCode"
>
<el-select
v-model=
"form.publishingUnitCode"
placeholder=
"请选择"
>
<el-option
v-for=
"item in publishUnitOptions"
:label=
"item.label"
:value=
"item.value"
:key=
"item.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
style=
"padding-right:10px"
>
<el-form-item
label=
"上级标准"
prop=
"parentGuid"
>
<el-tree-select
v-model=
"form.parentGuid"
...
...
@@ -47,7 +47,7 @@
check-strictly
placeholder=
"请选择"
:disabled=
"parentGuidDisabled"
@
check
-change
=
"parentGuidCheck"
@
check=
"parentGuidCheck"
/>
<!--
<el-cascader
v-model=
"form.parentGuid"
...
...
@@ -62,7 +62,13 @@
</el-col>
<el-col
:span=
"24"
>
<el-form-item
label=
"描述"
prop=
"description"
>
<el-input
v-model=
"form.description"
placeholder=
"请输入"
type=
"textarea"
/>
<el-input
v-model=
"form.description"
placeholder=
"请输入"
type=
"textarea"
maxlength=
"200"
rows=
"4"
show-word-limit
/>
</el-form-item>
</el-col>
<el-col
:span=
"24"
>
...
...
@@ -246,20 +252,19 @@ function parentGuidChange (val) {
form
.
value
.
fieldRQVOS
=
[{...
tableFormTpl
}]
}
}
function
parentGuidCheck
(
node
,
isCheck
)
{
console
.
log
(
node
,
isCheck
)
if
(
!
node
||
!
isCheck
)
{
form
.
value
.
fieldRQVOS
=
[]
return
}
if
(
node
.
level
==
1
)
{
form
.
value
.
fieldRQVOS
=
[{...
tableFormTpl
}]
}
function
parentGuidCheck
(
node
,
{
checkedKeys
})
{
// console.log(node, isCheck)
// if (!node || !isCheck) {
// form.value.fieldRQVOS = []
// return
// }
// form.value.fieldRQVOS = [{...tableFormTpl}]
form
.
value
.
fieldRQVOS
=
checkedKeys
.
length
?
[{...
tableFormTpl
}]
:
[]
}
const
tableFormTpl
=
{
fileNameCode
:
''
,
isNotnull
:
'
Y
'
,
isNotnull
:
'
N
'
,
isDisplay
:
'N'
,
inputTypeCode
:
''
,
dataTypeCode
:
null
,
...
...
src/views/data_meta/components/standardFieldsDialog.vue
View file @
e5e8fd4
...
...
@@ -6,7 +6,14 @@
class=
"standard-meta-modal"
:close-on-click-modal=
"false"
>
<el-form
:model=
"form"
:rules=
"formRules"
ref=
"formEl"
style=
"min-height: 200px;"
require-asterisk-position=
"right"
>
<el-form
:model=
"form"
:rules=
"formRules"
ref=
"formEl"
style=
"min-height: 200px;"
require-asterisk-position=
"right"
v-loading=
"loading"
>
<el-row>
<el-col
v-for=
"item,index in fields"
:key=
"index"
:span=
"12"
style=
"padding-right:10px;"
>
<el-form-item
:label=
"item.fileNameCodeName"
:prop=
"item.fileNameCode"
>
...
...
@@ -87,6 +94,7 @@ const formEl = ref()
const
form
=
ref
({})
const
formRules
=
ref
({})
const
formOptions
=
ref
({})
const
detail
=
ref
({})
async
function
initForm
()
{
const
{
fields
,
type
,
data
}
=
props
...
...
@@ -98,6 +106,7 @@ async function initForm () {
let
detailData
:
any
=
{}
if
(
type
===
'edit'
)
{
detailData
=
await
getDetail
()
detail
.
value
=
detailData
}
fields
.
forEach
(
async
(
item
:
any
)
=>
{
formData
[
item
.
fileNameCode
]
=
type
===
'add'
?
''
:
detailData
.
metaStandardValue
[
item
.
fileNameCode
]
...
...
@@ -127,13 +136,15 @@ function getOptions (dictType) {
})
})
}
const
loading
=
ref
(
false
)
function
getDetail
()
{
return
new
Promise
((
resolve
)
=>
{
loading
.
value
=
true
getMetaStandardFieldsDetail
(
props
.
data
.
guid
).
then
((
res
:
any
)
=>
{
if
(
res
.
code
===
proxy
.
$passCode
)
{
resolve
(
res
.
data
)
}
})
})
.
finally
(()
=>
loading
.
value
=
false
)
})
}
...
...
@@ -143,7 +154,7 @@ function confirm () {
formEl
.
value
.
validate
(
valid
=>
{
if
(
!
valid
)
return
let
body
=
{
metaStandardGuid
:
props
.
metaStandardGuid
,
metaStandardGuid
:
props
.
type
===
'edit'
?
detail
.
value
.
metaStandardGuid
:
props
.
metaStandardGuid
,
metaStandardValue
:
{
...
form
.
value
}
}
if
(
props
.
type
===
'edit'
)
{
...
...
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