Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
template_vue
Project
Project
Details
Activity
Releases
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
胡宝山
template_vue
Commits
3a59492c
Commit
3a59492c
authored
May 05, 2024
by
高宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.优化代码
parent
6c24d998
Changes
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
520 additions
and
399 deletions
+520
-399
tagfour.vue
src/views/template/components/tagfour.vue
+448
-391
templateFirst.vue
src/views/template/templateFirst.vue
+72
-8
No files found.
src/views/template/components/tagfour.vue
View file @
3a59492c
<
template
>
<
template
>
<div
class=
"tagfour"
>
<div
class=
"tagfour"
>
<div
class=
"tarButonArea"
>
<div
class=
"tarButonArea"
v-show=
"!isupload"
>
<el-button
type=
"primary"
class=
"tarButon"
@
click=
"upload"
>
上传
</el-button>
<el-button
type=
"primary"
class=
"tarButon"
@
click=
"upload"
>
上传
</el-button>
</div>
</div>
<!-- 第一个模板 -->
<!-- 第一个模板 -->
<div
v-if=
"showTable"
>
<div
class=
"tableArea"
v-if=
"index === 0 || index=== 4"
>
<div
class=
"tableArea"
v-if=
"index === 0 || index=== 4"
>
<div
class=
"measureTable"
>
<div
class=
"measureTable"
>
<!-- 测量 -->
<!-- 测量 -->
...
@@ -125,8 +126,8 @@
...
@@ -125,8 +126,8 @@
<div
class=
"tableHear"
style=
"border-right: 1px solid;border-top: 1px solid"
>
<div
class=
"tableHear"
style=
"border-right: 1px solid;border-top: 1px solid"
>
<div
class=
"firstCell"
style=
"border-bottom: 1px solid"
>
WD2
</div>
<div
class=
"firstCell"
style=
"border-bottom: 1px solid"
>
WD2
</div>
<div
class=
"secondCell"
style=
"border-bottom: 1px solid"
>
<div
class=
"secondCell"
style=
"border-bottom: 1px solid"
>
<div
class=
"cellContent"
>
{{
form
.
WDBList
[
0
]
?
parseFloat
(
form
.
WDA
List
[
0
]).
toFixed
(
3
)
:
'-'
}}
</div>
<div
class=
"cellContent"
>
{{
form
.
WDBList
[
0
]
?
parseFloat
(
form
.
WDB
List
[
0
]).
toFixed
(
3
)
:
'-'
}}
</div>
<div
class=
"cellContent"
>
{{
form
.
WDBList
[
1
]
?
parseFloat
(
form
.
WDA
List
[
1
]).
toFixed
(
3
)
:
'-'
}}
</div>
<div
class=
"cellContent"
>
{{
form
.
WDBList
[
1
]
?
parseFloat
(
form
.
WDB
List
[
1
]).
toFixed
(
3
)
:
'-'
}}
</div>
</div>
</div>
<div
class=
"threeCell"
style=
"border-bottom: 1px solid"
>
{{
form
.
WDBList
[
2
]
?
parseFloat
(
form
.
WDBList
[
2
]).
toFixed
(
3
)
:
'-'
}}
</div>
<div
class=
"threeCell"
style=
"border-bottom: 1px solid"
>
{{
form
.
WDBList
[
2
]
?
parseFloat
(
form
.
WDBList
[
2
]).
toFixed
(
3
)
:
'-'
}}
</div>
<div
class=
"threeCell"
style=
"border-bottom: 1px solid"
>
{{
form
.
WDBList
[
3
]
?
parseFloat
(
form
.
WDBList
[
3
]).
toFixed
(
3
)
:
'-'
}}
</div>
<div
class=
"threeCell"
style=
"border-bottom: 1px solid"
>
{{
form
.
WDBList
[
3
]
?
parseFloat
(
form
.
WDBList
[
3
]).
toFixed
(
3
)
:
'-'
}}
</div>
...
@@ -199,7 +200,7 @@
...
@@ -199,7 +200,7 @@
</div>
</div>
</div>
</div>
<!-- 第二个模板-->
<!-- 第二个模板-->
<div
class=
"TwotableArea"
v-if=
"index === 1 || index === 2 || index === 5 || index=== 6"
>
<div
class=
"TwotableArea"
v-if=
"index === 1 || index === 2 || index === 5 || index=== 6"
>
<div
class=
"measureTable"
>
<div
class=
"measureTable"
>
<!-- 测量 -->
<!-- 测量 -->
...
@@ -324,7 +325,7 @@
...
@@ -324,7 +325,7 @@
</div>
</div>
</div>
</div>
</div>
</div>
<!-- 第三格模板-->
<!-- 第三格模板-->
<div
class=
"threetableArea"
v-if=
"index === 3"
>
<div
class=
"threetableArea"
v-if=
"index === 3"
>
<div
class=
"measureTable"
>
<div
class=
"measureTable"
>
<!-- 测量 -->
<!-- 测量 -->
...
@@ -426,6 +427,8 @@
...
@@ -426,6 +427,8 @@
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- 对话框 -->
<!-- 对话框 -->
<el-dialog
:title=
"dialogController.title"
:visible
.
sync=
"dialogController.open"
width=
"600px"
<el-dialog
:title=
"dialogController.title"
:visible
.
sync=
"dialogController.open"
width=
"600px"
:close-on-click-modal=
"false"
append-to-body
>
:close-on-click-modal=
"false"
append-to-body
>
...
@@ -463,12 +466,27 @@ export default {
...
@@ -463,12 +466,27 @@ export default {
defaultObject
:
{
defaultObject
:
{
type
:
Object
,
type
:
Object
,
required
:
true
required
:
true
},
defaultControls
:
{
type
:
String
,
required
:
true
},
defaultShow
:
{
type
:
String
,
}
// 是否显示table 1:显示 0:不显示
},
computed
:
{
showTable
()
{
return
this
.
defaultShow
===
'1'
}
}
},
},
data
()
{
data
()
{
return
{
return
{
index
:
this
.
defaultIndex
,
index
:
this
.
defaultIndex
,
form
:
this
.
defaultObject
,
form
:
this
.
defaultObject
,
// 是否上传按钮
isupload
:
this
.
defaultControls
===
'0'
||
this
.
defaultControls
===
'3'
?
false
:
true
,
// 对话框控制器
// 对话框控制器
dialogController
:
{
dialogController
:
{
title
:
''
,
title
:
''
,
...
@@ -535,6 +553,7 @@ export default {
...
@@ -535,6 +553,7 @@ export default {
this
.
form
.
projectAList
=
projectAList
this
.
form
.
projectAList
=
projectAList
this
.
form
.
projetcBList
=
projetcBList
this
.
form
.
projetcBList
=
projetcBList
this
.
form
.
projectCList
=
projectCList
this
.
form
.
projectCList
=
projectCList
this
.
form
.
projectDList
=
[]
this
.
index
=
this
.
sheetForm
.
sheetIndex
this
.
index
=
this
.
sheetForm
.
sheetIndex
this
.
dialogController
.
open
=
false
this
.
dialogController
.
open
=
false
// 提交给父组件
// 提交给父组件
...
@@ -561,6 +580,11 @@ export default {
...
@@ -561,6 +580,11 @@ export default {
this
.
form
.
WDAList
=
WDAList
this
.
form
.
WDAList
=
WDAList
this
.
form
.
projectDList
=
projectDList
this
.
form
.
projectDList
=
projectDList
this
.
index
=
this
.
sheetForm
.
sheetIndex
this
.
index
=
this
.
sheetForm
.
sheetIndex
this
.
form
.
LDB
=
[]
this
.
form
.
WDBList
=
[]
this
.
form
.
projectAList
=
[]
this
.
form
.
projectCList
=
[]
this
.
form
.
projetcBList
=
[]
this
.
dialogController
.
open
=
false
this
.
dialogController
.
open
=
false
}
}
if
(
this
.
sheetForm
.
sheetIndex
===
2
)
{
if
(
this
.
sheetForm
.
sheetIndex
===
2
)
{
...
@@ -584,6 +608,11 @@ export default {
...
@@ -584,6 +608,11 @@ export default {
this
.
form
.
LDA
=
LDAList
this
.
form
.
LDA
=
LDAList
this
.
form
.
WDAList
=
WDAList
this
.
form
.
WDAList
=
WDAList
this
.
form
.
projectDList
=
projectDList
this
.
form
.
projectDList
=
projectDList
this
.
form
.
LDB
=
[]
this
.
form
.
WDBList
=
[]
this
.
form
.
projectAList
=
[]
this
.
form
.
projectCList
=
[]
this
.
form
.
projetcBList
=
[]
this
.
index
=
this
.
sheetForm
.
sheetIndex
this
.
index
=
this
.
sheetForm
.
sheetIndex
this
.
dialogController
.
open
=
false
this
.
dialogController
.
open
=
false
}
}
...
@@ -607,6 +636,12 @@ export default {
...
@@ -607,6 +636,12 @@ export default {
this
.
form
.
LDA
=
LDList
this
.
form
.
LDA
=
LDList
this
.
form
.
WDAList
=
WDAList
this
.
form
.
WDAList
=
WDAList
this
.
form
.
projectDList
=
projectDList
this
.
form
.
projectDList
=
projectDList
this
.
form
.
LD
=
[]
this
.
form
.
LDB
=
[]
this
.
form
.
WDBList
=
[]
this
.
form
.
projectAList
=
[]
this
.
form
.
projectCList
=
[]
this
.
form
.
projetcBList
=
[]
this
.
index
=
this
.
sheetForm
.
sheetIndex
this
.
index
=
this
.
sheetForm
.
sheetIndex
this
.
dialogController
.
open
=
false
this
.
dialogController
.
open
=
false
}
}
...
@@ -645,6 +680,7 @@ export default {
...
@@ -645,6 +680,7 @@ export default {
this
.
form
.
projectAList
=
projectAList
this
.
form
.
projectAList
=
projectAList
this
.
form
.
projetcBList
=
projetcBList
this
.
form
.
projetcBList
=
projetcBList
this
.
form
.
projectCList
=
projectCList
this
.
form
.
projectCList
=
projectCList
this
.
form
.
projectDList
=
[]
this
.
index
=
this
.
sheetForm
.
sheetIndex
this
.
index
=
this
.
sheetForm
.
sheetIndex
this
.
dialogController
.
open
=
false
this
.
dialogController
.
open
=
false
}
}
...
@@ -670,6 +706,12 @@ export default {
...
@@ -670,6 +706,12 @@ export default {
this
.
form
.
WDAList
=
WDAList
this
.
form
.
WDAList
=
WDAList
this
.
form
.
projectDList
=
projectDList
this
.
form
.
projectDList
=
projectDList
this
.
index
=
this
.
sheetForm
.
sheetIndex
this
.
index
=
this
.
sheetForm
.
sheetIndex
this
.
form
.
LD
=
[]
this
.
form
.
LDB
=
[]
this
.
form
.
WDBList
=
[]
this
.
form
.
projectAList
=
[]
this
.
form
.
projectCList
=
[]
this
.
form
.
projetcBList
=
[]
this
.
dialogController
.
open
=
false
this
.
dialogController
.
open
=
false
}
}
if
(
this
.
sheetForm
.
sheetIndex
===
6
)
{
if
(
this
.
sheetForm
.
sheetIndex
===
6
)
{
...
@@ -693,11 +735,20 @@ export default {
...
@@ -693,11 +735,20 @@ export default {
this
.
form
.
LDA
=
LDAList
this
.
form
.
LDA
=
LDAList
this
.
form
.
WDAList
=
WDAList
this
.
form
.
WDAList
=
WDAList
this
.
form
.
projectDList
=
projectDList
this
.
form
.
projectDList
=
projectDList
this
.
form
.
LD
=
[]
this
.
form
.
LDB
=
[]
this
.
form
.
WDBList
=
[]
this
.
form
.
projectAList
=
[]
this
.
form
.
projectCList
=
[]
this
.
form
.
projetcBList
=
[]
this
.
index
=
this
.
sheetForm
.
sheetIndex
this
.
index
=
this
.
sheetForm
.
sheetIndex
this
.
dialogController
.
open
=
false
this
.
dialogController
.
open
=
false
}
}
console
.
log
(
'form'
,
this
.
form
)
this
.
showTable
=
true
this
.
$emit
(
'sheetIndex'
,
this
.
index
)
this
.
$emit
(
'sheetIndex'
,
this
.
index
)
this
.
$emit
(
'tarFrom'
,
this
.
form
)
this
.
$emit
(
'tarFrom'
,
this
.
form
)
this
.
$emit
(
'ShowTabel'
,
'1'
);
})
})
},
},
// 取消按钮
// 取消按钮
...
@@ -729,6 +780,12 @@ export default {
...
@@ -729,6 +780,12 @@ export default {
console
.
log
(
'new'
,
newValue
)
console
.
log
(
'new'
,
newValue
)
// this.index = oldValue
// this.index = oldValue
}
}
},
'defaultUpload'
:
{
handler
(
oldValue
,
newValue
)
{
console
.
log
(
'old111'
,
oldValue
)
// this.index = oldValue
}
}
}
}
}
}
}
...
...
src/views/template/templateFirst.vue
View file @
3a59492c
This diff is collapsed.
Click to expand it.
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