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
a52baaa1
Commit
a52baaa1
authored
Nov 23, 2023
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
3c4c15c8
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
43 additions
and
39 deletions
+43
-39
App.vue
src/App.vue
+1
-1
screen.ts
src/store/screen.ts
+11
-6
common.ts
src/utils/common.ts
+13
-0
index.vue
src/views/Editor/EditorHeader/index.vue
+10
-7
index.vue
src/views/Editor/Thumbnails/index.vue
+1
-11
ElementTemplateData.vue
src/views/Editor/Toolbar/ElementTemplateData.vue
+1
-11
Index.vue
src/views/Market/Index.vue
+6
-3
No files found.
src/App.vue
View file @
a52baaa1
...
@@ -48,7 +48,7 @@ const userLoginHandler = async ()=>{
...
@@ -48,7 +48,7 @@ const userLoginHandler = async ()=>{
let
ConfigId
=
9117
let
ConfigId
=
9117
let
model
=
1
let
model
=
1
if
(
param
.
uid
)
userId
=
parseInt
(
param
.
uid
)
if
(
param
.
uid
)
userId
=
parseInt
(
param
.
uid
)
if
(
ConfigId
)
ConfigIdStore
.
set
Market
(
ConfigId
)
if
(
ConfigId
)
ConfigIdStore
.
set
ConfigId
(
ConfigId
)
if
(
model
)
modelStore
.
setModel
(
model
)
if
(
model
)
modelStore
.
setModel
(
model
)
try
{
try
{
await
userStore
().
setUserLoginAsync
(
userId
)
await
userStore
().
setUserLoginAsync
(
userId
)
...
...
src/store/screen.ts
View file @
a52baaa1
...
@@ -5,14 +5,17 @@ export interface ScreenState {
...
@@ -5,14 +5,17 @@ export interface ScreenState {
screening
:
boolean
,
screening
:
boolean
,
market
:
boolean
,
market
:
boolean
,
model
:
number
,
model
:
number
,
ConfigId
:
number
isModel
:
boolean
,
ConfigId
:
number
,
}
}
export
const
useScreenStore
=
defineStore
(
'screen'
,
{
export
const
useScreenStore
=
defineStore
(
'screen'
,
{
state
:
():
ScreenState
=>
({
state
:
():
ScreenState
=>
({
screening
:
false
,
// 是否进入放映状态
screening
:
false
,
// 是否进入放映状态
market
:
true
,
market
:
true
,
model
:
0
,
//是否有新增模版权限
model
:
0
,
//是否有新增修改模版权限
isModel
:
false
,
//该团是否存在模版
ConfigId
:
0
,
ConfigId
:
0
,
}),
}),
...
@@ -23,14 +26,16 @@ export const useScreenStore = defineStore('screen', {
...
@@ -23,14 +26,16 @@ export const useScreenStore = defineStore('screen', {
this
.
market
=
false
this
.
market
=
false
}
}
},
},
setMarket
(
market
:
boolean
){
setMarket
(
market
:
boolean
)
{
this
.
market
=
market
this
.
market
=
market
},
},
setModel
(
model
:
number
){
setModel
(
model
:
number
)
{
console
.
log
(
model
,
'====='
)
this
.
model
=
model
this
.
model
=
model
},
},
setConfigId
(
ConfigId
:
number
){
setIsModel
(
isModel
:
boolean
)
{
this
.
isModel
=
isModel
},
setConfigId
(
ConfigId
:
number
)
{
this
.
ConfigId
=
ConfigId
this
.
ConfigId
=
ConfigId
}
}
},
},
...
...
src/utils/common.ts
View file @
a52baaa1
...
@@ -26,4 +26,17 @@ export const query = (url?:string)=>{
...
@@ -26,4 +26,17 @@ export const query = (url?:string)=>{
json
[
item
[
0
]]
=
item
[
1
]
json
[
item
[
0
]]
=
item
[
1
]
}
}
return
json
return
json
}
/**
* 提取字符串中的文字
*/
export
const
getHtmlPlainText
=
(
html_str
:
string
)
=>
{
let
re
=
new
RegExp
(
'<[^<>]+>'
,
'g'
)
if
(
html_str
)
{
let
text
=
html_str
.
replace
(
re
,
''
)
return
text
}
else
{
return
''
}
}
}
\ No newline at end of file
src/views/Editor/EditorHeader/index.vue
View file @
a52baaa1
...
@@ -139,13 +139,14 @@ const UploadPsd = () => {
...
@@ -139,13 +139,14 @@ const UploadPsd = () => {
}
}
// 保存
// 新增修改模版
// 新增修改模版
const
SetTripTemplateSlide
=
async
()
=>
{
const
SetTripTemplateSlide
=
async
()
=>
{
try
{
try
{
console
.
log
(
queryObj
.
value
,
'新增修改模版---'
)
let
TemplateRes
=
await
ConfigService
.
SetTripTemplateSlide
(
queryObj
.
value
);
let
TemplateRes
=
await
ConfigService
.
SetTripTemplateSlide
(
queryObj
.
value
);
if
(
TemplateRes
.
data
.
resultCode
==
1
)
{
if
(
TemplateRes
.
data
.
resultCode
==
1
)
{
}
}
datas
.
loading
=
false
datas
.
loading
=
false
}
catch
(
error
)
{
}
catch
(
error
)
{
...
@@ -157,12 +158,14 @@ const SetTripTemplateSlide = async () => {
...
@@ -157,12 +158,14 @@ const SetTripTemplateSlide = async () => {
const
SetTripTemplateConfig
=
async
()
=>
{
const
SetTripTemplateConfig
=
async
()
=>
{
try
{
try
{
let
queryMsg
=
{
let
queryMsg
=
{
ConfigId
:
ConfigId
,
ConfigId
:
ConfigId
.
value
,
TempId
:
queryObj
.
value
.
TempId
,
TempId
:
queryObj
.
value
.
TempId
,
TempData
:
queryObj
.
value
.
TempData
}
}
console
.
log
(
queryMsg
,
'新增修改团数据---'
)
let
TemplateRes
=
await
ConfigService
.
SetSetTripConfig
(
queryMsg
);
let
TemplateRes
=
await
ConfigService
.
SetSetTripConfig
(
queryMsg
);
if
(
TemplateRes
.
data
.
resultCode
==
1
)
{
if
(
TemplateRes
.
data
.
resultCode
==
1
)
{
}
}
datas
.
loading
=
false
datas
.
loading
=
false
}
catch
(
error
)
{
}
catch
(
error
)
{
...
@@ -170,9 +173,9 @@ const SetTripTemplateConfig = async () => {
...
@@ -170,9 +173,9 @@ const SetTripTemplateConfig = async () => {
console
.
log
(
"TemplateGetTripFiled"
,
error
);
console
.
log
(
"TemplateGetTripFiled"
,
error
);
}
}
}
}
// 保存
const
setTemplate
=
async
()
=>
{
const
setTemplate
=
async
()
=>
{
// console.log(JSON.stringify(slides.value),'----保存接口',queryObj.value)
// console.log(JSON.stringify(slides.value),'----保存接口',queryObj.value)
console
.
log
(
slides
.
value
,
'-------'
)
if
(
queryObj
.
value
.
Title
==
''
||!
queryObj
.
value
.
LineId
||!
queryObj
.
value
.
LtId
if
(
queryObj
.
value
.
Title
==
''
||!
queryObj
.
value
.
LineId
||!
queryObj
.
value
.
LtId
// ||queryObj.value.CoverImg==''
// ||queryObj.value.CoverImg==''
||
queryObj
.
value
.
CountryName
==
''
||
queryObj
.
value
.
SeasonName
==
''
||
queryObj
.
value
.
CountryName
==
''
||
queryObj
.
value
.
SeasonName
==
''
...
@@ -206,9 +209,9 @@ const setTemplate = async () =>{
...
@@ -206,9 +209,9 @@ const setTemplate = async () =>{
}
}
queryObj
.
value
.
TempData
=
JSON
.
stringify
(
slides
.
value
)
queryObj
.
value
.
TempData
=
JSON
.
stringify
(
slides
.
value
)
datas
.
loading
=
true
datas
.
loading
=
true
if
(
model
&&
userInfo
.
IsEditTripTemplate
==
1
){
if
(
!
ConfigId
&&
model
&&
userInfo
.
IsEditTripTemplate
==
1
){
await
SetTripTemplateSlide
()
await
SetTripTemplateSlide
()
}
else
{
}
else
if
(
ConfigId
)
{
await
SetTripTemplateConfig
()
await
SetTripTemplateConfig
()
}
}
}
}
...
...
src/views/Editor/Thumbnails/index.vue
View file @
a52baaa1
...
@@ -58,12 +58,12 @@ import useScreening from '@/hooks/useScreening'
...
@@ -58,12 +58,12 @@ import useScreening from '@/hooks/useScreening'
import
useLoadSlides
from
'@/hooks/useLoadSlides'
import
useLoadSlides
from
'@/hooks/useLoadSlides'
import
{
injectKeyDataSource
,
injectKeyTemplate
}
from
'@/types/injectKey'
import
{
injectKeyDataSource
,
injectKeyTemplate
}
from
'@/types/injectKey'
import
ConfigService
from
'@/services/ConfigService'
import
ConfigService
from
'@/services/ConfigService'
import
{
getHtmlPlainText
}
from
'@/utils/common'
import
ThumbnailSlide
from
'@/views/components/ThumbnailSlide/index.vue'
import
ThumbnailSlide
from
'@/views/components/ThumbnailSlide/index.vue'
import
LayoutPool
from
'./LayoutPool.vue'
import
LayoutPool
from
'./LayoutPool.vue'
import
Popover
from
'@/components/Popover.vue'
import
Popover
from
'@/components/Popover.vue'
import
Draggable
from
'vuedraggable'
import
Draggable
from
'vuedraggable'
const
mainStore
=
useMainStore
()
const
mainStore
=
useMainStore
()
const
slidesStore
=
useSlidesStore
()
const
slidesStore
=
useSlidesStore
()
const
keyboardStore
=
useKeyboardStore
()
const
keyboardStore
=
useKeyboardStore
()
...
@@ -126,16 +126,6 @@ watch(() => slideIndex.value, () => {
...
@@ -126,16 +126,6 @@ watch(() => slideIndex.value, () => {
})
})
})
})
//提取字符串中的文字
const
getHtmlPlainText
=
(
html_str
)
=>
{
let
re
=
new
RegExp
(
'<[^<>]+>'
,
'g'
)
if
(
html_str
)
{
let
text
=
html_str
.
replace
(
re
,
''
)
return
text
}
else
{
return
''
}
}
queryObj
.
value
=
inject
(
injectKeyDataSource
).
queryObj
queryObj
.
value
=
inject
(
injectKeyDataSource
).
queryObj
...
...
src/views/Editor/Toolbar/ElementTemplateData.vue
View file @
a52baaa1
...
@@ -92,6 +92,7 @@
...
@@ -92,6 +92,7 @@
import
LineService
from
'@/services/LineService'
import
LineService
from
'@/services/LineService'
import
ConfigService
from
'@/services/ConfigService'
import
ConfigService
from
'@/services/ConfigService'
import
{
injectKeyDataSource
}
from
'@/types/injectKey'
import
{
injectKeyDataSource
}
from
'@/types/injectKey'
import
{
getHtmlPlainText
}
from
'@/utils/common'
const
datas
=
reactive
({
const
datas
=
reactive
({
DataSource
:{},
DataSource
:{},
...
@@ -125,17 +126,6 @@
...
@@ -125,17 +126,6 @@
queryObj
.
value
.
ColorName
=
obj
.
ColorName
queryObj
.
value
.
ColorName
=
obj
.
ColorName
}
}
//提取字符串中的文字
const
getHtmlPlainText
=
(
html_str
)
=>
{
let
re
=
new
RegExp
(
'<[^<>]+>'
,
'g'
)
if
(
html_str
)
{
let
text
=
html_str
.
replace
(
re
,
''
)
return
text
}
else
{
return
''
}
}
let
pageObj
=
slides
.
value
.
find
((
slide
,
indexs
)
=>
{
let
pageObj
=
slides
.
value
.
find
((
slide
,
indexs
)
=>
{
return
slideIndex
.
value
==
indexs
return
slideIndex
.
value
==
indexs
})
})
...
...
src/views/Market/Index.vue
View file @
a52baaa1
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
</el-input>
</el-input>
</el-col>
</el-col>
<el-col
:span=
"6"
style=
"text-align: right;"
>
<el-col
:span=
"6"
style=
"text-align: right;"
>
<el-button
v-if=
"userInfo.IsEditTripTemplate==1"
v-tooltip=
"'添加模版'"
type=
"danger"
<el-button
v-if=
"userInfo.IsEditTripTemplate==1
&&model
"
v-tooltip=
"'添加模版'"
type=
"danger"
size=
"small"
icon=
"Plus"
size=
"small"
icon=
"Plus"
@
click=
"addTemplate()"
style=
"color: #ffff;"
></el-button>
@
click=
"addTemplate()"
style=
"color: #ffff;"
></el-button>
</el-col>
</el-col>
...
@@ -129,7 +129,8 @@
...
@@ -129,7 +129,8 @@
const
searchData
=
ref
({}
as
any
)
const
searchData
=
ref
({}
as
any
)
searchData
.
value
=
inject
(
injectKeyTemplate
)
searchData
.
value
=
inject
(
injectKeyTemplate
)
const
marketStore
=
useScreenStore
()
const
marketStore
=
useScreenStore
()
const
{
screening
,
market
,
model
,
ConfigId
}
=
storeToRefs
(
useScreenStore
())
const
isModelStore
=
useScreenStore
()
const
{
screening
,
market
,
model
,
isModel
,
ConfigId
}
=
storeToRefs
(
useScreenStore
())
const
addTemplate
=
()
=>
{
const
addTemplate
=
()
=>
{
marketStore
.
setMarket
(
!
market
)
marketStore
.
setMarket
(
!
market
)
...
@@ -140,7 +141,7 @@
...
@@ -140,7 +141,7 @@
*/
*/
const
GetTripConfig
=
async
()
=>
{
const
GetTripConfig
=
async
()
=>
{
try
{
try
{
if
(
!
ConfigId
)
return
if
(
!
ConfigId
||
isModel
)
return
let
queryMsg
=
{
let
queryMsg
=
{
ConfigId
:
ConfigId
ConfigId
:
ConfigId
}
}
...
@@ -148,6 +149,7 @@
...
@@ -148,6 +149,7 @@
if
(
datasRes
.
data
.
resultCode
==
1
)
{
if
(
datasRes
.
data
.
resultCode
==
1
)
{
if
(
datasRes
.
data
.
data
&&
datasRes
.
data
.
data
.
length
>
0
&&
datasRes
.
data
.
data
[
0
].
TempId
){
if
(
datasRes
.
data
.
data
&&
datasRes
.
data
.
data
.
length
>
0
&&
datasRes
.
data
.
data
[
0
].
TempId
){
searchData
.
value
.
TempId
=
datasRes
.
data
.
data
[
0
].
TempId
searchData
.
value
.
TempId
=
datasRes
.
data
.
data
[
0
].
TempId
isModelStore
.
setIsModel
(
true
)
marketStore
.
setMarket
(
!
market
)
marketStore
.
setMarket
(
!
market
)
}
}
}
}
...
@@ -161,6 +163,7 @@
...
@@ -161,6 +163,7 @@
* 页面跳转
* 页面跳转
*/
*/
const
goToTemplate
=
(
item
:
any
)
=>
{
const
goToTemplate
=
(
item
:
any
)
=>
{
if
(
!
ConfigId
||!
model
)
return
searchData
.
value
.
TempId
=
item
.
TempId
searchData
.
value
.
TempId
=
item
.
TempId
marketStore
.
setMarket
(
!
market
)
marketStore
.
setMarket
(
!
market
)
// console.log("item", item.TempId);
// console.log("item", item.TempId);
...
...
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