Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
memberTag-web
Overview
Overview
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
memberTag
memberTag-web
Commits
18104794
Commit
18104794
authored
Apr 15, 2019
by
caoyanzhi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化代码实现
parent
dcfa7ca9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
17 deletions
+11
-17
memberGroupEdit.vue
src/view/memberGroup/memberGroupEdit.vue
+11
-17
No files found.
src/view/memberGroup/memberGroupEdit.vue
View file @
18104794
...
...
@@ -345,20 +345,14 @@ export default {
* 已选标签-删除-检查实时 ????
*/
checkRealTime
()
{
const
that
=
this
;
if
(
!!
that
.
selectedTagData
.
length
)
{
const
arrTag
=
that
.
selectedTagData
.
map
(
item
=>
parseInt
(
item
.
isActive
));
console
.
log
(
'已选标签实时/非实时:'
,
arrTag
);
if
(
arrTag
.
includes
(
0
))
{
that
.
ruleForm
.
isActive
=
0
;
// 如果有非实时,最后都是非实时
}
else
{
that
.
ruleForm
.
isActive
=
1
;
}
console
.
log
(
that
.
ruleForm
);
return
false
;
if
(
this
.
ruleForm
.
selectedTags
.
length
===
0
)
{
this
.
rule
.
isActive
=
0
;
return
;
}
that
.
ruleForm
.
isActive
=
0
;
// 如果已选标签为空,就是非实时
let
flag
=
this
.
ruleForm
.
selectedTags
.
some
(
tagsGroup
=>
{
return
tagsGroup
.
some
(
tag
=>
parseInt
(
tag
.
isActive
)
===
0
);
});
this
.
ruleForm
.
isActive
=
flag
?
0
:
1
;
},
/**
...
...
@@ -395,8 +389,8 @@ export default {
* 点击保存---api
*/
postSave
()
{
const
that
=
this
;
let
ruleForm
=
this
.
ruleForm
;
this
.
checkRealTime
();
const
para
=
{
memberTagGroupId
:
ruleForm
.
memberTagGroupId
,
groupName
:
ruleForm
.
groupName
,
...
...
@@ -409,13 +403,13 @@ export default {
effectiveDateTmp
:
`
${
ruleForm
.
effectiveDateTmp
.
split
(
' '
)[
0
]}
23:59:59`
};
let
postUrl
=
!!
th
at
.
ruleForm
.
memberTagGroupId
?
'/member-tag-group/update.json'
:
'/member-tag-group/add.json'
;
let
postUrl
=
!!
th
is
.
ruleForm
.
memberTagGroupId
?
'/member-tag-group/update.json'
:
'/member-tag-group/add.json'
;
postRequest
(
postUrl
,
para
)
.
then
(
res
=>
{
if
(
res
.
data
.
errorCode
==
1
)
{
if
(
res
.
data
.
errorCode
==
=
1
)
{
showMsg
.
showmsg
(
'编辑成功'
,
'success'
);
th
at
.
changeRoute
(
'/memberGroupList'
);
th
is
.
changeRoute
(
'/memberGroupList'
);
}
})
.
catch
(
function
(
error
)
{
...
...
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