Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
ty_patentSys
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hanxiao
ty_patentSys
Commits
0926c470
Commit
0926c470
authored
Aug 11, 2023
by
liudx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改浏览记录bug
parent
7959ac4d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
97 additions
and
69 deletions
+97
-69
src/utils/indexApi.js
+3
-0
src/views/history/index.vue
+30
-35
src/views/home/home.vue
+64
-34
No files found.
src/utils/indexApi.js
View file @
0926c470
...
...
@@ -27,6 +27,9 @@ export const structure = p=>get('/api/enterprise/structure/'+p.id)
export
const
jointApplication
=
p
=>
get
(
'/api/enterprise/jointApplication/'
+
p
.
id
)
//企业详情-技术合作 专利购买
export
const
patentPurchase
=
p
=>
get
(
'/api/enterprise/patentPurchase/'
+
p
.
id
)
//首页-企业技术合作榜单
export
const
technicalCooperation
=
p
=>
get
(
'/api/enterprise/technicalCooperation'
,{})
...
...
src/views/history/index.vue
View file @
0926c470
...
...
@@ -31,7 +31,7 @@
<a-pagination
v-model:current=
"currentPage"
@
change=
"onChange"
:total=
"total"
:total=
"total
0
"
:showSizeChanger=
"false"
/>
</a-tab-pane>
...
...
@@ -46,17 +46,15 @@
<
template
#
bodyCell=
"{ column, text, record }"
>
<template
v-if=
"column.dataIndex == 'action'"
>
<a-button
@
click=
"exportPDF(record)"
@
click=
"exportPDF(record)"
style=
"
background-color: #fa7f03;
color: #fff;
margin-right: 10%;
"
>
导出
</a-button>
>
导出
</a-button>
<a-button
type=
"primary"
@
click=
"sendMail(record)"
>
发送到邮箱
</a-button
>
...
...
@@ -71,7 +69,7 @@
</a-table>
<a-pagination
@
change=
"onChange"
:total=
"total"
:total=
"total
1
"
v-model:current=
"currentPage"
:showSizeChanger=
"false"
/>
...
...
@@ -96,12 +94,11 @@
</a-form-item>
</a-form>
</a-modal> -->
</div>
</template>
<
script
>
import
{
message
}
from
"ant-design-vue"
;
import
{
userBrowse
,
ExportList
,
sendEmail
}
from
"../../utils/userAPI"
;
import
{
userBrowse
,
ExportList
,
sendEmail
}
from
"../../utils/userAPI"
;
export
default
{
name
:
"history"
,
data
()
{
...
...
@@ -182,7 +179,7 @@ export default {
},
],
dataHistory
:
[],
dataExport
:
[]
dataExport
:
[],
};
},
components
:
{},
...
...
@@ -211,16 +208,16 @@ export default {
//发送到邮箱
async
sendMail
(
record
)
{
// this.visible = false;
let
res
=
await
sendEmail
({
email
:
record
.
email
,
name
:
record
.
name
,
url
:
record
.
url
})
if
(
res
.
code
==
200
)
{
message
.
success
(
res
.
msg
)
}
else
{
message
.
error
(
res
.
msg
)
}
let
res
=
await
sendEmail
({
email
:
record
.
email
,
name
:
record
.
name
,
url
:
record
.
url
,
});
if
(
res
.
code
==
200
)
{
message
.
success
(
res
.
msg
);
}
else
{
message
.
error
(
res
.
msg
);
}
},
//打开弹窗
openModal
()
{
...
...
@@ -241,13 +238,12 @@ export default {
}).
then
((
res
)
=>
{
if
(
res
.
code
==
0
)
{
this
.
dataHistory
=
res
.
data
.
data
;
this
.
total
=
res
.
data
.
total
;
if
(
this
.
dataHistory
.
length
>
0
)
{
this
.
total
0
=
res
.
data
.
total
;
if
(
this
.
dataHistory
.
length
>
0
)
{
this
.
dataHistory
.
forEach
((
item
,
index
)
=>
{
item
.
index
=
(
this
.
currentPage
-
1
)
*
10
+
index
+
1
;
});
item
.
index
=
(
this
.
currentPage
-
1
)
*
10
+
index
+
1
;
});
}
}
else
{
message
.
error
(
res
.
msg
);
}
...
...
@@ -258,22 +254,21 @@ export default {
}).
then
((
res
)
=>
{
if
(
res
.
code
==
0
)
{
this
.
dataExport
=
res
.
data
.
data
;
this
.
total
=
res
.
data
.
total
;
if
(
this
.
dataExport
.
length
>
0
)
{
this
.
dataExport
.
forEach
((
item
,
index
)
=>
{
item
.
index
=
(
this
.
currentPage
-
1
)
*
10
+
index
+
1
;
});
this
.
total
1
=
res
.
data
.
total
;
if
(
this
.
dataExport
.
length
>
0
)
{
this
.
dataExport
.
forEach
((
item
,
index
)
=>
{
item
.
index
=
(
this
.
currentPage
-
1
)
*
10
+
index
+
1
;
});
}
}
else
{
message
.
error
(
res
.
msg
);
}
});
},
//导出pdf
exportPDF
(
record
){
window
.
open
(
record
.
url
)
}
exportPDF
(
record
)
{
window
.
open
(
record
.
url
)
;
}
,
},
created
()
{
this
.
init
();
...
...
src/views/home/home.vue
View file @
0926c470
...
...
@@ -24,7 +24,6 @@
v-model:value=
"searchValue"
placeholder=
"请输入关键词"
@
search=
"onSearch"
>
<!-- @input="onInput" -->
<template
#
enterButton
>
...
...
@@ -69,6 +68,7 @@
</div>
<div
class=
"home_list"
>
<!-- 列表 -->
<!-- 科创能力 -->
<div
class=
"ranking"
>
<div
class=
"ranking_title"
>
<img
src=
"@/static/home/index/icon-list01.png"
alt=
""
/>
...
...
@@ -76,35 +76,38 @@
<span
class=
"more"
@
click=
"openmore('1')"
>
更多
</span>
</div>
<!-- 判断是否有数据 -->
<
ul
v-if=
"innovateList
.length !== 0"
>
<
li
<
div
v-if=
"scientificInnovation
.length !== 0"
>
<
div
class=
"rank_item"
v-for=
"item in
innovateList
"
@
click=
"open
Details
"
v-for=
"item in
scientificInnovation
"
@
click=
"open
Company(item)
"
>
{{ item }}
</li>
</ul>
<div
class=
"doat"
></div>
<div>
{{ item.company_name }}
</div>
</div>
</div>
<div
class=
"empty_img"
v-else
>
<img
src=
"@/static/home/index/img-empty.png"
alt=
""
/>
<div
class=
"nodata"
>
暂无数据
</div>
</div>
</div>
<!-- 技术合作 -->
<div
class=
"ranking"
>
<div
class=
"ranking_title"
>
<img
src=
"@/static/home/index/icon-list02.png"
alt=
""
/>
<span
class=
"title"
>
企业技术合作榜单
</span>
<span
class=
"more"
@
click=
"openmore('2')"
>
更多
</span>
</div>
<
ul
v-if=
"innovateList.length !== 0"
>
<
li
<
div
v-if=
"innovateList.length !== 0"
>
<
div
class=
"rank_item"
v-for=
"item in innovateList"
@
click=
"open
Details
"
@
click=
"open
Company(item)
"
>
{{ item }}
</li>
</ul>
<div
class=
"doat"
></div>
<div>
{{ item.company_name }}
</div>
</div>
</div>
<div
class=
"empty_img"
v-else
>
<img
src=
"@/static/home/index/img-empty.png"
alt=
""
/>
<div
class=
"nodata"
>
暂无数据
</div>
...
...
@@ -116,15 +119,16 @@
<span
class=
"title"
>
浏览记录
</span>
<span
class=
"more"
@
click=
"openHistory"
>
更多
</span>
</div>
<
ul
v-if=
"historyList.length !== 0"
>
<
li
<
MenuDivider
v-if=
"historyList.length !== 0"
>
<
div
class=
"rank_item"
v-for=
"item in historyList"
@
click=
"openDetails(item)"
>
{{ item.name }}
</li>
</ul>
<div
class=
"doat"
></div>
<div>
{{ item.name }}
</div>
</div>
</MenuDivider>
<div
class=
"empty_img"
v-else
>
<img
src=
"@/static/home/index/img-empty.png"
alt=
""
/>
<div
class=
"nodata"
>
暂无浏览记录
</div>
...
...
@@ -136,15 +140,16 @@
<span
class=
"title"
>
我的关注
</span>
<span
class=
"more"
@
click=
"openFollow"
>
更多
</span>
</div>
<
ul
v-if=
"followList.length !== 0"
>
<
li
<
div
v-if=
"followList.length !== 0"
>
<
div
class=
"rank_item"
v-for=
"item in followList"
@
click=
"openDetails(item)"
>
{{ item.name }}
</li>
</ul>
<div
class=
"doat"
></div>
<div>
{{ item.name }}
</div>
</div>
</div>
<div
class=
"empty_img"
v-else
>
<img
src=
"@/static/home/index/img-empty.png"
alt=
""
/>
<div
class=
"nodata"
>
暂无关注数据
</div>
...
...
@@ -155,6 +160,8 @@
</template>
<
script
>
import
{
followList
,
userBrowse
}
from
"../../utils/userAPI"
;
import
{
technicalCooperation
}
from
"../../utils/indexApi"
;
export
default
{
name
:
"home"
,
data
()
{
...
...
@@ -164,11 +171,8 @@ export default {
searchValue
:
""
,
followList
:
[],
historyList
:
[],
innovateList
:
[
"山煤国际能源集团股份有限公司"
,
"山煤国际能源集团股份有限公司"
,
"山煤国际能源集团股份有限公司"
,
],
innovateList
:
[],
scientificInnovation
:[],
search_result
:
[
"山煤国际能源集团股份有限公司1"
,
"山煤国际能源集团股份有限公司2"
,
...
...
@@ -182,6 +186,7 @@ export default {
init
()
{
this
.
getFollow
();
this
.
getHistory
();
this
.
getTechnicalCooperation
();
},
getFollow
()
{
followList
({
...
...
@@ -207,6 +212,14 @@ export default {
}
});
},
//获取技术合作榜单
getTechnicalCooperation
()
{
technicalCooperation
().
then
((
res
)
=>
{
if
(
res
.
code
==
0
)
{
this
.
innovateList
=
res
.
data
;
}
});
},
//打开历史记录
openHistory
()
{
this
.
$router
.
push
({
...
...
@@ -240,6 +253,16 @@ export default {
});
}
},
//打开企业技术/科创详情页面
openCompany
(
item
){
this
.
$router
.
push
({
path
:
"/companyDetails"
,
query
:
{
id
:
item
.
id
,
name
:
item
.
company_name
,
},
});
},
//打开榜单
openmore
(
id
)
{
if
(
id
==
"1"
)
{
...
...
@@ -485,11 +508,18 @@ export default {
white-space
:
nowrap
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
}
li
::marker
{
color
:
#ccc
;
border-radius
:
50%
;
font-size
:
18px
;
//
position
:
relative
;
display
:
flex
;
align-items
:
center
;
.doat
{
width
:
5px
;
height
:
5px
;
margin
:
10px
;
background-color
:
#ccc
;
border-radius
:
50%
;
line-height
:
40px
;
}
}
}
}
...
...
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