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
a864307d
authored
2025-06-27 16:35:36 +0800
by
fanguang
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix
1 parent
2362ad98
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
13 deletions
src/views/data_meta/components/standardDialog.vue
src/views/data_meta/components/standardDialog.vue
View file @
a864307
...
...
@@ -77,40 +77,40 @@
<div
class=
"table-form"
>
<div
class=
"table-form-wrapper"
v-for=
"item,index in form.fieldRQVOS"
:key=
"index"
>
<div
class=
"table-form-item"
>
<el-select
v-model=
"item.fileNameCode"
style=
"width:160px"
clearable
:disabled=
"fields
Disabled"
>
<el-select
v-model=
"item.fileNameCode"
style=
"width:160px"
filterable
clearable
:disabled=
"fieldsDisabled || fieldsControl
Disabled"
>
<el-option
v-for=
"item in fieldOptions"
:label=
"item.label"
:value=
"item.value"
:key=
"item.value"
></el-option>
</el-select>
</div>
<div
class=
"table-form-item"
>
<el-select
v-model=
"item.isNotnull"
style=
"width: 96px"
placeholder=
"是否必填"
clearable
:disabled=
"fieldsDisabled"
>
<el-select
v-model=
"item.isNotnull"
style=
"width: 96px"
placeholder=
"是否必填"
clearable
:disabled=
"fieldsDisabled
|| fieldsControlDisabled
"
>
<el-option
v-for=
"item in isBooleanOptions"
:label=
"item.label"
:value=
"item.value"
:key=
"item.value"
></el-option>
</el-select>
</div>
<div
class=
"table-form-item"
>
<el-select
v-model=
"item.isDisplay"
style=
"width:96px"
placeholder=
"是否展示"
clearable
:disabled=
"fieldsDisabled"
>
<el-select
v-model=
"item.isDisplay"
style=
"width:96px"
placeholder=
"是否展示"
clearable
:disabled=
"fieldsDisabled
|| fieldsControlDisabled
"
>
<el-option
v-for=
"item in isBooleanOptions"
:label=
"item.label"
:value=
"item.value"
:key=
"item.value"
></el-option>
</el-select>
</div>
<div
class=
"table-form-item"
>
<el-select
v-model=
"item.inputTypeCode"
style=
"width:130px"
clearable
:disabled=
"fieldsDisabled"
<el-select
v-model=
"item.inputTypeCode"
style=
"width:130px"
clearable
:disabled=
"fieldsDisabled
|| fieldsControlDisabled
"
@
change=
"v => inputTypeChange(v, item)"
>
<el-option
v-for=
"item in inputOptions"
:label=
"item.label"
:value=
"item.value"
:key=
"item.value"
></el-option>
</el-select>
</div>
<div
class=
"table-form-item"
>
<el-select
v-if=
"item.inputTypeCode == 2"
v-model=
"item.dataTypeCode"
style=
"width:160px"
filterable
clearable
:disabled=
"fieldsDisabled"
>
<el-select
v-if=
"item.inputTypeCode == 2"
v-model=
"item.dataTypeCode"
style=
"width:160px"
filterable
clearable
:disabled=
"fieldsDisabled
|| fieldsControlDisabled
"
>
<el-option
v-for=
"item in allDictOptions"
:label=
"item.dictTypeName"
:value=
"item.dictTypeName"
:key=
"item.guid"
></el-option>
</el-select>
<el-input
v-else-if=
"item.inputTypeCode == 3"
v-model=
"item.validateExpression"
placeholder=
"请输入"
></el-input>
</div>
<div
class=
"table-form-operation"
v-if=
"!fieldsDisabled"
>
<div
class=
"table-form-operation"
v-if=
"!fieldsDisabled
&& !fieldsControlDisabled
"
>
<!--
<el-icon
color=
"#4fa1a4"
@
click=
"() => addTableItem(index)"
>
<CirclePlus
/>
</el-icon>
-->
<el-icon
color=
"#b2b2b2"
@
click=
"() => deleteTableItem(index)"
:size=
"22"
class=
"custom-icon"
style=
"margin-top:3px"
><Delete
/></el-icon>
</div>
</div>
<div
class=
"table-form-add"
v-if=
"!fieldsDisabled"
>
<div
class=
"table-form-add"
v-if=
"!fieldsDisabled
&& !fieldsControlDisabled
"
>
<el-icon
color=
"#4fa1a4"
@
click=
"() => addTableItem(index)"
:size=
"20"
class=
"custom-icon"
>
<CirclePlus
/>
</el-icon>
...
...
@@ -135,7 +135,10 @@
// import { cloneDeep } from 'lodesh-es'
import
{
watch
}
from
'vue'
import
{
Search
,
CirclePlus
,
Delete
}
from
'@element-plus/icons-vue'
import
{
saveMetaStandard
,
deleteMetaStandard
,
updateMetaStandard
,
getMetaStandardDetail
}
from
'@/api/modules/dataMetaService'
import
{
saveMetaStandard
,
deleteMetaStandard
,
updateMetaStandard
,
getMetaStandardDetail
,
getMetaStandardTree
}
from
'@/api/modules/dataMetaService'
import
{
getParamsList
,
getDictAllList
}
from
'@/api/modules/dataAsset'
...
...
@@ -201,6 +204,7 @@ const fieldsDisabled = computed(() => {
return
true
}
})
const
fieldsControlDisabled
=
ref
(
true
)
const
treeSelectData
=
ref
([])
/**
...
...
@@ -254,21 +258,35 @@ function parentGuidChange (val) {
}
}
function
parentGuidCheck
(
node
,
{
checkedKeys
})
{
fieldsControlDisabled
.
value
=
false
if
(
node
.
level
==
1
)
{
let
fieldRQVOS
=
null
if
(
checkedKeys
.
length
)
{
fieldRQVOS
=
[{...
tableFormTpl
}]
}
form
.
value
.
fieldRQVOS
=
fieldRQVOS
// 新增状态,上级标准带出标准编号和发布单位
if
(
props
.
type
===
'add'
)
{
return
}
// 上级标准带出标准编号和发布单位
// loading.value = true
getMetaStandardDetail
(
node
.
guid
).
then
((
res
:
any
)
=>
{
if
(
res
.
code
===
proxy
.
$passCode
)
{
const
data
=
res
.
data
if
(
!
form
.
value
.
standardCode
)
{
form
.
value
.
standardCode
=
data
.
standardCode
}
if
(
!
form
.
value
.
publishingUnitCode
)
{
form
.
value
.
publishingUnitCode
=
data
.
publishingUnitCode
}
})
form
.
value
.
fieldRQVOS
=
data
.
fieldRSVOS
if
(
data
.
fieldRSVOS
)
{
fieldsControlDisabled
.
value
=
true
}
else
{
fieldsControlDisabled
.
value
=
false
}
}
})
}
const
tableFormTpl
=
{
...
...
@@ -333,17 +351,33 @@ function confirm () {
})
}
function
getTreeSelectOptions
()
{
return
getMetaStandardTree
().
then
((
res
:
any
)
=>
{
if
(
res
.
code
===
proxy
.
$passCode
)
{
let
data
=
res
.
data
||
[]
data
.
forEach
(
item
=>
{
item
.
showEdit
=
true
item
.
level
=
1
})
treeSelectData
.
value
=
data
}
})
}
watch
(
()
=>
visible
.
value
,
(
v
)
=>
{
if
(
!
v
)
return
// 上级标准:不能选自己,有数据的标准不能选
treeSelectData
.
value
=
JSON
.
parse
(
JSON
.
stringify
(
props
.
standardOptions
))
fieldsControlDisabled
.
value
=
true
// treeSelectData.value = JSON.parse(JSON.stringify(props.standardOptions))
if
(
props
.
type
===
'edit'
)
{
getTreeSelectOptions
().
then
(()
=>
{
getDetail
().
then
(()
=>
formatOptions
(
treeSelectData
.
value
))
})
}
else
{
form
.
value
=
{
...
formTpl
}
formatOptions
(
treeSelectData
.
value
)
getTreeSelectOptions
().
then
(()
=>
formatOptions
(
treeSelectData
.
value
)
)
}
setTimeout
(()
=>
{
formEl
.
value
.
clearValidate
()
...
...
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