Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
T
TF-MOM-WEB
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
TFMOM
TF-MOM-WEB
Commits
a016dfdd
Commit
a016dfdd
authored
Oct 27, 2023
by
xioln
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tab切换组件
parent
6c78cb49
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
103 deletions
+27
-103
config.js
.../privateComponents/components/UnqualifiedSearch/config.js
+8
-63
index.vue
.../privateComponents/components/UnqualifiedSearch/index.vue
+19
-40
No files found.
applications/dee-mes/src/privateComponents/components/UnqualifiedSearch/config.js
View file @
a016dfdd
...
@@ -5,80 +5,25 @@ export default {
...
@@ -5,80 +5,25 @@ export default {
title
:
'高级组件配置'
,
title
:
'高级组件配置'
,
data
:
[
data
:
[
{
{
key
:
'search
AttrModel
'
,
key
:
'search
Params
'
,
title
:
'搜索
模型
'
,
title
:
'搜索
参数配置
'
,
width
:
1
,
width
:
1
,
component
:
{
component
:
{
defaultValue
:
'
JobResponseInExperment
'
,
defaultValue
:
'
{"layKey":"JobResponseInExpermentQuery","typeName":"JobResponseInExperment"}
'
,
name
:
'el-input'
,
name
:
'el-input'
,
type
:
'textarea'
,
type
:
'textarea'
,
rows
:
'4'
rows
:
'4'
}
}
},
},
{
{
key
:
'searchAttrModel'
,
key
:
'tabParams'
,
title
:
'搜索模型'
,
title
:
'TAB参数配置'
,
component
:
{
width
:
1
,
defaultValue
:
'JobResponseInExperment'
,
name
:
'el-input'
}
},
{
key
:
'searchAttrNumber'
,
title
:
'搜索编号'
,
component
:
{
defaultValue
:
'JobResponseInExpermentQuery'
,
name
:
'el-input'
}
},
{
key
:
'attrTab1Name'
,
title
:
'TAB1名称'
,
component
:
{
defaultValue
:
'试验'
,
name
:
'el-input'
}
},
{
key
:
'attrTab1Model'
,
title
:
'TAB1模型'
,
component
:
{
defaultValue
:
'JobResponseInExperment'
,
name
:
'el-input'
}
},
{
key
:
'attrTab1Number'
,
title
:
'TAB1编号'
,
component
:
{
defaultValue
:
'unqualified_Table'
,
name
:
'el-input'
}
},
{
key
:
'attrTab2Name'
,
title
:
'TAB2名称'
,
component
:
{
defaultValue
:
'不合格品'
,
name
:
'el-input'
}
},
{
key
:
'attrTab2Model'
,
title
:
'TAB2模型'
,
component
:
{
defaultValue
:
'JobResponseInTest'
,
name
:
'el-input'
}
},
{
key
:
'attrTab2Number'
,
title
:
'TAB2编号'
,
component
:
{
component
:
{
defaultValue
:
'
unqualified_Table
'
,
defaultValue
:
'
[{"id":1,"name":"不合格品","typeName":"JobResponseInTest","layKey":"unqualified_Table"},{"id":2,"name":"试验","typeName":"JobResponseInExperment","layKey":"unqualified_Table"}]
'
,
name
:
'el-input'
,
name
:
'el-input'
,
type
:
'textarea'
,
type
:
'textarea'
,
rows
:
'
2
'
rows
:
'
4
'
}
}
}
}
]
]
...
...
applications/dee-mes/src/privateComponents/components/UnqualifiedSearch/index.vue
View file @
a016dfdd
...
@@ -14,19 +14,16 @@
...
@@ -14,19 +14,16 @@
<dee-tab
<dee-tab
ref=
"deetab"
ref=
"deetab"
class=
"dee-tab"
class=
"dee-tab"
:tabs=
"tabs"
:tabs=
"tab
Option
s"
@
tabClick=
"tabClick"
@
tabClick=
"tabClick"
>
>
<div
slot=
"1
"
>
<div
v-for=
"(item, index) in tabOptions"
:key=
"index"
:slot=
"item.id
"
>
<dee-as-com
<dee-as-com
ref=
"deetab1"
:ref=
"item.id"
:lay-config=
"tab1Options"
:lay-config=
"
{
/>
typeName: item.typeName,
</div>
layKey: item.layKey
<div
slot=
"2"
>
}"
<dee-as-com
ref=
"deetab2"
:lay-config=
"tab2Options"
/>
/>
</div>
</div>
</dee-tab>
</dee-tab>
...
@@ -49,24 +46,10 @@ export default {
...
@@ -49,24 +46,10 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
tabs
:
[
serchOptions
:
{},
{
id
:
'1'
,
name
:
''
},
tabOptions
:
[],
{
id
:
'2'
,
name
:
''
}
],
serchOptions
:
{
typeName
:
''
,
layKey
:
''
},
tab1Options
:
{
typeName
:
''
,
layKey
:
''
},
tab2Options
:
{
typeName
:
''
,
layKey
:
''
},
searchItems
:
[],
searchItems
:
[],
currTab
:
1
currTab
:
null
}
}
},
},
computed
:
{},
computed
:
{},
...
@@ -75,14 +58,14 @@ export default {
...
@@ -75,14 +58,14 @@ export default {
immediate
:
true
,
immediate
:
true
,
deep
:
true
,
deep
:
true
,
handler
(
v
)
{
handler
(
v
)
{
this
.
tabs
[
0
].
name
=
v
.
attrTab1Name
this
.
$nextTick
(()
=>
{
this
.
tabs
[
1
].
name
=
v
.
attrTab2Name
if
(
v
.
hasOwnProperty
(
'searchParams'
))
{
this
.
serchOptions
.
typeName
=
v
.
searchAttrModel
this
.
serchOptions
=
JSON
.
parse
(
v
.
searchParams
)
this
.
serchOptions
.
layKey
=
v
.
searchAttrNumber
}
this
.
tab1Options
.
typeName
=
v
.
attrTab1Model
if
(
v
.
hasOwnProperty
(
'tabParams'
))
{
this
.
tab1Options
.
layKey
=
v
.
attrTab1Number
this
.
tabOptions
=
JSON
.
parse
(
v
.
tabParams
)
this
.
tab2Options
.
typeName
=
v
.
attrTab2Model
}
this
.
tab2Options
.
layKey
=
v
.
attrTab2Number
})
}
}
}
}
},
},
...
@@ -99,11 +82,7 @@ export default {
...
@@ -99,11 +82,7 @@ export default {
this
.
searchFun
()
this
.
searchFun
()
},
},
searchFun
()
{
searchFun
()
{
if
(
this
.
currTab
===
1
)
{
this
.
$refs
[
this
.
currTab
][
0
].
$refs
.
asCom
.
getData
(
this
.
searchItems
)
this
.
$refs
.
deetab1
.
$refs
.
asCom
.
getData
(
this
.
searchItems
)
}
else
{
this
.
$refs
.
deetab2
.
$refs
.
asCom
.
getData
(
this
.
searchItems
)
}
}
}
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment