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
eca7030a
Commit
eca7030a
authored
May 07, 2024
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
颜色 分类 及新增
parent
896ce41b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
434 additions
and
172 deletions
+434
-172
temDesign.vue
src/components/home/temDesign.vue
+7
-3
ConfigService.ts
src/services/ConfigService.ts
+1
-1
LineService.ts
src/services/LineService.ts
+6
-6
ElementTemplateData.vue
src/views/Editor/Toolbar/ElementTemplateData.vue
+52
-20
Index.vue
src/views/Market/Index.vue
+37
-41
Index.vue
src/views/TemplateCenter/Index.vue
+60
-34
colour.vue
src/views/TemplateCenter/colour.vue
+266
-62
font.vue
src/views/TemplateCenter/font.vue
+1
-1
nation.vue
src/views/TemplateCenter/nation.vue
+4
-4
No files found.
src/components/home/temDesign.vue
View file @
eca7030a
...
@@ -55,7 +55,7 @@ import { reactive, ref, inject, onMounted, watch} from "vue";
...
@@ -55,7 +55,7 @@ import { reactive, ref, inject, onMounted, watch} from "vue";
import
LineService
from
'@/services/LineService'
import
LineService
from
'@/services/LineService'
import
ConfigService
from
'@/services/ConfigService'
import
ConfigService
from
'@/services/ConfigService'
import
{
useUserStore
}
from
"@/store/user"
;
import
{
useUserStore
}
from
"@/store/user"
;
import
{
useSellTemplateStore
}
from
'@/store'
import
{
useSellTemplateStore
,
useSlidesStore
}
from
'@/store'
import
{
useScreenStore
}
from
"@/store/screen"
;
import
{
useScreenStore
}
from
"@/store/screen"
;
import
{
storeToRefs
}
from
"pinia"
;
import
{
storeToRefs
}
from
"pinia"
;
import
{
injectKeyTemplate
}
from
'@/types/injectKey'
import
{
injectKeyTemplate
}
from
'@/types/injectKey'
...
@@ -72,6 +72,7 @@ import { noDataImg } from "@/utils/common";
...
@@ -72,6 +72,7 @@ import { noDataImg } from "@/utils/common";
const
{
const
{
userInfo
userInfo
}
=
storeToRefs
(
useUserStore
())
}
=
storeToRefs
(
useUserStore
())
const
slidesStore
=
useSlidesStore
()
const
router
=
useRouter
();
const
router
=
useRouter
();
const
typeArr
=
ref
([]
as
Array
<
any
>
);
//类型
const
typeArr
=
ref
([]
as
Array
<
any
>
);
//类型
const
layouts
=
ref
([
const
layouts
=
ref
([
...
@@ -107,7 +108,6 @@ const deleteLoading = ref<any>(null)
...
@@ -107,7 +108,6 @@ const deleteLoading = ref<any>(null)
const
datas
=
reactive
({
const
datas
=
reactive
({
TemplateBoxRec
:
null
,
// 推荐尺寸
TemplateBoxRec
:
null
,
// 推荐尺寸
DetailsVisible
:
false
,
DetailsVisible
:
false
,
addVisible
:
false
,
loading
:
false
,
loading
:
false
,
ColorValue
:
''
,
ColorValue
:
''
,
scrollTop
:
0
,
scrollTop
:
0
,
...
@@ -211,10 +211,12 @@ const ConfirmCreation = () => {
...
@@ -211,10 +211,12 @@ const ConfirmCreation = () => {
})
})
}
}
}
}
datas
.
addVisible
=
false
let
viewportRatios
=
0
if
(
datas
.
TemplateBoxRec
&&
datas
.
TemplateBoxRec
.
Id
){
if
(
datas
.
TemplateBoxRec
&&
datas
.
TemplateBoxRec
.
Id
){
VIEWPORT_SIZE
.
value
=
datas
.
TemplateBoxRec
.
width
VIEWPORT_SIZE
.
value
=
datas
.
TemplateBoxRec
.
width
VIEWPORT_VER_SIZE
.
value
=
datas
.
TemplateBoxRec
.
height
VIEWPORT_VER_SIZE
.
value
=
datas
.
TemplateBoxRec
.
height
viewportRatios
=
datas
.
TemplateBoxRec
.
height
/
datas
.
TemplateBoxRec
.
width
slidesStore
.
setViewportRatio
(
viewportRatios
)
if
(
datas
.
TemplateBoxRec
.
Id
==
3
)
{
if
(
datas
.
TemplateBoxRec
.
Id
==
3
)
{
datas
.
TemplateBoxRec
=
null
datas
.
TemplateBoxRec
=
null
addTemplate
(
1
)
addTemplate
(
1
)
...
@@ -225,6 +227,8 @@ const ConfirmCreation = () => {
...
@@ -225,6 +227,8 @@ const ConfirmCreation = () => {
}
else
{
}
else
{
VIEWPORT_SIZE
.
value
=
datas
.
CustomSize
.
width
VIEWPORT_SIZE
.
value
=
datas
.
CustomSize
.
width
VIEWPORT_VER_SIZE
.
value
=
datas
.
CustomSize
.
height
VIEWPORT_VER_SIZE
.
value
=
datas
.
CustomSize
.
height
viewportRatios
=
datas
.
CustomSize
.
height
/
datas
.
CustomSize
.
width
slidesStore
.
setViewportRatio
(
viewportRatios
)
datas
.
CustomSize
.
width
=
null
datas
.
CustomSize
.
width
=
null
datas
.
CustomSize
.
height
=
null
datas
.
CustomSize
.
height
=
null
addTemplate
(
2
)
addTemplate
(
2
)
...
...
src/services/ConfigService.ts
View file @
eca7030a
...
@@ -147,7 +147,7 @@ class ConfigService{
...
@@ -147,7 +147,7 @@ class ConfigService{
/**
/**
*
*
* @returns 获取模板查询条件
* @returns 获取模板查询条件
配置项数据(颜色、国家、季节)
*/
*/
static
async
GetTemplateQueryAsync
():
Promise
<
HttpResponse
>
{
static
async
GetTemplateQueryAsync
():
Promise
<
HttpResponse
>
{
return
Api
.
Post
(
"triptemplate_GetTemplateConfigData"
,{})
return
Api
.
Post
(
"triptemplate_GetTemplateConfigData"
,{})
...
...
src/services/LineService.ts
View file @
eca7030a
...
@@ -6,17 +6,17 @@ class LineService{
...
@@ -6,17 +6,17 @@ class LineService{
static
async
RemoveTemplateConfigData
(
ID
:
number
):
Promise
<
HttpResponse
>
{
static
async
RemoveTemplateConfigData
(
ID
:
number
):
Promise
<
HttpResponse
>
{
return
Api
.
Post
(
"triptemplate_RemoveTemplateConfigData"
,{
ID
})
return
Api
.
Post
(
"triptemplate_RemoveTemplateConfigData"
,{
ID
})
}
}
//
根据ke新增编辑配置
//
批量设置颜色分类
static
async
SetTemplateConfigData
(
params
:
any
):
Promise
<
HttpResponse
>
{
static
async
BatchSetColor
(
params
:
any
):
Promise
<
HttpResponse
>
{
return
Api
.
Post
(
"triptemplate_
SetTemplateConfigData
"
,
params
)
return
Api
.
Post
(
"triptemplate_
BatchSetColor
"
,
params
)
}
}
// 获取配置项数据(颜色、国家、季节) Trip_Template_Color Trip_Template_Country Trip_Template_Season
// 获取配置项数据(颜色、国家、季节) Trip_Template_Color Trip_Template_Country Trip_Template_Season
static
async
GetTemplateConfigDataList
(
params
:
any
):
Promise
<
HttpResponse
>
{
static
async
GetTemplateConfigDataList
(
params
:
any
):
Promise
<
HttpResponse
>
{
return
Api
.
Post
(
"triptemplate_GetTemplateConfigDataList"
,
params
)
return
Api
.
Post
(
"triptemplate_GetTemplateConfigDataList"
,
params
)
}
}
// 获取
配置项数据(颜色、国家、季节)
// 获取
颜色
static
async
Get
TemplateConfigData
(
params
:
any
):
Promise
<
HttpResponse
>
{
static
async
Get
ParentColor
(
params
:
any
):
Promise
<
HttpResponse
>
{
return
Api
.
Post
(
"triptemplate_Get
TemplateConfigData
"
,
params
)
return
Api
.
Post
(
"triptemplate_Get
ParentColor
"
,
params
)
}
}
// 系列
// 系列
...
...
src/views/Editor/Toolbar/ElementTemplateData.vue
View file @
eca7030a
...
@@ -157,7 +157,8 @@
...
@@ -157,7 +157,8 @@
</el-button> -->
</el-button> -->
</p>
</p>
<div
class=
"row q-mt-md"
>
<div
class=
"row q-mt-md"
>
<el-select
v-model=
"queryObj.ColorId"
placeholder=
"请选择分类"
>
<el-select
v-model=
"queryColor.Code"
placeholder=
"请选择分类"
@
change=
"getColor(1)"
>
<el-option
<el-option
key=
""
key=
""
label=
"不限"
label=
"不限"
...
@@ -165,28 +166,26 @@
...
@@ -165,28 +166,26 @@
/>
/>
<el-option
<el-option
v-for=
"item in ColorList"
v-for=
"item in ColorList"
:key=
"item.I
d
"
:key=
"item.I
D
"
:label=
"`${item.
Color
Name}`"
:label=
"`${item.Name}`"
:value=
"item.I
d
"
:value=
"item.I
D
"
/>
/>
</el-select>
</el-select>
<el-select
class=
"q-pl-sm"
v-model=
"queryObj.ColorStr"
filterable
placeholder=
"请选择颜色"
<el-select
class=
"q-pl-sm"
v-model=
"queryObj.ColorStr"
filterable
placeholder=
"请选择颜色"
@
change=
"setCountryValue"
>
@
change=
"setCountryValue"
>
<el-option
<el-option
v-for=
"item in d
ispositionObj
.ColorList"
v-for=
"item in d
atas
.ColorList"
:key=
"item.Co
lorValue
"
:key=
"item.Co
ntent
"
:label=
"`${item.Co
lorName}${item.ColorValue
}`"
:label=
"`${item.Co
ntent
}`"
:value=
"item.Co
lorValue
"
:value=
"item.Co
ntent
"
>
>
<
template
#
default
>
<
template
#
default
>
<el-tag
<el-tag
:color=
"item.ColorValue"
:color=
"item.Content"
effect=
"dark"
class=
"q-mr-md"
>
effect=
"dark"
class=
"q-mr-md"
></el-tag>
{{
item
.
label
}}
<span>
{{
item
.
Name
}}
</span>
</el-tag>
<span
class=
"q-ml-md"
>
{{
item
.
Content
}}
</span>
<span>
{{
item
.
ColorName
}}
</span>
<span
class=
"q-ml-md"
>
{{
item
.
ColorValue
}}
</span>
</
template
>
</
template
>
</el-option>
</el-option>
</el-select>
</el-select>
...
@@ -222,10 +221,10 @@
...
@@ -222,10 +221,10 @@
value=
""
value=
""
/>
/>
<el-option
<el-option
v-for=
"item in ColorList"
v-for=
"item in
datas.
ColorList"
:key=
"item.I
d
"
:key=
"item.I
D
"
:label=
"`${item.
Color
Name}`"
:label=
"`${item.Name}`"
:value=
"item.I
d
"
:value=
"item.I
D
"
/>
/>
</el-select>
</el-select>
<span
class=
"Required q-ma-xs"
>
*
</span>
<span
class=
"Required q-ma-xs"
>
*
</span>
...
@@ -309,6 +308,7 @@
...
@@ -309,6 +308,7 @@
ColorValue
:
''
,
ColorValue
:
''
,
ColorName
:
''
,
ColorName
:
''
,
},
},
ColorList
:
[],
EditAddType
:
0
,
//0新增 1编辑
EditAddType
:
0
,
//0新增 1编辑
addEditLoading
:
false
,
addEditLoading
:
false
,
EditAddShow
:
false
,
EditAddShow
:
false
,
...
@@ -318,13 +318,21 @@
...
@@ -318,13 +318,21 @@
})
})
const
dispositionObj
=
ref
({}
as
any
)
const
dispositionObj
=
ref
({}
as
any
)
const
queryObj
=
ref
({}
as
any
)
const
queryObj
=
ref
({}
as
any
)
const
queryColor
=
ref
({
DictKey
:
'Trip_Template_Color'
,
Code
:
''
,
})
const
queryColors
=
ref
({
DictKey
:
'Trip_Template_Color'
,
Name
:
queryObj
.
value
.
ColorName
,
})
const
searchData
=
ref
({}
as
any
)
const
searchData
=
ref
({}
as
any
)
datas
.
DataSource
=
inject
(
injectKeyDataSource
)
datas
.
DataSource
=
inject
(
injectKeyDataSource
)
queryObj
.
value
=
inject
(
injectKeyDataSource
).
queryObj
queryObj
.
value
=
inject
(
injectKeyDataSource
).
queryObj
searchData
.
value
=
inject
(
injectKeyTemplate
)
searchData
.
value
=
inject
(
injectKeyTemplate
)
const
lines
=
ref
([]
as
Array
<
any
>
)
//线路
const
lines
=
ref
([]
as
Array
<
any
>
)
//线路
const
Series
=
ref
([]
as
Array
<
any
>
)
//系列
const
Series
=
ref
([]
as
Array
<
any
>
)
//系列
const
ColorList
=
DominantColour
()
const
ColorList
=
ref
([]
as
Array
<
any
>
)
//
DominantColour()
const
cursors
=
[]
as
Array
<
any
>
const
cursors
=
[]
as
Array
<
any
>
...
@@ -648,16 +656,40 @@
...
@@ -648,16 +656,40 @@
*/
*/
const
GetTemplateConfigDatas
=
async
()
=>
{
const
GetTemplateConfigDatas
=
async
()
=>
{
try
{
try
{
let
response
=
await
LineService
.
GetTemplateConfigData
()
let
response
=
await
ConfigService
.
GetTemplateQueryAsync
()
if
(
response
.
data
.
resultCode
==
1
)
{
if
(
response
.
data
.
resultCode
==
1
)
{
dispositionObj
.
value
=
response
.
data
.
data
;
dispositionObj
.
value
=
response
.
data
.
data
;
getCountryId
()
getCountryId
()
}
}
}
catch
(
error
)
{
}
catch
(
error
)
{
}
}
}
}
const
getColor
=
async
(
type
:
Number
)
=>
{
if
(
type
==
1
&&!
queryColor
.
Code
)
{
queryObj
.
value
.
ColorName
=
''
queryObj
.
value
.
ColorStr
=
''
}
let
response
=
await
LineService
.
GetParentColor
(
queryColor
.
value
)
if
(
response
.
data
.
resultCode
==
1
)
{
if
(
type
==
0
)
ColorList
.
value
=
response
.
data
.
data
else
datas
.
ColorList
=
response
.
data
.
data
;
}
}
const
GetTemplateColors
=
async
()
=>
{
let
pageRes
=
await
LineService
.
GetTemplateConfigDataList
(
queryColors
.
value
);
let
colorArr
=
pageRes
.
data
.
data
for
(
let
i
=
0
;
i
<
colorArr
.
length
;
i
++
){
if
(
colorArr
[
i
].
Content
==
queryObj
.
value
.
ColorStr
)
{
queryColor
.
value
.
Code
=
Number
(
colorArr
[
i
].
Code
)
getColor
()
}
}
}
GetTemplateConfigDatas
()
GetTemplateConfigDatas
()
getLinesHandler
()
getLinesHandler
()
getColor
(
0
)
GetTemplateColors
()
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
...
...
src/views/Market/Index.vue
View file @
eca7030a
...
@@ -47,7 +47,7 @@
...
@@ -47,7 +47,7 @@
</div>
</div>
<div
class=
"row wrap q-pt-sm "
>
<div
class=
"row wrap q-pt-sm "
>
<el-check-tag
:checked=
"queryObj.Country
Name == ''
"
@
change=
"onCountryNameChangeHandler('')"
>
通用
</el-check-tag>
<el-check-tag
:checked=
"queryObj.Country
List.length==0
"
@
change=
"onCountryNameChangeHandler('')"
>
通用
</el-check-tag>
<el-check-tag
:checked=
"x.checked"
<el-check-tag
:checked=
"x.checked"
@
change=
"onCountryNameChangeHandler(x)"
class=
"text-small"
@
change=
"onCountryNameChangeHandler(x)"
class=
"text-small"
v-for=
"(x,i) in countries"
:key=
"i"
>
{{x.CountryName}}
</el-check-tag>
v-for=
"(x,i) in countries"
:key=
"i"
>
{{x.CountryName}}
</el-check-tag>
...
@@ -61,7 +61,7 @@
...
@@ -61,7 +61,7 @@
<el-button
color=
"#FFF"
class=
"opacity0"
><span></span></el-button>
<el-button
color=
"#FFF"
class=
"opacity0"
><span></span></el-button>
</div>
</div>
<div
class=
"row wrap q-pt-sm"
>
<div
class=
"row wrap q-pt-sm"
>
<el-check-tag
:checked=
"queryObj.Season
Name == ''
"
@
change=
"onSeasonNameChangeHandler('')"
<el-check-tag
:checked=
"queryObj.Season
List.length==0
"
@
change=
"onSeasonNameChangeHandler('')"
class=
"text-small"
>
四季
</el-check-tag>
class=
"text-small"
>
四季
</el-check-tag>
<el-check-tag
v-for=
"(x,i) in seasonArr"
:checked=
"x.checked"
@
change=
"onSeasonNameChangeHandler(x)"
<el-check-tag
v-for=
"(x,i) in seasonArr"
:checked=
"x.checked"
@
change=
"onSeasonNameChangeHandler(x)"
class=
"text-small"
:key=
"i"
>
{{x.SeasonName}}
</el-check-tag>
class=
"text-small"
:key=
"i"
>
{{x.SeasonName}}
</el-check-tag>
...
@@ -107,19 +107,19 @@
...
@@ -107,19 +107,19 @@
<div
class=
"marketTag-color text-small pointer"
@
click=
"onColorNameChangeHandler('')"
>
<div
class=
"marketTag-color text-small pointer"
@
click=
"onColorNameChangeHandler('')"
>
<span
class=
"colorMark"
<span
class=
"colorMark"
:style=
"{'background': 'conic-gradient(from 90deg at 51.03303% 50.931181%, #E43939, #F79A2C, #FFF60B, #39CAE4, #7A39E4)',
:style=
"{'background': 'conic-gradient(from 90deg at 51.03303% 50.931181%, #E43939, #F79A2C, #FFF60B, #39CAE4, #7A39E4)',
'border-color':queryObj.Color
Name==''
?'black':'#eee'}"
></span>
'border-color':queryObj.Color
List.length==0
?'black':'#eee'}"
></span>
</div>
</div>
</el-tooltip>
</el-tooltip>
<
template
v-for=
"(x,i) in
colorArr
"
:key=
"i"
>
<
template
v-for=
"(x,i) in
ColorList
"
:key=
"i"
>
<el-tooltip
<el-tooltip
class=
"box-item"
class=
"box-item"
effect=
"dark"
effect=
"dark"
:content=
"x.
Color
Name"
:content=
"x.Name"
placement=
"bottom"
placement=
"bottom"
>
>
<div
class=
"marketTag-color text-small pointer"
@
click=
"onColorNameChangeHandler(x)"
>
<div
class=
"marketTag-color text-small pointer"
@
click=
"onColorNameChangeHandler(x)"
>
<span
class=
"colorMark"
<span
class=
"colorMark"
:style=
"
{'background':x.Co
lorValue
,'border-color':x.checked?'black':'#eee'}">
</span>
:style=
"
{'background':x.Co
ntent
,'border-color':x.checked?'black':'#eee'}">
</span>
</div>
</div>
</el-tooltip>
</el-tooltip>
</
template
>
</
template
>
...
@@ -291,20 +291,22 @@ const queryObj = reactive({
...
@@ -291,20 +291,22 @@ const queryObj = reactive({
pageSize
:
20
,
pageSize
:
20
,
LineId
:
0
,
//线路Id
LineId
:
0
,
//线路Id
Title
:
''
,
//模板名称
Title
:
''
,
//模板名称
CountryName
:
''
,
//国家名称
TagJsonStr
:
''
,
SeasonName
:
''
,
//季节名称
CountryList
:
[],
//国家名称
ColorName
:
''
,
//颜色名称
SeasonList
:
[],
//季节名称
CountryNames
:
[],
//国家名称
ColorList
:
[],
//颜色名称
SeasonNames
:
[],
//季节名称
ColorNames
:
[],
//颜色名称
pageCount
:
0
,
//总页数
pageCount
:
0
,
//总页数
TempType
:
0
,
TempType
:
0
,
TemplateType
:
TemplateType
,
//0 不限 1模版 2广告
TemplateType
:
TemplateType
,
//0 不限 1模版 2广告
type
:
0
,
type
:
0
,
sort
:
0
,
//排序方式
sort
:
0
,
//排序方式
})
})
const
queryColor
=
ref
({
DictKey
:
'Trip_Template_Color'
,
Code
:
''
,
})
const
ColorList
=
DominantColour
()
const
ColorList
=
ref
([])
//
DominantColour()
// 版型 横版 竖版
// 版型 横版 竖版
const
SwitchingVersion
=
(
row
:
Object
)
=>
{
const
SwitchingVersion
=
(
row
:
Object
)
=>
{
...
@@ -417,8 +419,7 @@ const onLineChangeHandler = (lineId: number) => {
...
@@ -417,8 +419,7 @@ const onLineChangeHandler = (lineId: number) => {
//国家切换
//国家切换
const
onCountryNameChangeHandler
=
(
row
:
Object
)
=>
{
const
onCountryNameChangeHandler
=
(
row
:
Object
)
=>
{
if
(
row
==
''
)
{
if
(
row
==
''
)
{
queryObj
.
CountryName
=
''
queryObj
.
CountryList
=
[]
queryObj
.
CountryNames
=
[]
countriesOther
.
value
.
forEach
(
x
=>
{
countriesOther
.
value
.
forEach
(
x
=>
{
x
.
checked
=
false
x
.
checked
=
false
})
})
...
@@ -426,17 +427,15 @@ const onCountryNameChangeHandler = (row: Object) => {
...
@@ -426,17 +427,15 @@ const onCountryNameChangeHandler = (row: Object) => {
x
.
checked
=
false
x
.
checked
=
false
})
})
}
else
{
}
else
{
queryObj
.
CountryName
=
row
.
CountryName
;
if
(
!
row
.
checked
)
{
if
(
!
row
.
checked
)
{
row
.
checked
=
true
row
.
checked
=
true
queryObj
.
Country
Names
.
push
(
row
.
CountryName
)
queryObj
.
Country
List
.
push
(
row
.
CountryName
)
}
else
{
}
else
{
row
.
checked
=
false
row
.
checked
=
false
let
list
=
queryObj
.
Country
Names
.
filter
(
x
=>
{
let
list
=
queryObj
.
Country
List
.
filter
(
x
=>
{
if
(
x
!=
row
.
CountryName
)
return
x
if
(
x
!=
row
.
CountryName
)
return
x
})
})
queryObj
.
CountryNames
=
list
queryObj
.
CountryList
=
list
if
(
queryObj
.
CountryNames
.
length
==
0
)
queryObj
.
CountryName
=
''
}
}
}
}
search
()
search
()
...
@@ -445,29 +444,20 @@ const onCountryNameChangeHandler = (row: Object) => {
...
@@ -445,29 +444,20 @@ const onCountryNameChangeHandler = (row: Object) => {
//季节切换
//季节切换
const
onSeasonNameChangeHandler
=
(
row
:
Object
)
=>
{
const
onSeasonNameChangeHandler
=
(
row
:
Object
)
=>
{
if
(
row
==
''
)
{
if
(
row
==
''
)
{
queryObj
.
SeasonName
=
''
queryObj
.
SeasonList
=
[]
queryObj
.
SeasonNames
=
[]
seasonArr
.
value
.
forEach
(
x
=>
{
seasonArr
.
value
.
forEach
(
x
=>
{
x
.
checked
=
false
x
.
checked
=
false
})
})
}
else
{
}
else
{
queryObj
.
SeasonName
=
row
.
SeasonName
;
if
(
!
row
.
checked
)
{
if
(
!
row
.
checked
)
{
row
.
checked
=
true
row
.
checked
=
true
queryObj
.
SeasonNames
.
push
(
row
.
SeasonName
)
queryObj
.
SeasonList
.
push
(
row
.
SeasonName
)
// if(queryObj.SeasonNames.length==4) {
// queryObj.SeasonName = ''
// seasonArr.value.forEach(x=>{
// x.checked = false
// })
// }
}
else
{
}
else
{
row
.
checked
=
false
row
.
checked
=
false
let
list
=
queryObj
.
Season
Names
.
filter
(
x
=>
{
let
list
=
queryObj
.
Season
List
.
filter
(
x
=>
{
if
(
x
!=
row
.
SeasonName
)
return
x
if
(
x
!=
row
.
SeasonName
)
return
x
})
})
queryObj
.
SeasonNames
=
list
queryObj
.
SeasonList
=
list
if
(
queryObj
.
SeasonNames
.
length
==
0
)
queryObj
.
SeasonName
=
''
}
}
}
}
search
()
search
()
...
@@ -487,23 +477,20 @@ const onTypeChangeHandler = (Type: string,num: Number) => {
...
@@ -487,23 +477,20 @@ const onTypeChangeHandler = (Type: string,num: Number) => {
//颜色切换
//颜色切换
const
onColorNameChangeHandler
=
(
row
:
Object
)
=>
{
const
onColorNameChangeHandler
=
(
row
:
Object
)
=>
{
if
(
row
==
''
)
{
if
(
row
==
''
)
{
queryObj
.
ColorName
=
''
queryObj
.
ColorList
=
[]
queryObj
.
ColorNames
=
[]
colorArr
.
value
.
forEach
(
x
=>
{
colorArr
.
value
.
forEach
(
x
=>
{
x
.
checked
=
false
x
.
checked
=
false
})
})
}
else
{
}
else
{
queryObj
.
ColorName
=
row
.
ColorName
;
if
(
!
row
.
checked
)
{
if
(
!
row
.
checked
)
{
row
.
checked
=
true
row
.
checked
=
true
queryObj
.
Color
Names
.
push
(
row
.
Color
Name
)
queryObj
.
Color
List
.
push
(
row
.
Name
)
}
else
{
}
else
{
row
.
checked
=
false
row
.
checked
=
false
let
list
=
queryObj
.
Color
Names
.
filter
(
x
=>
{
let
list
=
queryObj
.
Color
List
.
filter
(
x
=>
{
if
(
x
!=
row
.
Color
Name
)
return
x
if
(
x
!=
row
.
Name
)
return
x
})
})
queryObj
.
ColorNames
=
list
queryObj
.
ColorList
=
list
if
(
queryObj
.
ColorNames
.
length
==
0
)
queryObj
.
ColorName
=
''
}
}
}
}
search
()
search
()
...
@@ -555,6 +542,7 @@ const getTemplateQuery = async () => {
...
@@ -555,6 +542,7 @@ const getTemplateQuery = async () => {
ColorName
:
ColorList
[
i
].
ColorName
,
ColorName
:
ColorList
[
i
].
ColorName
,
ColorValue
:
ColorList
[
i
].
ColorValue
,
ColorValue
:
ColorList
[
i
].
ColorValue
,
checked
:
false
,
checked
:
false
,
ID
:
ColorList
[
i
].
Id
})
})
}
}
// arrList(tempData.ColorList)
// arrList(tempData.ColorList)
...
@@ -608,6 +596,14 @@ const scrollingHandler = () =>{
...
@@ -608,6 +596,14 @@ const scrollingHandler = () =>{
}
}
const
getColor
=
async
()
=>
{
let
response
=
await
LineService
.
GetParentColor
(
queryColor
.
value
)
if
(
response
.
data
.
resultCode
==
1
)
{
ColorList
.
value
=
response
.
data
.
data
}
}
getColor
()
getLinesHandler
();
getLinesHandler
();
getTemplateQuery
();
getTemplateQuery
();
queryTemplateBySearchHandler
();
queryTemplateBySearchHandler
();
...
...
src/views/TemplateCenter/Index.vue
View file @
eca7030a
...
@@ -4,13 +4,13 @@
...
@@ -4,13 +4,13 @@
<div
class=
"row wrap"
>
<div
class=
"row wrap"
>
<div
class=
"row items-center q-mb-lg"
>
<div
class=
"row items-center q-mb-lg"
>
<span
class=
"fz14 q-pr-sm shrink"
>
关键字:
</span>
<span
class=
"fz14 q-pr-sm shrink"
>
关键字:
</span>
<el-input
style=
"width:212px"
v-model=
"queryObj.Title"
placeholder=
"请输入关键字"
clearable
<el-input
style=
"
max-
width:212px"
v-model=
"queryObj.Title"
placeholder=
"请输入关键字"
clearable
@
keyup
.
enter=
"search"
></el-input>
@
keyup
.
enter=
"search"
></el-input>
</div>
</div>
<div
class=
"row items-center q-mb-lg"
>
<div
class=
"row items-center q-mb-lg"
>
<span
class=
"fz14 q-pr-sm shrink"
>
模版:
</span>
<span
class=
"fz14 q-pr-sm shrink"
>
模版:
</span>
<el-select
v-model=
"queryObj.TemplateType"
<el-select
v-model=
"queryObj.TemplateType"
class=
"ml-1 shrink"
class=
"ml-1 shrink
TemSel
"
placeholder=
"模版类型"
clearable
>
placeholder=
"模版类型"
clearable
>
<el-option
<el-option
v-for=
"item in typeArr"
v-for=
"item in typeArr"
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
<div
class=
"row items-center q-mb-lg"
>
<div
class=
"row items-center q-mb-lg"
>
<span
class=
"fz14 q-pr-sm shrink"
>
版型:
</span>
<span
class=
"fz14 q-pr-sm shrink"
>
版型:
</span>
<el-select
v-model=
"queryObj.TempType"
<el-select
v-model=
"queryObj.TempType"
class=
"ml-1 shrink"
class=
"ml-1 shrink
TemSel
"
placeholder=
"版型"
clearable
>
placeholder=
"版型"
clearable
>
<el-option
<el-option
v-for=
"item in layouts"
v-for=
"item in layouts"
...
@@ -33,17 +33,45 @@
...
@@ -33,17 +33,45 @@
/>
/>
</el-select>
</el-select>
</div>
</div>
<div
class=
"row items-center q-mb-lg"
>
<span
class=
"fz14 q-pr-sm shrink"
>
国家:
</span>
<el-select
v-model=
"queryObj.CountryList"
multiple
class=
"ml-1 shrink TemSel"
placeholder=
"国家"
clearable
>
<el-option
key=
""
label=
"不限"
value=
""
/>
<el-option
v-for=
"item in countries"
:key=
"item.CountryName"
:label=
"`$
{item.CountryName}`"
:value="item.CountryName"
/>
</el-select>
</div>
<div
class=
"row items-center q-mb-lg"
>
<span
class=
"fz14 q-pr-sm shrink"
>
季节:
</span>
<el-select
v-model=
"queryObj.SeasonList"
multiple
class=
"ml-1 shrink TemSel"
placeholder=
"季节"
clearable
>
<el-option
key=
""
label=
"四季"
value=
""
/>
<el-option
v-for=
"item in seasonArr"
:key=
"item.SeasonName"
:label=
"`$
{item.SeasonName}`"
:value="item.SeasonName"
/>
</el-select>
</div>
<div
class=
"row items-center q-mb-lg"
>
<div
class=
"row items-center q-mb-lg"
>
<span
class=
"fz14 q-pr-sm shrink"
>
颜色:
</span>
<span
class=
"fz14 q-pr-sm shrink"
>
颜色:
</span>
<el-select
v-model=
"queryObj.Color
Name"
<el-select
v-model=
"queryObj.Color
List"
multiple
class=
"ml-1 shrink"
class=
"ml-1 shrink
TemSel
"
placeholder=
"颜色"
clearable
>
placeholder=
"颜色"
clearable
>
<el-option
key=
""
label=
"不限"
value=
""
/>
<el-option
key=
""
label=
"不限"
value=
""
/>
<el-option
<el-option
v-for=
"item in ColorList"
v-for=
"item in ColorList"
:key=
"item.
ColorName
"
:key=
"item.
ID
"
:label=
"`$
{item.
Color
Name}`"
:label=
"`$
{item.Name}`"
:value="item.
Color
Name"
:value="item.Name"
/>
/>
</el-select>
</el-select>
</div>
</div>
...
@@ -234,8 +262,12 @@ const queryObj = reactive({
...
@@ -234,8 +262,12 @@ const queryObj = reactive({
type
:
0
,
type
:
0
,
sort
:
0
,
//排序方式
sort
:
0
,
//排序方式
})
})
const
queryColor
=
ref
({
DictKey
:
'Trip_Template_Color'
,
Code
:
''
,
})
const
setTemplateType
=
ref
(
1
)
const
setTemplateType
=
ref
(
1
)
const
ColorList
=
DominantColour
()
const
ColorList
=
ref
([])
//
DominantColour()
const
tableScrollHandler
=
()
=>
{
const
tableScrollHandler
=
()
=>
{
if
(
queryObj
.
pageCount
>
queryObj
.
pageIndex
){
if
(
queryObj
.
pageCount
>
queryObj
.
pageIndex
){
...
@@ -568,34 +600,17 @@ const getTemplateQuery = async () => {
...
@@ -568,34 +600,17 @@ const getTemplateQuery = async () => {
}
}
//国家
//国家
if
(
tempData
&&
tempData
.
CountryList
)
{
if
(
tempData
&&
tempData
.
CountryList
)
{
arrList
(
tempData
.
CountryList
)
countries
.
value
=
tempData
.
CountryList
countriesOther
.
value
=
tempData
.
CountryList
.
filter
((
x
,
index
)
=>
{
if
(
model
.
value
==
1
){
return
index
>=
12
}
else
return
index
>=
13
})
countries
.
value
=
tempData
.
CountryList
.
filter
((
x
,
index
)
=>
{
if
(
model
.
value
==
1
)
{
return
index
<
12
}
else
return
index
<
13
})
}
}
//颜色
//颜色
if
(
tempData
&&
tempData
.
ColorList
)
{
if
(
tempData
&&
tempData
.
ColorList
)
{
for
(
let
i
=
0
;
i
<
ColorList
.
length
;
i
++
){
// for(let i=0;i
<
ColorList
.
length
;
i
++
){
colorArr
.
value
.
push
({
// colorArr.value.push({
ColorName
:
ColorList
[
i
].
ColorName
,
// ColorName: ColorList[i].ColorName,
ColorValue
:
ColorList
[
i
].
ColorValue
,
// ColorValue: ColorList[i].ColorValue,
checked
:
false
,
// checked: false,
})
// })
}
// }
// arrList(tempData.ColorList)
// colorArrOther.value = tempData.ColorList.filter((x,index)=>{
// if(model.value==1){ return index>=15 }
// else return index>=14
// })
// colorArr.value = tempData.ColorList.filter((x,index)=>{
// if(model.value==1){ return index
<
14
}
// else return index
<
14
// })
}
}
//季节
//季节
if
(
tempData
&&
tempData
.
SeasonList
)
{
if
(
tempData
&&
tempData
.
SeasonList
)
{
...
@@ -638,6 +653,14 @@ const scrollingHandler = () =>{
...
@@ -638,6 +653,14 @@ const scrollingHandler = () =>{
}
}
const
getColor
=
async
()
=>
{
let
response
=
await
LineService
.
GetParentColor
(
queryColor
.
value
)
if
(
response
.
data
.
resultCode
==
1
)
{
ColorList
.
value
=
response
.
data
.
data
}
}
getColor
()
getLinesHandler
();
getLinesHandler
();
getTemplateQuery
();
getTemplateQuery
();
queryTemplateBySearchHandler
();
queryTemplateBySearchHandler
();
...
@@ -1104,4 +1127,7 @@ onMounted(()=>{
...
@@ -1104,4 +1127,7 @@ onMounted(()=>{
height
:
42px
;
height
:
42px
;
line-height
:
42px
;
line-height
:
42px
;
}
}
.TemSel
{
width
:
120px
;
}
</
style
>
</
style
>
\ No newline at end of file
src/views/TemplateCenter/colour.vue
View file @
eca7030a
This diff is collapsed.
Click to expand it.
src/views/TemplateCenter/font.vue
View file @
eca7030a
<
template
>
<
template
>
<div
class=
"row items-center flex-between q-mb-lg"
>
<div
class=
"row items-center flex-between q-mb-lg"
>
<div></div>
<div></div>
<el-input
style=
"width:600px"
v-model=
"queryObj.keyWords"
placeholder=
"请输入关键字"
class=
"q-pr-33"
clearable
<el-input
style=
"
max-
width:600px"
v-model=
"queryObj.keyWords"
placeholder=
"请输入关键字"
class=
"q-pr-33"
clearable
@
keyup
.
enter=
"search"
>
@
keyup
.
enter=
"search"
>
<template
#
append
>
<template
#
append
>
<div
class=
"Market-select-line absolute"
></div>
<div
class=
"Market-select-line absolute"
></div>
...
...
src/views/TemplateCenter/nation.vue
View file @
eca7030a
<
template
>
<
template
>
<div
class=
"row items-center flex-between q-mb-lg"
>
<div
class=
"row items-center flex-between q-mb-lg"
>
<div></div>
<div></div>
<el-input
style=
"width:600px"
v-model=
"queryObj.Name"
placeholder=
"请输入关键字"
class=
"q-pr-33"
clearable
<el-input
style=
"
max-
width:600px"
v-model=
"queryObj.Name"
placeholder=
"请输入关键字"
class=
"q-pr-33"
clearable
@
keyup
.
enter=
"search"
>
@
keyup
.
enter=
"search"
>
<template
#
append
>
<template
#
append
>
<div
class=
"Market-select-line absolute"
></div>
<div
class=
"Market-select-line absolute"
></div>
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
</div>
</div>
</
template
>
</
template
>
</el-input>
</el-input>
<el-button
type=
"primary"
size=
"default"
style=
"color: #ffff;"
@
click=
"add
Font
"
>
<el-button
type=
"primary"
size=
"default"
style=
"color: #ffff;"
@
click=
"add
Nation
"
>
新增国家
新增国家
</el-button>
</el-button>
</div>
</div>
...
@@ -121,7 +121,7 @@
...
@@ -121,7 +121,7 @@
type
:
'warning'
,
type
:
'warning'
,
})
})
datas
.
requestLoading
=
true
datas
.
requestLoading
=
true
const
result
=
await
Line
Service
.
SetTemplateConfigData
(
datas
.
params
)
const
result
=
await
Config
Service
.
SetTemplateConfigData
(
datas
.
params
)
if
(
result
){
if
(
result
){
datas
.
addEditVisible
=
false
datas
.
addEditVisible
=
false
datas
.
requestLoading
=
false
datas
.
requestLoading
=
false
...
@@ -134,7 +134,7 @@
...
@@ -134,7 +134,7 @@
datas
.
requestLoading
=
false
datas
.
requestLoading
=
false
}
}
}
}
const
add
Font
=
()
=>
{
const
add
Nation
=
()
=>
{
datas
.
addEditVisible
=
true
datas
.
addEditVisible
=
true
}
}
const
editDelete
=
(
item
:
Object
,
index
:
Number
)
=>
{
const
editDelete
=
(
item
:
Object
,
index
:
Number
)
=>
{
...
...
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