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
09fe2d28
Commit
09fe2d28
authored
Feb 23, 2024
by
zhengke
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '1.2.0' of
http://gitlab.oytour.com/viitto/pptist
into 1.2.0
parents
7ee093cc
c6067e8b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
182 additions
and
89 deletions
+182
-89
components.d.ts
components.d.ts
+1
-0
ConfigService.ts
src/services/ConfigService.ts
+5
-0
common.ts
src/utils/common.ts
+40
-0
Workspace.vue
src/views/SellTemplate/Workspace.vue
+4
-7
SearchDocument.vue
src/views/SellTemplate/components/SearchDocument.vue
+125
-79
journeyAds.vue
src/views/SellTemplate/components/journeyAds.vue
+7
-3
No files found.
components.d.ts
View file @
09fe2d28
...
...
@@ -45,6 +45,7 @@ declare module 'vue' {
ElRow
:
typeof
import
(
'element-plus/es'
)[
'ElRow'
]
ElScrollbar
:
typeof
import
(
'element-plus/es'
)[
'ElScrollbar'
]
ElSelect
:
typeof
import
(
'element-plus/es'
)[
'ElSelect'
]
ElSkeleton
:
typeof
import
(
'element-plus/es'
)[
'ElSkeleton'
]
ElTable
:
typeof
import
(
'element-plus/es'
)[
'ElTable'
]
ElTableColumn
:
typeof
import
(
'element-plus/es'
)[
'ElTableColumn'
]
ElTabPane
:
typeof
import
(
'element-plus/es'
)[
'ElTabPane'
]
...
...
src/services/ConfigService.ts
View file @
09fe2d28
...
...
@@ -197,5 +197,10 @@ class ConfigService{
static
async
UpdateShareAsync
(
params
:{
ShareId
:
number
,
ShareTargetIds
:
string
,
EditType
:
string
}):
Promise
<
HttpResponse
>
{
return
Api
.
Post
(
"triptemplate_EditTripShare"
,
params
)
}
static
async
SearchFileAsync
(
params
:{
FileType
:
number
,
FileName
:
string
,
pageSize
:
number
,
[
key
:
string
]:
any
}):
Promise
<
HttpResponse
>
{
params
.
pageIndex
=
1
return
Api
.
Post
(
"triptemplate_HomeQuery"
,
params
)
}
}
export
default
ConfigService
;
\ No newline at end of file
src/utils/common.ts
View file @
09fe2d28
...
...
@@ -56,4 +56,44 @@ export const getDaysBetween = (date1:any, date2:any) => {
const
difference
=
Math
.
abs
(
date1Time
-
date2Time
);
// 获取时间差
return
Math
.
round
(
difference
/
ONE_DAY
);
// 两个日期之间的天数
}
export
const
formatDateTimeToRead
=
(
dateStr
:
string
,
prefix
:
string
=
''
)
=>
{
console
.
log
(
dateStr
)
let
minute
=
1000
*
60
;
let
hour
=
minute
*
60
;
let
day
=
hour
*
24
;
let
halfamonth
=
day
*
15
;
let
month
=
day
*
30
;
let
dateTimeStamp
=
Date
.
parse
(
dateStr
.
replaceAll
(
'-'
,
"/"
))
let
result
=
''
let
now
=
new
Date
().
getTime
();
let
diffValue
=
now
-
dateTimeStamp
;
if
(
diffValue
<
0
){
//若日期不符则弹出窗口告之
//alert("结束日期不能小于开始日期!");
return
''
}
let
monthC
=
diffValue
/
month
;
let
weekC
=
diffValue
/
(
7
*
day
);
let
dayC
=
diffValue
/
day
;
let
hourC
=
diffValue
/
hour
;
let
minC
=
diffValue
/
minute
;
if
(
monthC
>=
1
){
result
=
parseInt
(
monthC
.
toString
())
+
"月前"
;
}
else
if
(
weekC
>=
1
){
result
=
parseInt
(
weekC
.
toString
())
+
"周前"
;
}
else
if
(
dayC
>=
1
){
result
=
parseInt
(
dayC
.
toString
())
+
"天前"
;
}
else
if
(
hourC
>=
1
){
result
=
parseInt
(
hourC
.
toString
())
+
"小时前"
;
}
else
if
(
minC
>=
1
){
result
=
parseInt
(
minC
.
toString
())
+
"分钟前"
;
}
else
result
=
"刚刚"
;
return
prefix
+
result
;
}
\ No newline at end of file
src/views/SellTemplate/Workspace.vue
View file @
09fe2d28
...
...
@@ -98,13 +98,6 @@ import { useSellTemplateStore, useScreenStore, useSlidesStore } from '@/store'
const
{
userInfo
}
=
storeToRefs
(
userStore
())
const
currentMenu
=
ref
<
number
>
(
0
)
// const datas = reactive({
// journeyAds:{
// RefreshLoading: false
// }
// })
// provide('journeyAds',datas.journeyAds)
const
searchData
=
ref
({}
as
any
)
searchData
.
value
=
inject
(
injectKeyTemplate
)
if
(
searchData
.
value
.
SellTemplateType
){
...
...
@@ -123,6 +116,10 @@ const sellAdd = (type:number) =>{
marketStore
.
setMarket
(
true
)
}
const
openFilePosition
=
(
playload
:{
FileId
:
number
,
FileType
:
1
|
2
,
Position
:{
FileId
:
number
,
FileName
:
string
}[]})
=>
{
}
const
setCurrentMenuHandler
=
(
i
:
number
)
=>
{
currentMenu
.
value
=
i
searchData
.
value
.
currentMenu
=
i
...
...
src/views/SellTemplate/components/SearchDocument.vue
View file @
09fe2d28
This diff is collapsed.
Click to expand it.
src/views/SellTemplate/components/journeyAds.vue
View file @
09fe2d28
...
...
@@ -138,7 +138,7 @@
v-if=
"item.editTitle"
@
blur=
"handleUpdateTitle(item)"
/></td>
<td
class=
"text-center"
@
click
.
stop=
"item.FileType?OffEdit():editDelete(item,2)"
><span>
{{
item.Day?item.Day+'天前':item.UpdateTime
}}
</span></td>
<td
class=
"text-center"
@
click
.
stop=
"item.FileType?OffEdit():editDelete(item,2)"
><span>
{{
formatDateTimeToRead(item.UpdateTime
&&
item.UpdateTime!=''?item.UpdateTime:item.CreateTime)
}}
</span></td>
<td
class=
"text-center"
@
click
.
stop=
"item.FileType?OffEdit():editDelete(item,2)"
><span>
{{item.CreateName}}
</span></td>
<td
class=
"text-center"
>
<div
class=
"hoverShow row items-center just-center q-pt-sm"
>
...
...
@@ -229,13 +229,13 @@
@
close=
"() => {journeyAdsDetails = '';isCopyTo=false}"
></CopyFile>
</template>
<
script
setup
lang=
"ts"
>
import
{
ref
,
reactive
,
provide
,
watch
,
inject
,
onMounted
}
from
"vue"
;
import
{
ref
,
reactive
,
provide
,
watch
,
inject
,
onMounted
,
PropType
}
from
"vue"
;
import
{
ElLoading
,
ElMessage
,
ElMessageBox
}
from
"element-plus"
;
import
{
MoreFilled
,
Edit
,
ArrowLeft
,
CopyDocument
,
DCaret
,
CaretTop
,
CaretBottom
}
from
"@element-plus/icons-vue"
;
import
ConfigService
from
"@/services/ConfigService"
;
import
FolderService
from
"@/services/FolderService"
;
import
{
injectKeyTemplate
}
from
"@/types/injectKey"
;
import
{
getDaysBetween
}
from
"@/utils/common"
;
import
{
getDaysBetween
,
formatDateTimeToRead
}
from
"@/utils/common"
;
import
{
useSellTemplateStore
,
useScreenStore
,
useSlidesStore
}
from
"@/store"
;
import
ShareForm
from
"./ShareForm.vue"
;
import
Folder
from
"./Folder.vue"
;
...
...
@@ -251,6 +251,10 @@ const props = defineProps({
type
:
Number
,
default
:
3
,
},
Position
:{
type
:
Object
as
PropType
<
{
FileId
:
number
,
FileType
:
1
|
2
,
Position
:{
FileId
:
number
,
FileName
:
string
}[]}
|
null
>
,
default
:
null
}
});
const
PopoverVisibleControls
=
ref
(
false
);
...
...
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