Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
M
multiSystem
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
Yulun Yao
multiSystem
Commits
7d4f456b
Commit
7d4f456b
authored
May 12, 2021
by
程卓
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
123
parent
70c625e1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
62 additions
and
54 deletions
+62
-54
labelRightSide.vue
src/views/label/labelRightSide.vue
+62
-54
No files found.
src/views/label/labelRightSide.vue
View file @
7d4f456b
...
...
@@ -108,7 +108,7 @@
<a-form-item>
<a-input
style=
"width: 120px"
placeholder=
'请输入'
v-decorator=
"['inputOne-' + index66 +'-' + index,
{initialValue: getInitialValueOne(item.val), validateTrigger:'blur',rules: [],}]">
</a-input>
</a-form-item>
<a-form-item
v-if=
"infoSettingForm.getFieldValue('codition
'+
index) == 'btw'"
>
<a-form-item
v-if=
"infoSettingForm.getFieldValue('codition
-'+index66 +'-' +
index) == 'btw'"
>
<a-input
style=
"width: 120px"
placeholder=
'请输入'
v-decorator=
"['inputTwo-' + index66 +'-' + index,
{initialValue: getInitialValueTwo(item.val), validateTrigger:'blur',rules: []}]">
</a-input>
</a-form-item>
...
...
@@ -419,33 +419,33 @@ export default {
},
handleConfirmVisible
()
{
console
.
log
(
this
.
jsonData
)
//
if(!!this.labelId) {
//
this.$ajax.put({
//
url: this.$api.PUT_LABEL_INFO.replace('{id}', this.labelId),
//
params: Object.assign(this.jsonData, {id: this.labelId})
//
}).then(res => {
//
if (res.code == 200) {
//
this.$message.success('修改成功!')
//
this.resetFormFields()
//
this.finish = true
//
this.$emit('finish', this.finish)
//
}
//
})
//
} else {
//
this.$ajax.post({
//
url: this.$api.POST_SINGLE_LABEL,
//
params: Object.assign(this.jsonData)
//
}).then(res => {
//
if (res.code == 200) {
//
this.$message.success('保存成功!')
//
this.resetFormFields()
//
this.finish = true
//
this.$emit('finish', this.finish)
//
} else {
//
this.$message.success('保存失败!')
//
}
//
})
//
}
if
(
!!
this
.
labelId
)
{
this
.
$ajax
.
put
({
url
:
this
.
$api
.
PUT_LABEL_INFO
.
replace
(
'{id}'
,
this
.
labelId
),
params
:
Object
.
assign
(
this
.
jsonData
,
{
id
:
this
.
labelId
})
}).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
this
.
$message
.
success
(
'修改成功!'
)
this
.
resetFormFields
()
this
.
finish
=
true
this
.
$emit
(
'finish'
,
this
.
finish
)
}
})
}
else
{
this
.
$ajax
.
post
({
url
:
this
.
$api
.
POST_SINGLE_LABEL
,
params
:
Object
.
assign
(
this
.
jsonData
)
}).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
this
.
$message
.
success
(
'保存成功!'
)
this
.
resetFormFields
()
this
.
finish
=
true
this
.
$emit
(
'finish'
,
this
.
finish
)
}
else
{
this
.
$message
.
success
(
'保存失败!'
)
}
})
}
},
handleConfirmCancel
()
{
this
.
confirmVisible
=
!
this
.
confirmVisible
...
...
@@ -465,47 +465,55 @@ export default {
this
.
verifySelect
=
false
}
this
.
jsonData
=
{
selParams
:
[{
labelSelConditionList
:
[]
}]}
this
.
labelForm
.
validateFields
((
err
,
values
)
=>
{
if
(
!
err
)
{
const
labelFormData
=
this
.
labelForm
.
getFieldsValue
()
this
.
jsonData
=
Object
.
assign
(
this
.
jsonData
,
labelFormData
)
console
.
log
(
this
.
jsonData
)
this
.
infoSettingForm
.
validateFields
((
err1
,
values
)
=>
{
if
(
!
err1
)
{
let
loopGroup
=
this
.
loopContent
// 有多少组
console
.
log
(
values
)
// console.log(values, 'form表单的数据'
)
let
innerResult
=
[]
let
formData
=
this
.
infoSettingForm
.
getFieldsValue
()
for
(
let
i
=
0
;
i
<
Object
.
keys
(
loopGroup
).
length
;
i
++
)
{
console
.
log
(
loopGroup
)
for
(
let
j
=
0
;
j
<
Object
.
keys
(
formData
).
length
;
j
++
)
{
console
.
log
(
'key-'
+
Object
.
keys
(
loopGroup
)[
i
]
+
'-'
+
j
)
// console.log(loopGroup, 'loopGroup')
console
.
log
(
formData
,
'formData'
)
for
(
let
k
in
loopGroup
)
{
let
rowList
=
[]
loopGroup
[
k
].
forEach
((
item
,
index
)
=>
{
rowList
.
push
({
key
:
formData
[
'key-'
+
k
+
'-'
+
index
],
val
:
!
formData
[
'inputTwo-'
+
k
+
'-'
+
index
]
?
formData
[
'inputOne-'
+
k
+
'-'
+
index
]
:
formData
[
'inputOne-'
+
k
+
'-'
+
index
]
+
','
+
formData
[
'inputTwo-'
+
k
+
'-'
+
index
],
codition
:
formData
[
'codition-'
+
k
+
'-'
+
index
],
relation
:
formData
[
'relation-'
+
k
+
'-'
+
index
],
selMet
:
formData
[
'selMet-'
+
k
+
'-'
+
index
]
})
})
// console.log(k)
// console.log(loopGroup[k])
innerResult
.
push
({
key
:
formData
[
'key-'
+
Object
.
keys
(
loopGroup
)[
i
]
+
'-'
+
j
],
val
:
!
formData
[
'inputTwo'
+
i
]
?
formData
[
'inputOne'
+
i
]
:
formData
[
'inputOne'
+
i
]
+
','
+
formData
[
'inputTwo'
+
i
],
codition
:
formData
[
'codition-'
+
Object
.
keys
(
loopGroup
)[
i
]
+
'-'
+
j
],
relation
:
formData
[
'relation-'
+
Object
.
keys
(
loopGroup
)[
i
]
+
'-'
+
j
],
selMet
:
formData
[
'selMet-'
+
Object
.
keys
(
loopGroup
)[
i
]
+
'-'
+
j
]
'serial'
:
1
,
'relation'
:
formData
[
'relation-'
+
k
+
'-0'
],
'labelSelConditionList'
:
rowList
})
}
console
.
log
(
innerResult
)
// console.log(JSON.stringify(Object.values(loopGroup)[i]));
// console.log(loopCounts)
// this.jsonData.selParams.labelSelConditionList.push({
// key: formData['key'+i],
// val: !formData['inputTwo' + i] ? formData['inputOne' + i] : formData['inputOne' + i] + ',' + formData['inputTwo' + i],
// codition: formData['codition'+i],
// relation: formData['relation' + i],
// selMet: formData['selMet' + i]
// })
}
this
.
jsonData
.
selParams
=
innerResult
console
.
log
(
this
.
jsonData
)
// console.log(innerResult)
// 先循环得到有多少个form
...
...
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