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
5bb31ef3
authored
2025-06-26 15:35:03 +0800
by
fanguang
Committed by
lihua
2025-06-30 14:35:19 +0800
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
style
1 parent
3c46fb8e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
48 additions
and
26 deletions
src/views/data_meta/components/dictFileds.vue
src/views/data_meta/components/standardDialog.vue
src/views/data_meta/components/standardFieldsDialog.vue
src/views/data_meta/components/dictFileds.vue
View file @
5bb31ef
...
...
@@ -233,23 +233,19 @@ const tableBtnClick = (scope, btn) => {
}
else
if
(
type
==
'save'
)
{
saveData
(
scope
)
}
else
if
(
type
==
'cancel'
)
{
console
.
log
(
'cancel'
)
if
(
row
.
guid
!=
undefined
)
{
// row = orginData.value[(page.value.curr - 1) * page.value.limit + scope.$index]
row
=
JSON
.
parse
(
JSON
.
stringify
(
orginData
.
value
[
scope
.
$index
]))
row
.
STATE
=
''
row
.
STATUS
=
''
tableData
.
value
[
scope
.
$index
]
=
row
console
.
log
(
'1111'
)
}
else
{
tableData
.
value
.
splice
(
scope
.
$index
,
1
)
orginData
.
value
.
splice
(
scope
.
$index
,
1
)
console
.
log
(
'2222'
)
}
tableInfo
.
value
.
page
.
rows
=
tableData
.
value
.
length
//
tableInfo.value.page.rows = tableData.value.length
let
haveState
=
tableData
.
value
.
some
(
item
=>
item
.
STATE
)
saveDisabled
.
value
=
!
haveState
console
.
log
(
'3333'
)
}
else
if
(
type
==
'remove'
)
{
open
(
"是否确定删除所选数据?"
,
"warning"
);
}
...
...
src/views/data_meta/components/standardDialog.vue
View file @
5bb31ef
<
template
>
<el-dialog
v-model=
"visible"
:title=
"title"
width=
"900"
modal-class=
"standard-modal"
>
<el-drawer
v-model=
"visible"
:title=
"title"
size=
"760px"
class=
"standard-modal"
:close-on-click-modal=
"false"
>
<el-form
:rules=
"formRules"
:model=
"form"
ref=
"formEl"
require-asterisk-position=
"right"
>
<el-row>
<el-col
:span=
"12"
style=
"padding-right:10px"
>
...
...
@@ -75,28 +81,37 @@
</el-select>
</div>
<div
class=
"table-form-item"
>
<el-select
v-if=
"item.inputTypeCode == 2"
v-model=
"item.dataTypeCode"
style=
"width:
22
0px"
size=
"small"
filterable
clearable
>
<el-select
v-if=
"item.inputTypeCode == 2"
v-model=
"item.dataTypeCode"
style=
"width:
16
0px"
size=
"small"
filterable
clearable
>
<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"
>
<el-icon
color=
"#4fa1a4"
@
click=
"() => addTableItem(index)"
>
<
!--
<
el-icon
color=
"#4fa1a4"
@
click=
"() => addTableItem(index)"
>
<CirclePlus
/>
</el-icon>
<el-icon
color=
"#
F56C6C
"
@
click=
"() => deleteTableItem(index)"
><Delete
/></el-icon>
</el-icon>
-->
<el-icon
color=
"#
b2b2b2
"
@
click=
"() => deleteTableItem(index)"
><Delete
/></el-icon>
</div>
</div>
<div
class=
"table-form-add"
>
<el-icon
color=
"#4fa1a4"
@
click=
"() => addTableItem(index)"
>
<CirclePlus
/>
</el-icon>
<span
@
click=
"() => addTableItem(index)"
style=
"cursor: pointer;"
>
添加字段
</span>
</div>
</div>
</el-form-item>
</el-col>
</el-row>
</el-form>
<template
#
footer
>
<el-button
@
click=
"visible = false"
:disabled=
"confirmLoading"
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"confirm"
:loading=
"confirmLoading"
>
确认
</el-button>
<div
style=
"text-align:right"
>
<el-button
@
click=
"visible = false"
:disabled=
"confirmLoading"
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"confirm"
:loading=
"confirmLoading"
>
确认
</el-button>
</div>
</
template
>
</el-dialog>
</el-drawer>
</template>
<
script
setup
lang=
"ts"
>
...
...
@@ -135,7 +150,7 @@ const visible = computed({
}
})
const
title
=
computed
(()
=>
{
return
props
.
type
===
'add'
?
'新
建元标准'
:
'编辑元
标准'
return
props
.
type
===
'add'
?
'新
增元数据标准'
:
'编辑元数据
标准'
})
/**
...
...
@@ -195,7 +210,8 @@ const tableFormTpl = {
}
function
addTableItem
(
index
)
{
const
tableObj
=
{
...
tableFormTpl
}
form
.
value
.
fieldRQVOS
.
splice
(
index
+
1
,
0
,
tableObj
)
// form.value.fieldRQVOS.splice(index + 1, 0, tableObj)
form
.
value
.
fieldRQVOS
.
push
(
tableObj
)
}
function
deleteTableItem
(
index
)
{
form
.
value
.
fieldRQVOS
.
splice
(
index
,
1
)
...
...
@@ -295,8 +311,9 @@ onBeforeMount(() => {
justify-content
:
flex-start
;
}
}
.el-d
ialog
__footer
{
.el-d
rawer
__footer
{
padding
:
10px
;
justify-content
:
flex-end
;
}
.el-dialog__body
{
height
:
500px
;
...
...
@@ -309,9 +326,14 @@ onBeforeMount(() => {
padding-right
:
10px
;
}
.table-form-operation
{
flex
:
0
0
7
0px
;
padding-left
:
6px
;
flex
:
0
0
3
0px
;
//
padding-left
:
6px
;
}
}
.table-form-add
{
display
:
flex
;
align-items
:
center
;
color
:
#4fa1a4
;
}
}
</
style
>
\ No newline at end of file
...
...
src/views/data_meta/components/standardFieldsDialog.vue
View file @
5bb31ef
<
template
>
<el-d
ialog
<el-d
rawer
v-model=
"visible"
:title=
"title"
width=
"600"
modal-class=
"standard-modal"
width=
"520"
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-row>
...
...
@@ -36,10 +37,12 @@
</el-row>
</el-form>
<template
#
footer
>
<el-button
@
click=
"visible = false"
:disabled=
"confirmLoading"
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"confirm"
:loading=
"confirmLoading"
>
确认
</el-button>
<div
style=
"text-align:right"
>
<el-button
@
click=
"visible = false"
:disabled=
"confirmLoading"
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"confirm"
:loading=
"confirmLoading"
>
确认
</el-button>
</div>
</
template
>
</el-d
ialog
>
</el-d
rawer
>
</template>
<
script
setup
lang=
"ts"
>
...
...
@@ -197,15 +200,16 @@ onBeforeMount(() => {
</
script
>
<
style
lang=
"scss"
>
.standard-modal
{
.standard-m
eta-m
odal
{
.el-form-item
{
flex-direction
:
column
;
.el-form-item__label
{
justify-content
:
flex-start
;
}
}
.el-d
ialog
__footer
{
.el-d
rawer
__footer
{
padding
:
10px
;
justify-content
:
flex-end
;
}
.table-form-wrapper
{
...
...
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