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
dfe4d84e
Commit
dfe4d84e
authored
Feb 24, 2022
by
caoyanzhi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修复会员标签-常驻城市编辑保存时,cityId不对的bug
parent
d8685fd5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
2 deletions
+27
-2
tag-config-options.vue
src/components/tag/tag-config-options.vue
+27
-2
No files found.
src/components/tag/tag-config-options.vue
View file @
dfe4d84e
...
@@ -1487,7 +1487,7 @@ export default {
...
@@ -1487,7 +1487,7 @@ export default {
*/
*/
getcityData
()
{
getcityData
()
{
const
para
=
{
requestProject
:
'member-tag'
};
const
para
=
{
requestProject
:
'member-tag'
};
this
.
axios
return
this
.
axios
.
post
(
`
${
this
.
baseUrl
}
/api-plug/dict-district-tree`
,
qs
.
stringify
(
para
))
.
post
(
`
${
this
.
baseUrl
}
/api-plug/dict-district-tree`
,
qs
.
stringify
(
para
))
.
then
(
res
=>
{
.
then
(
res
=>
{
if
(
res
.
data
.
errorCode
===
0
)
{
if
(
res
.
data
.
errorCode
===
0
)
{
...
@@ -1655,6 +1655,27 @@ export default {
...
@@ -1655,6 +1655,27 @@ export default {
return
item
;
return
item
;
});
});
},
},
getCityId
(
city
)
{
const
[
cName
,
pName
]
=
city
.
split
(
'-'
);
const
result
=
{
cityId
:
''
,
pId
:
''
};
this
.
tag010
.
citySelectOptions
.
some
(
province
=>
{
const
{
provinceName
,
provinceId
,
children
}
=
province
;
if
(
pName
==
provinceName
)
{
result
.
pId
=
provinceId
;
if
(
Array
.
isArray
(
children
))
{
children
.
some
(
city
=>
{
const
{
cityId
,
cityName
}
=
city
;
if
(
cName
==
cityName
)
{
result
.
cityId
=
cityId
;
}
return
cName
==
cityName
;
})
}
}
return
provinceName
==
province
.
provinceId
;
})
return
result
;
},
/**
/**
* 将tagValue 替代模板数据的v-model
* 将tagValue 替代模板数据的v-model
...
@@ -1686,10 +1707,12 @@ export default {
...
@@ -1686,10 +1707,12 @@ export default {
selectVal
=
tagParams
.
selectedVal
[
1
].
split
(
','
);
selectVal
=
tagParams
.
selectedVal
[
1
].
split
(
','
);
selectVal
.
forEach
((
item
,
index
)
=>
{
selectVal
.
forEach
((
item
,
index
)
=>
{
const
{
cityId
,
pId
}
=
this
.
getCityId
(
item
);
this
.
templateData
[
i
].
citySelectedOptions
.
push
({
this
.
templateData
[
i
].
citySelectedOptions
.
push
({
selected
:
selectVal
[
index
],
selected
:
selectVal
[
index
],
cityName
:
selectVal
[
index
],
cityName
:
selectVal
[
index
],
cityId
:
item
cityId
,
pId
});
});
});
});
setTimeout
(
_
=>
{
setTimeout
(
_
=>
{
...
@@ -2146,10 +2169,12 @@ export default {
...
@@ -2146,10 +2169,12 @@ export default {
}
}
},
},
mounted
()
{
mounted
()
{
this
.
getcityData
().
finally
(()
=>
{
// 存在id
// 存在id
if
(
this
.
id
)
{
if
(
this
.
id
)
{
this
.
_getTagType
(
this
.
id
);
this
.
_getTagType
(
this
.
id
);
}
}
});
},
},
filters
:
{
filters
:
{
aliasTips
(
name
)
{
aliasTips
(
name
)
{
...
...
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