Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mobi
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
1
Merge Requests
1
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
wbx-PCAndMobi
mobi
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 @@
...
@@ -108,7 +108,7 @@
<a-form-item>
<a-form-item>
<a-input
style=
"width: 120px"
placeholder=
'请输入'
v-decorator=
"['inputOne-' + index66 +'-' + index,
{initialValue: getInitialValueOne(item.val), validateTrigger:'blur',rules: [],}]">
</a-input>
<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>
<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-input
style=
"width: 120px"
placeholder=
'请输入'
v-decorator=
"['inputTwo-' + index66 +'-' + index,
{initialValue: getInitialValueTwo(item.val), validateTrigger:'blur',rules: []}]">
</a-input>
</a-form-item>
</a-form-item>
...
@@ -419,33 +419,33 @@ export default {
...
@@ -419,33 +419,33 @@ export default {
},
},
handleConfirmVisible
()
{
handleConfirmVisible
()
{
console
.
log
(
this
.
jsonData
)
console
.
log
(
this
.
jsonData
)
//
if(!!this.labelId) {
if
(
!!
this
.
labelId
)
{
//
this.$ajax.put({
this
.
$ajax
.
put
({
//
url: this.$api.PUT_LABEL_INFO.replace('{id}', this.labelId),
url
:
this
.
$api
.
PUT_LABEL_INFO
.
replace
(
'{id}'
,
this
.
labelId
),
//
params: Object.assign(this.jsonData, {id: this.labelId})
params
:
Object
.
assign
(
this
.
jsonData
,
{
id
:
this
.
labelId
})
//
}).then(res => {
}).
then
(
res
=>
{
//
if (res.code == 200) {
if
(
res
.
code
==
200
)
{
//
this.$message.success('修改成功!')
this
.
$message
.
success
(
'修改成功!'
)
//
this.resetFormFields()
this
.
resetFormFields
()
//
this.finish = true
this
.
finish
=
true
//
this.$emit('finish', this.finish)
this
.
$emit
(
'finish'
,
this
.
finish
)
//
}
}
//
})
})
//
} else {
}
else
{
//
this.$ajax.post({
this
.
$ajax
.
post
({
//
url: this.$api.POST_SINGLE_LABEL,
url
:
this
.
$api
.
POST_SINGLE_LABEL
,
//
params: Object.assign(this.jsonData)
params
:
Object
.
assign
(
this
.
jsonData
)
//
}).then(res => {
}).
then
(
res
=>
{
//
if (res.code == 200) {
if
(
res
.
code
==
200
)
{
//
this.$message.success('保存成功!')
this
.
$message
.
success
(
'保存成功!'
)
//
this.resetFormFields()
this
.
resetFormFields
()
//
this.finish = true
this
.
finish
=
true
//
this.$emit('finish', this.finish)
this
.
$emit
(
'finish'
,
this
.
finish
)
//
} else {
}
else
{
//
this.$message.success('保存失败!')
this
.
$message
.
success
(
'保存失败!'
)
//
}
}
//
})
})
//
}
}
},
},
handleConfirmCancel
()
{
handleConfirmCancel
()
{
this
.
confirmVisible
=
!
this
.
confirmVisible
this
.
confirmVisible
=
!
this
.
confirmVisible
...
@@ -465,47 +465,55 @@ export default {
...
@@ -465,47 +465,55 @@ export default {
this
.
verifySelect
=
false
this
.
verifySelect
=
false
}
}
this
.
jsonData
=
{
selParams
:
[{
labelSelConditionList
:
[]
}]}
this
.
labelForm
.
validateFields
((
err
,
values
)
=>
{
this
.
labelForm
.
validateFields
((
err
,
values
)
=>
{
if
(
!
err
)
{
if
(
!
err
)
{
const
labelFormData
=
this
.
labelForm
.
getFieldsValue
()
const
labelFormData
=
this
.
labelForm
.
getFieldsValue
()
this
.
jsonData
=
Object
.
assign
(
this
.
jsonData
,
labelFormData
)
this
.
jsonData
=
Object
.
assign
(
this
.
jsonData
,
labelFormData
)
console
.
log
(
this
.
jsonData
)
this
.
infoSettingForm
.
validateFields
((
err1
,
values
)
=>
{
this
.
infoSettingForm
.
validateFields
((
err1
,
values
)
=>
{
if
(
!
err1
)
{
if
(
!
err1
)
{
let
loopGroup
=
this
.
loopContent
// 有多少组
let
loopGroup
=
this
.
loopContent
// 有多少组
console
.
log
(
values
)
// console.log(values, 'form表单的数据'
)
let
innerResult
=
[]
let
innerResult
=
[]
let
formData
=
this
.
infoSettingForm
.
getFieldsValue
()
let
formData
=
this
.
infoSettingForm
.
getFieldsValue
()
for
(
let
i
=
0
;
i
<
Object
.
keys
(
loopGroup
).
length
;
i
++
)
{
// console.log(loopGroup, 'loopGroup')
console
.
log
(
loopGroup
)
console
.
log
(
formData
,
'formData'
)
for
(
let
j
=
0
;
j
<
Object
.
keys
(
formData
).
length
;
j
++
)
{
console
.
log
(
'key-'
+
Object
.
keys
(
loopGroup
)[
i
]
+
'-'
+
j
)
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
({
innerResult
.
push
({
key
:
formData
[
'key-'
+
Object
.
keys
(
loopGroup
)[
i
]
+
'-'
+
j
],
'serial'
:
1
,
val
:
!
formData
[
'inputTwo'
+
i
]
?
formData
[
'inputOne'
+
i
]
:
formData
[
'inputOne'
+
i
]
+
','
+
formData
[
'inputTwo'
+
i
],
'relation'
:
formData
[
'relation-'
+
k
+
'-0'
],
codition
:
formData
[
'codition-'
+
Object
.
keys
(
loopGroup
)[
i
]
+
'-'
+
j
],
'labelSelConditionList'
:
rowList
relation
:
formData
[
'relation-'
+
Object
.
keys
(
loopGroup
)[
i
]
+
'-'
+
j
],
selMet
:
formData
[
'selMet-'
+
Object
.
keys
(
loopGroup
)[
i
]
+
'-'
+
j
]
})
})
}
}
console
.
log
(
innerResult
)
console
.
log
(
innerResult
)
// console.log(JSON.stringify(Object.values(loopGroup)[i]));
// console.log(loopCounts)
this
.
jsonData
.
selParams
=
innerResult
// this.jsonData.selParams.labelSelConditionList.push({
console
.
log
(
// key: formData['key'+i],
this
.
jsonData
// val: !formData['inputTwo' + i] ? formData['inputOne' + i] : formData['inputOne' + i] + ',' + formData['inputTwo' + i],
)
// codition: formData['codition'+i],
// relation: formData['relation' + i],
// console.log(innerResult)
// selMet: formData['selMet' + i]
// })
}
// 先循环得到有多少个form
// 先循环得到有多少个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