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
4fb31fdb
Commit
4fb31fdb
authored
Jun 27, 2024
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
云盘
parent
26bf5017
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
116 additions
and
3 deletions
+116
-3
CloudDiskList.vue
src/components/CloudDisk/CloudDiskList.vue
+2
-3
CloudDiskService.ts
src/services/CloudDiskService.ts
+11
-0
time.ts
src/utils/time.ts
+103
-0
No files found.
src/components/CloudDisk/CloudDiskList.vue
View file @
4fb31fdb
...
...
@@ -13,7 +13,7 @@
<IconSearch
class=
"cusor-pointer"
@
click
.
stop=
"refreshHandler"
></IconSearch>
</
template
>
<
template
#
append
>
<el-select
v-model=
"queryObj.Q
PPTistCloudGroupIds
"
placeholder=
"Select"
style=
"width: 100px"
<el-select
v-model=
"queryObj.Q
CreateBy
"
placeholder=
"Select"
style=
"width: 100px"
@
change=
"refreshHandler"
>
<el-option
label=
"稿定模板"
value=
"1"
/>
<el-option
label=
"我的空间"
value=
"2"
/>
...
...
@@ -317,8 +317,6 @@
CloudGroupId
:
''
,
FileName
:
''
,
total
:
0
,
QPPTistCloudGroupIds
:
'1'
,
//稿定模版 云盘分组数组[1,2] 待定
imgType
:
1
,
//模版 素材
layout
:
1
,
//布局
QFileType
:
[],
//格式
QStartTime
:
time
[
0
],
...
...
@@ -418,6 +416,7 @@
const
MultipleChoice
=
(
row
:
Array
)
=>
{
datas
.
SelectedDatas
=
row
if
(
datas
.
SelectedDatas
.
length
>
0
)
datas
.
ControlsShow
=
true
newDatasSelected
()
}
...
...
src/services/CloudDiskService.ts
View file @
4fb31fdb
import
{
array
}
from
'@amcharts/amcharts4/core'
;
import
Api
,{
HttpResponse
,
Result
}
from
'./../utils/request'
;
class
CloudDiskService
{
static
async
BatchRemoveCloudInfo
(
IdList
:
any
):
Promise
<
HttpResponse
>
{
let
params
=
{
IdList
}
return
Api
.
Post
(
"ppt_BatchRemoveCloudInfo"
,
params
)
}
static
async
GetPPTistCloudInfoFileFormatCount
(
QUserType
:
number
):
Promise
<
HttpResponse
>
{
let
params
=
{
QUserType
}
return
Api
.
Post
(
"ppt_GetPPTistCloudInfoFileFormatCount"
,
params
)
}
static
async
BaiduImageDefinition
(
params
:
any
):
Promise
<
HttpResponse
>
{
return
Api
.
Post
(
"ppt_BaiduImageDefinition"
,
params
)
}
...
...
src/utils/time.ts
0 → 100644
View file @
4fb31fdb
// 最近1周、最近1月、最近3个月 时分秒为00:00:00
// 明天的时间
var
tomorrow
=
new
Date
()
tomorrow
.
setTime
(
tomorrow
.
getTime
()
+
24
*
60
*
60
*
1000
)
var
end
=
tomorrow
// 今天的时间
// var end = new Date()
var
year
=
end
.
getFullYear
()
var
month
:
any
=
end
.
getMonth
()
+
1
// 0-11表示 1-12月
var
day
=
end
.
getDate
()
var
dateObj
=
{
start
:
''
as
any
,
end
:
''
as
any
}
dateObj
.
start
=
null
dateObj
.
end
=
year
+
'-'
+
(
month
>
9
?
month
:
'0'
+
month
)
+
'-'
+
day
var
endMonthDay
=
new
Date
(
year
,
month
,
0
).
getDate
()
// 当前月的总天数
// 获取近一周日期范围
export
const
getLastWeekDate
=
()
=>
{
if
(
day
-
7
<=
0
)
{
// 如果在当月7日之前
const
startMonthDay
=
new
Date
(
year
,
(
parseInt
(
month
)
-
1
),
0
).
getDate
()
// 1周前所在月的总天数
if
(
month
-
1
<=
0
)
{
// 如果在当年的1月份
dateObj
.
start
=
(
year
-
1
)
+
'-'
+
12
+
'-'
+
(
31
-
(
7
-
day
))
}
else
{
dateObj
.
start
=
year
+
'-'
+
((
month
-
1
)
>
9
?(
month
-
1
):
'0'
+
(
month
-
1
))
+
'-'
+
(
startMonthDay
-
(
7
-
day
))
}
}
else
{
dateObj
.
start
=
year
+
'-'
+
(
month
>
9
?
month
:
'0'
+
month
)
+
'-'
+
(
day
-
7
)
}
const
lastWeekDate
=
[
dateObj
.
start
,
dateObj
.
end
]
return
lastWeekDate
}
// 获取近一个月日期范围
export
const
getLastMonthDate
=
()
=>
{
if
(
month
-
1
<=
0
)
{
// 如果是1月,年数往前推一年<br>
dateObj
.
start
=
(
year
-
1
)
+
'-'
+
12
+
'-'
+
day
}
else
{
const
startMonthDay
=
new
Date
(
year
,
(
parseInt
(
month
)
-
1
),
0
).
getDate
()
if
(
startMonthDay
<
day
)
{
// 1个月前所在月的总天数小于现在的天日期
if
(
day
<
endMonthDay
)
{
// 当前天日期小于当前月总天数
dateObj
.
start
=
year
+
'-'
+
((
month
-
1
)
>
9
?(
month
-
1
):
'0'
+
(
month
-
1
))
+
'-'
+
(
startMonthDay
-
(
endMonthDay
-
day
))
}
else
{
dateObj
.
start
=
year
+
'-'
+
((
month
-
1
)
>
9
?(
month
-
1
):
'0'
+
(
month
-
1
))
+
'-'
+
startMonthDay
}
}
else
{
dateObj
.
start
=
year
+
'-'
+
((
month
-
1
)
>
9
?(
month
-
1
):
'0'
+
(
month
-
1
))
+
'-'
+
day
}
}
const
newMonthDate
=
[
dateObj
.
start
,
dateObj
.
end
]
return
newMonthDate
}
// 获取近六个月日期范围
export
const
getLastSixMonthDate
=
()
=>
{
if
(
month
-
6
<=
0
)
{
// 如果是1、2、3、4、5、6月,年数往前推一年
const
start6MonthDay
=
new
Date
((
year
-
1
),
(
12
-
(
6
-
parseInt
(
month
))),
0
).
getDate
()
// 6个月前所在月的总天数
if
(
start6MonthDay
<
day
)
{
// 6个月前所在月的总天数小于现在的天日期
dateObj
.
start
=
(
year
-
1
)
+
'-'
+
(
12
-
(
6
-
month
))
+
'-'
+
start6MonthDay
}
else
{
dateObj
.
start
=
(
year
-
1
)
+
'-'
+
(
12
-
(
6
-
month
))
+
'-'
+
day
}
}
else
{
const
start6MonthDay
=
new
Date
(
year
,
(
parseInt
(
month
)
-
6
),
0
).
getDate
()
// 6个月前所在月的总天数
if
(
start6MonthDay
<
day
)
{
// 3个月前所在月的总天数小于现在的天日期
if
(
day
<
endMonthDay
)
{
// 当前天日期小于当前月总天数,2月份比较特殊的月份
dateObj
.
start
=
year
+
'-'
+
((
month
-
6
)
>
9
?(
month
-
6
):
'0'
+
(
month
-
6
))
+
'-'
+
(
start6MonthDay
-
(
endMonthDay
-
day
))
}
else
{
dateObj
.
start
=
year
+
'-'
+
((
month
-
6
)
>
9
?(
month
-
6
):
'0'
+
(
month
-
6
))
+
'-'
+
start6MonthDay
}
}
else
{
dateObj
.
start
=
year
+
'-'
+
((
month
-
6
)
>
9
?(
month
-
6
):
'0'
+
(
month
-
6
))
+
'-'
+
day
}
}
const
newThreeMonthDate
=
[
dateObj
.
start
,
dateObj
.
end
]
return
newThreeMonthDate
}
// 获取一年
export
const
getLastOneYearDate
=
()
=>
{
if
(
month
-
12
<=
0
)
{
// 如果是1、2、3、4、5、6月,年数往前推一年
const
startOneYearMonthDay
=
new
Date
((
year
-
1
),
(
12
-
(
12
-
parseInt
(
month
))),
0
).
getDate
()
// 6个月前所在月的总天数
if
(
startOneYearMonthDay
<
day
)
{
// 6个月前所在月的总天数小于现在的天日期
dateObj
.
start
=
(
year
-
1
)
+
'-'
+
(
12
-
(
12
-
month
))
+
'-'
+
startOneYearMonthDay
}
else
{
dateObj
.
start
=
(
year
-
1
)
+
'-'
+
(
12
-
(
12
-
month
))
+
'-'
+
day
}
}
else
{
const
startOneYearMonthDay
=
new
Date
(
year
,
(
parseInt
(
month
)
-
12
),
0
).
getDate
()
// 6个月前所在月的总天数
if
(
startOneYearMonthDay
<
day
)
{
// 一年前所在月的总天数小于现在的天日期
if
(
day
<
endMonthDay
)
{
// 当前天日期小于当前月总天数,2月份比较特殊的月份
dateObj
.
start
=
year
+
'-'
+
((
month
-
12
)
>
9
?(
month
-
12
):
'0'
+
(
month
-
12
))
+
'-'
+
(
startOneYearMonthDay
-
(
endMonthDay
-
day
))
}
else
{
dateObj
.
start
=
year
+
'-'
+
((
month
-
12
)
>
9
?(
month
-
12
):
'0'
+
(
month
-
12
))
+
'-'
+
startOneYearMonthDay
}
}
else
{
dateObj
.
start
=
year
+
'-'
+
((
month
-
12
)
>
9
?(
month
-
12
):
'0'
+
(
month
-
12
))
+
'-'
+
day
}
}
const
newThreeMonthDate
=
[
dateObj
.
start
,
dateObj
.
end
]
return
newThreeMonthDate
}
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