Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
traceSourceMb
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
yanyanhong
traceSourceMb
Commits
b1554773
Commit
b1554773
authored
Sep 27, 2020
by
yyh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
模板字段类型和label增加修改功能
parent
e1748a7b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
2 deletions
+20
-2
Index.vue
src/views/proof/Index.vue
+1
-1
WordsManager.vue
src/views/template/components/WordsManager.vue
+19
-1
No files found.
src/views/proof/Index.vue
View file @
b1554773
...
@@ -132,7 +132,7 @@ export default class Index extends Vue {
...
@@ -132,7 +132,7 @@ export default class Index extends Vue {
private
async
addProofHandler
()
{
private
async
addProofHandler
()
{
const
{
name
}
=
this
.
templateInfo
;
const
{
name
}
=
this
.
templateInfo
;
if
(
!
name
)
{
if
(
!
name
)
{
return
this
.
$router
.
push
({
path
:
'addTemplate'
})
return
this
.
$router
.
push
({
path
:
'addTemplate'
})
;
}
}
let
query
:
any
=
{
let
query
:
any
=
{
templateId
:
this
.
templateInfo
.
id
,
templateId
:
this
.
templateInfo
.
id
,
...
...
src/views/template/components/WordsManager.vue
View file @
b1554773
...
@@ -80,6 +80,11 @@ export default class Add extends Vue {
...
@@ -80,6 +80,11 @@ export default class Add extends Vue {
text
:
'删除'
,
text
:
'删除'
,
action
:
this
.
delWord
.
bind
(
this
),
action
:
this
.
delWord
.
bind
(
this
),
},
},
{
icon
:
'shanchu4'
,
text
:
'编辑'
,
action
:
this
.
updateWord
.
bind
(
this
),
},
];
];
private
readonly
typeObj
:
any
=
{
private
readonly
typeObj
:
any
=
{
[
DataType
.
Input
]:
'单行文本'
,
[
DataType
.
Input
]:
'单行文本'
,
...
@@ -180,6 +185,12 @@ export default class Add extends Vue {
...
@@ -180,6 +185,12 @@ export default class Add extends Vue {
const
word
=
parentIndex
!==
-
1
?
this
.
words
[
parentIndex
]
:
null
;
const
word
=
parentIndex
!==
-
1
?
this
.
words
[
parentIndex
]
:
null
;
this
.
preAddWord
({
wordType
,
word
},
'before'
);
this
.
preAddWord
({
wordType
,
word
},
'before'
);
}
}
private
updateWord
()
{
const
{
index
,
parentIndex
}
=
this
.
currentAction
;
const
wordType
=
parentIndex
===
-
1
?
DataType
.
Unit
:
DataType
.
Input
;
const
word
=
parentIndex
!==
-
1
?
this
.
words
[
parentIndex
]
:
null
;
this
.
preAddWord
({
wordType
,
word
},
'update'
);
}
private
addAfter
()
{
private
addAfter
()
{
const
{
index
,
parentIndex
}
=
this
.
currentAction
;
const
{
index
,
parentIndex
}
=
this
.
currentAction
;
const
wordType
=
parentIndex
===
-
1
?
DataType
.
Unit
:
DataType
.
Input
;
const
wordType
=
parentIndex
===
-
1
?
DataType
.
Unit
:
DataType
.
Input
;
...
@@ -222,6 +233,11 @@ export default class Add extends Vue {
...
@@ -222,6 +233,11 @@ export default class Add extends Vue {
this
.
show
=
true
;
this
.
show
=
true
;
this
.
wordType
=
wordType
;
this
.
wordType
=
wordType
;
this
.
currentWords
=
word
?
word
.
data
:
this
.
words
;
this
.
currentWords
=
word
?
word
.
data
:
this
.
words
;
if
(
flag
===
'update'
)
{
const
{
index
,
parentIndex
}
=
this
.
currentAction
;
this
.
wordName
=
parentIndex
===
-
1
?
this
.
words
[
index
].
label
:
this
.
words
[
parentIndex
].
data
[
index
].
label
;
this
.
wordType
=
parentIndex
===
-
1
?
this
.
words
[
index
].
type
:
this
.
words
[
parentIndex
].
data
[
index
].
type
;
}
this
.
flag
=
flag
;
this
.
flag
=
flag
;
}
}
private
deepClone
(
data
:
any
)
{
private
deepClone
(
data
:
any
)
{
...
@@ -237,7 +253,9 @@ export default class Add extends Vue {
...
@@ -237,7 +253,9 @@ export default class Add extends Vue {
if
(
this
.
wordType
===
DataType
.
Select
)
{
if
(
this
.
wordType
===
DataType
.
Select
)
{
tempData
=
{
...
tempData
,
options
:
this
.
options
};
tempData
=
{
...
tempData
,
options
:
this
.
options
};
}
}
if
(
this
.
flag
===
'before'
)
{
if
(
this
.
flag
===
'update'
)
{
this
.
currentWords
.
splice
(
this
.
currentAction
.
index
,
1
,
tempData
);
}
else
if
(
this
.
flag
===
'before'
)
{
this
.
currentWords
.
splice
(
this
.
currentAction
.
index
,
0
,
tempData
);
this
.
currentWords
.
splice
(
this
.
currentAction
.
index
,
0
,
tempData
);
}
else
if
(
this
.
flag
===
'after'
)
{
}
else
if
(
this
.
flag
===
'after'
)
{
let
{
index
}
=
this
.
currentAction
;
let
{
index
}
=
this
.
currentAction
;
...
...
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