Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pptist
Project
Project
Details
Activity
Releases
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
viitto
pptist
Commits
f488ceb4
Commit
f488ceb4
authored
Apr 23, 2024
by
罗超
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'router' of
http://gitlab.oytour.com/viitto/pptist
into router
parents
94ac46d5
904a1829
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
10 deletions
+33
-10
ConfigService.ts
src/services/ConfigService.ts
+7
-0
ElementTemplateData.vue
src/views/Editor/Toolbar/ElementTemplateData.vue
+26
-10
No files found.
src/services/ConfigService.ts
View file @
f488ceb4
...
...
@@ -167,6 +167,13 @@ class ConfigService{
return
Api
.
Post
(
"hotel_post_GetPicList"
,
params
)
}
/**
* 新增国家
*/
static
async
SetTemplateCountryData
(
params
:
any
):
Promise
<
HttpResponse
>
{
return
Api
.
Post
(
"dict_post_Set"
,
params
)
}
/**
* 新增颜色
*/
...
...
src/views/Editor/Toolbar/ElementTemplateData.vue
View file @
f488ceb4
...
...
@@ -52,7 +52,9 @@
</el-button>
</p>
<div
class=
"row q-mt-md"
>
<el-select
v-model=
"queryObj.CountryName"
filterable
class=
"m-2"
placeholder=
"请选择国家"
>
<el-select
v-model=
"queryObj.CountryName"
filterable
class=
"m-2"
placeholder=
"请选择国家"
@
change=
"getCountryId"
>
<el-option
label=
"不限"
value=
""
/>
<el-option
v-for=
"item in dispositionObj.CountryList"
:key=
"item.CountryValue"
...
...
@@ -60,10 +62,10 @@
:value=
"item.CountryValue"
/>
</el-select>
<el-button
v-if=
"!datas.EditAddCountryShow"
class=
"button-new-tag q-ml-md ml-1"
<
!-- <
el-button v-if="!datas.EditAddCountryShow" class="button-new-tag q-ml-md ml-1"
@click="EditAddDatas(1,0)">
编辑
</el-button>
</el-button>
-->
</div>
<div
class=
"EditAddElement"
v-if=
"datas.EditAddCountryShow"
>
<p
class=
"q-mt-md row flex-between"
>
...
...
@@ -375,6 +377,7 @@
datas
.
EditAddType
=
type
if
(
!
num
)
{
datas
.
EditAddCountryShow
=!
datas
.
EditAddCountryShow
datas
.
EditAddShow
=
false
if
(
type
)
datas
.
addEditCountry
=
{
CountryId
:
''
,
CountryName
:
queryObj
.
value
.
CountryName
,
...
...
@@ -382,6 +385,7 @@
}
else
{
datas
.
EditAddShow
=!
datas
.
EditAddShow
datas
.
EditAddCountryShow
=
false
if
(
type
)
datas
.
addEditColor
=
{
ColorId
:
queryObj
.
value
.
ColorId
,
ColorValue
:
queryObj
.
value
.
ColorStr
,
...
...
@@ -389,6 +393,11 @@
}
}
}
const
getCountryId
=
()
=>
{
let
obj
=
dispositionObj
.
value
.
CountryList
.
filter
(
x
=>
{
return
x
.
CountryName
==
queryObj
.
value
.
CountryName
})
}
const
CancelEditAdd
=
(
num
:
Number
)
=>
{
if
(
!
num
){
datas
.
EditAddCountryShow
=
false
...
...
@@ -408,9 +417,9 @@
const
setEditAdd
=
async
(
num
:
Number
)
=>
{
if
(
!
num
){
await
setCountry
()
}
else
{
setColor
()
await
setColor
()
}
}
const
setCountry
=
async
()
=>
{
...
...
@@ -424,19 +433,25 @@
}
try
{
datas
.
addEditLoading
=
true
let
dataRes
=
await
ConfigService
.
SetTemplateConfigData
(
datas
.
addEditCountry
)
let
params
=
{
ID
:
0
,
Code
:
''
,
Content
:
datas
.
addEditCountry
.
CountryName
,
DictKey
:
'Trip_Template_Country'
}
let
dataRes
=
await
ConfigService
.
SetTemplateCountryData
(
params
)
if
(
dataRes
.
data
.
resultCode
==
1
)
{
ElMessage
({
showClose
:
true
,
message
:
'新增
颜色
成功'
,
message
:
'新增
国家
成功'
,
type
:
'success'
,
})
GetTemplateConfigDatas
()
CancelEditAdd
()
CancelEditAdd
(
0
)
}
else
{
ElMessage
({
showClose
:
true
,
message
:
'新增
颜色
失败'
,
message
:
'新增
国家
失败'
,
type
:
'warning'
,
})
}
...
...
@@ -471,7 +486,7 @@
type
:
'success'
,
})
GetTemplateConfigDatas
()
CancelEditAdd
()
CancelEditAdd
(
1
)
}
else
{
ElMessage
({
showClose
:
true
,
...
...
@@ -649,6 +664,7 @@
let
response
=
await
LineService
.
GetTemplateConfigData
()
if
(
response
.
data
.
resultCode
==
1
)
{
dispositionObj
.
value
=
response
.
data
.
data
;
getCountryId
()
}
}
catch
(
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