Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
document-management
Project
Overview
Details
Activity
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
ry-istanbul-web
document-management
Commits
dc75ae7f
Commit
dc75ae7f
authored
Nov 27, 2022
by
lxyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 测试
parent
35801b85
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
61 additions
and
87 deletions
+61
-87
product.js
src/api/system/product.js
+5
-5
index.vue
src/views/dataList/dashboard/index.vue
+44
-77
index.vue
src/views/index.vue
+12
-5
No files found.
src/api/system/product.js
View file @
dc75ae7f
...
...
@@ -7,9 +7,9 @@ import request from '@/utils/request'
})
}
// 查询文档差异接口
export
function
doc
taskFinddifferenceSearch
({
id
,
context
,
pageindex
,
pagesize
})
{
export
function
doc
umentFindDocument
({
name
,
pageindex
,
pagesize
})
{
return
request
({
url
:
'/api/doc/doc
task/finddifference/'
+
id
+
'?context='
+
context
+
'&pageindex='
+
pageindex
+
'&pagesize='
+
pagesize
,
method
:
'
ge
t'
url
:
'/api/doc/doc
ument/findDocument/?name='
+
name
+
'&pageindex='
+
pageindex
+
'&pagesize='
+
pagesize
,
method
:
'
pos
t'
})
}
\ No newline at end of file
}
\ No newline at end of file
src/views/dataList/dashboard/index.vue
View file @
dc75ae7f
...
...
@@ -19,14 +19,14 @@
<div
class=
"left-content"
v-for=
"(item, index) in listLeft"
:key=
"index"
>
<div
class=
"left-content-title"
>
<div
class=
"logo"
><img
src=
"../../../assets/image/juliang.png"
alt=
""
class=
"logo-img"
></div>
<span
class=
"media text"
>
{{
item
.
media
}}
</span>
<span
class=
"text"
>
更新日期:
{{
item
.
data
}}
</span>
<span
class=
"media text"
>
{{
item
.
name
}}
</span>
<span
class=
"text"
>
更新日期:
{{
dateFilter
(
item
.
createTime
)
}}
</span>
</div>
<div
class=
"content-text-header"
>
<a
class=
"link"
v-if=
"item.link"
:href=
"item.link"
target=
"_blank"
>
{{
item
.
title
}}
</a>
<span
v-else
>
{{
item
.
title
}}
</span>
</div>
<p
v-for=
"(items, index) in item.content"
:key=
"index"
class=
"content-text"
v-html=
"items.contentTex
t"
></p>
<p
class=
"content-text"
v-html=
"item.docConten
t"
></p>
</div>
<pagination
v-show=
"queryParamsLeft.pageContent>0 && loadMoreLeft && listLeft.length"
:total=
"queryParamsLeft.pageContent"
...
...
@@ -44,7 +44,7 @@
<
script
>
// 接口调用方法
import
{
doc
taskFinddifferenceSearch
doc
umentFindDocument
}
from
"@/api/system/product"
;
export
default
{
data
()
{
...
...
@@ -91,87 +91,54 @@ export default {
localStorage
.
setItem
(
"searchDocument"
,
this
.
search
.
trim
())
this
.
seatchInitLeft
()
},
dateFilter
(
time
)
{
if
(
!
time
)
{
// 当时间是null或者无效格式时我们返回空
return
'-'
}
else
{
const
date
=
new
Date
(
time
)
// 时间戳为10位需*1000,时间戳为13位的话不需乘1000
const
dateNumFun
=
(
num
)
=>
num
<
10
?
`0
${
num
}
`
:
num
// 使用箭头函数和三目运算以及es6字符串的简单操作。因为只有一个操作不需要{} ,目的就是数字小于10,例如9那么就加上一个0,变成09,否则就返回本身。 // 这是es6的解构赋值。
const
[
Y
,
M
,
D
,
h
,
m
,
s
]
=
[
date
.
getFullYear
(),
dateNumFun
(
date
.
getMonth
()
+
1
),
dateNumFun
(
date
.
getDate
()),
dateNumFun
(
date
.
getHours
()),
dateNumFun
(
date
.
getMinutes
()),
dateNumFun
(
date
.
getSeconds
())
]
return
`
${
Y
}
-
${
M
}
-
${
D
}
${
h
}
:
${
m
}
:
${
s
}
`
// 一定要注意是反引号,否则无效。
}
},
// 搜索左侧
seatchInitLeft
()
{
this
.
loadingLeft
=
true
doctaskFinddifferenceSearch
({
})
let
name
=
this
.
search
let
pageindex
=
this
.
queryParamsLeft
.
pageNo
let
pagesize
=
this
.
queryParamsLeft
.
pageSize
documentFindDocument
({
name
,
pageindex
,
pagesize
})
.
then
(
response
=>
{
if
(
this
.
queryParamsLeft
.
pageContent
===
0
)
{
this
.
queryParamsLeft
.
pageContent
=
0
for
(
let
i
=
0
;
i
<
10
;
i
++
)
{
let
data
=
{
media
:
'巨量引擎'
,
title
:
'巨量引擎开放平台'
+
(
i
+
1
),
data
:
'2022-10-18'
,
link
:
'https://ad.oceanengine.com/pages/login/index.html?source=oceanengine'
,
content
:
[
{
contentText
:
'通常情况下,应当处理 input 事件,并更新组件的绑定值(或使用v-model)。否则,输入框内显示的值将不会改变。1234'
,
// 这是完整的一段话
contentChange
:[
// 这段话里有多少变化以及链接出处
{
text
:
'或使用v-model'
,
url
:
'https://www.baidu.com/'
},
{
text
:
'输入框内显示的值'
,
url
:
'https://www.cnblogs.com/1234wu/p/11055005.html'
},
]
},
{
contentText
:
'视频或直播加热的功能,提升视频或直播间热度。121212'
,
// 这是完整的一段话
contentChange
:
[
{
text
:
'提升视频或直播间热度'
,
url
:
'https://element.eleme.io/#/zh-CN/component/pagination#events'
},
]
}
]
}
let
content
=
data
.
content
for
(
let
a
=
0
;
a
<
content
.
length
;
a
++
)
{
let
contentChange
=
content
[
a
].
contentChange
for
(
let
b
=
0
;
b
<
contentChange
.
length
;
b
++
)
{
let
text
=
contentChange
[
b
].
text
let
url
=
contentChange
[
b
].
url
if
(
content
[
a
].
contentText
.
indexOf
(
text
)
>=
0
)
{
let
values
=
content
[
a
].
contentText
.
split
(
text
);
content
[
a
].
contentText
=
values
.
join
(
`<a style="color: rgba(250, 0, 0, 1);" href="
${
url
}
" target="_blank">
${
text
}
</a>`
)
}
}
}
this
.
listLeft
.
push
(
data
)
if
(
response
.
code
===
200
)
{
let
pageContent
=
this
.
queryParamsLeft
.
pageContent
if
(
response
.
content
.
totalSize
!==
pageContent
)
{
this
.
queryParamsLeft
.
pageContent
=
response
.
content
.
totalSize
||
0
}
let
data
=
response
.
content
.
value
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
let
difWordAfter
=
data
[
i
].
difWordAfter
||
''
let
url
=
data
[
i
].
docUrl
if
(
data
[
i
].
docContent
.
indexOf
(
difWordAfter
)
>=
0
&&
difWordAfter
)
{
let
values
=
data
[
i
].
docContent
.
split
(
difWordAfter
);
data
[
i
].
docContent
=
values
.
join
(
`<a style="color: rgba(250, 0, 0, 1);" href="
${
url
}
" target="_blank">
${
difWordAfter
}
</a>`
)
}
}
}
else
{
let
page
=
this
.
queryParamsLeft
.
pageNo
+
1
let
orderSize
=
this
.
queryParamsLeft
.
pageNo
*
this
.
queryParamsLeft
.
pageSize
let
number
=
page
*
this
.
queryParamsLeft
.
pageSize
let
content
=
this
.
queryParamsLeft
.
pageContent
if
(
number
>=
content
)
{
this
.
loadMoreLeft
=
false
}
else
{
this
.
loadMoreLeft
=
true
}
this
.
listLeft
=
[]
for
(
let
i
=
orderSize
;
i
<
number
;
i
++
)
{
this
.
listLeft
.
push
({
media
:
'巨量'
+
(
i
+
1
),
title
:
'巨量引擎开放平台'
+
(
i
+
1
),
data
:
'2022-10-18'
,
link
:
'https://ad.oceanengine.com/pages/login/index.html?source=oceanengine'
,
content
:
[
'视频或直播加热的功能,提升视频或直播间热度。'
,
'视频或直播加热的功能,提升视频或直播间热度。'
]
})
}
this
.
queryParamsLeft
.
pageNo
=
page
this
.
$set
(
this
,
'listLeft'
,
data
)
}
this
.
loadingLeft
=
false
})
.
catch
(
error
=>
{
this
.
loading
=
false
;
this
.
loading
Left
=
false
;
});
setTimeout
(()
=>
{
this
.
loadingLeft
=
false
...
...
src/views/index.vue
View file @
dc75ae7f
...
...
@@ -38,11 +38,18 @@ export default {
return
}
this
.
$router
.
push
({
name
:
'tailAfter'
,
params
:
{
search
:
this
.
search
}
})
path
:
'taskListIndex'
,
query
:
{
id
:
1
,
name
:
121212
}
})
// this.$router.push({
// name: 'tailAfter',
// params: {
// search: this.search
// }
// })
}
},
computed
:
{}
...
...
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