@@ -55,7 +55,8 @@ | |||||
{{/* <a class="item" href="{{AppSubUrl}}/explore/data_analysis">{{.i18n.Tr "explore.data_analysis"}}</a> */}} | {{/* <a class="item" href="{{AppSubUrl}}/explore/data_analysis">{{.i18n.Tr "explore.data_analysis"}}</a> */}} | ||||
<a class="item" href="{{AppSubUrl}}/kanban/index.html" target="_blank" rel="opener">{{.i18n.Tr "explore.data_analysis"}}</a> | <a class="item" href="{{AppSubUrl}}/kanban/index.html" target="_blank" rel="opener">{{.i18n.Tr "explore.data_analysis"}}</a> | ||||
{{end}} | {{end}} | ||||
<a class="item" href="{{AppSubUrl}}/OpenI">{{.i18n.Tr "custom.head.openi.repo"}}</a> | |||||
<a class="item" href="{{AppSubUrl}}/OpenI">{{.i18n.Tr "custom.head.openi.repo"}}</a> | |||||
<a class="item" href="{{AppSubUrl}}/tech/tech_view">2030科技项目</a> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
{{else if .IsLandingPageHome}} | {{else if .IsLandingPageHome}} | ||||
@@ -97,6 +98,7 @@ | |||||
<a class="item" href="{{AppSubUrl}}/kanban/index.html" target="_blank" rel="opener">{{.i18n.Tr "explore.data_analysis"}}</a> | <a class="item" href="{{AppSubUrl}}/kanban/index.html" target="_blank" rel="opener">{{.i18n.Tr "explore.data_analysis"}}</a> | ||||
{{end}} | {{end}} | ||||
<a class="item" href="{{AppSubUrl}}/OpenI">{{.i18n.Tr "custom.head.openi.repo"}}</a> | <a class="item" href="{{AppSubUrl}}/OpenI">{{.i18n.Tr "custom.head.openi.repo"}}</a> | ||||
<a class="item" href="{{AppSubUrl}}/tech/tech_view">2030科技项目</a> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
{{else if .IsLandingPageExplore}} | {{else if .IsLandingPageExplore}} | ||||
@@ -52,7 +52,8 @@ | |||||
{{/* <a class="item" href="{{AppSubUrl}}/explore/data_analysis">{{.i18n.Tr "explore.data_analysis"}}</a> */}} | {{/* <a class="item" href="{{AppSubUrl}}/explore/data_analysis">{{.i18n.Tr "explore.data_analysis"}}</a> */}} | ||||
<a class="item" href="{{AppSubUrl}}/kanban/index.html" target="_blank" rel="opener">{{.i18n.Tr "explore.data_analysis"}}</a> | <a class="item" href="{{AppSubUrl}}/kanban/index.html" target="_blank" rel="opener">{{.i18n.Tr "explore.data_analysis"}}</a> | ||||
{{end}} | {{end}} | ||||
<a class="item" href="{{AppSubUrl}}/OpenI">{{.i18n.Tr "custom.head.openi.repo"}}</a> | |||||
<a class="item" href="{{AppSubUrl}}/OpenI">{{.i18n.Tr "custom.head.openi.repo"}}</a> | |||||
<a class="item" href="{{AppSubUrl}}/tech/tech_view">2030科技项目</a> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
{{else if .IsLandingPageHome}} | {{else if .IsLandingPageHome}} | ||||
@@ -92,6 +93,7 @@ | |||||
<a class="item" href="{{AppSubUrl}}/kanban/index.html" target="_blank" rel="opener">{{.i18n.Tr "explore.data_analysis"}}</a> | <a class="item" href="{{AppSubUrl}}/kanban/index.html" target="_blank" rel="opener">{{.i18n.Tr "explore.data_analysis"}}</a> | ||||
{{end}} | {{end}} | ||||
<a class="item" href="{{AppSubUrl}}/OpenI">{{.i18n.Tr "custom.head.openi.repo"}}</a> | <a class="item" href="{{AppSubUrl}}/OpenI">{{.i18n.Tr "custom.head.openi.repo"}}</a> | ||||
<a class="item" href="{{AppSubUrl}}/tech/tech_view">2030科技项目</a> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
{{else if .IsLandingPageExplore}} | {{else if .IsLandingPageExplore}} | ||||
@@ -44,7 +44,8 @@ | |||||
{{/* <a class="item" href="{{AppSubUrl}}/explore/data_analysis">{{.i18n.Tr "explore.data_analysis"}}</a> */}} | {{/* <a class="item" href="{{AppSubUrl}}/explore/data_analysis">{{.i18n.Tr "explore.data_analysis"}}</a> */}} | ||||
<a class="item" href="{{AppSubUrl}}/kanban/index.html" target="_blank" rel="opener">{{.i18n.Tr "explore.data_analysis"}}</a> | <a class="item" href="{{AppSubUrl}}/kanban/index.html" target="_blank" rel="opener">{{.i18n.Tr "explore.data_analysis"}}</a> | ||||
{{end}} | {{end}} | ||||
<a class="item" href="{{AppSubUrl}}/OpenI">{{.i18n.Tr "custom.head.openi.repo"}}</a> | |||||
<a class="item" href="{{AppSubUrl}}/OpenI">{{.i18n.Tr "custom.head.openi.repo"}}</a> | |||||
<a class="item" href="{{AppSubUrl}}/tech/tech_view">2030科技项目</a> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
{{else if .IsLandingPageHome}} | {{else if .IsLandingPageHome}} | ||||
@@ -85,6 +86,7 @@ | |||||
<a class="item" href="{{AppSubUrl}}/kanban/index.html" target="_blank" rel="opener">{{.i18n.Tr "explore.data_analysis"}}</a> | <a class="item" href="{{AppSubUrl}}/kanban/index.html" target="_blank" rel="opener">{{.i18n.Tr "explore.data_analysis"}}</a> | ||||
{{end}} | {{end}} | ||||
<a class="item" href="{{AppSubUrl}}/OpenI">{{.i18n.Tr "custom.head.openi.repo"}}</a> | <a class="item" href="{{AppSubUrl}}/OpenI">{{.i18n.Tr "custom.head.openi.repo"}}</a> | ||||
<a class="item" href="{{AppSubUrl}}/tech/tech_view">2030科技项目</a> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
{{else if .IsLandingPageExplore}} | {{else if .IsLandingPageExplore}} | ||||
@@ -54,7 +54,8 @@ | |||||
{{/* <a class="item" href="{{AppSubUrl}}/explore/data_analysis">{{.i18n.Tr "explore.data_analysis"}}</a> */}} | {{/* <a class="item" href="{{AppSubUrl}}/explore/data_analysis">{{.i18n.Tr "explore.data_analysis"}}</a> */}} | ||||
<a class="item" href="{{AppSubUrl}}/kanban/index.html" target="_blank" rel="opener">{{.i18n.Tr "explore.data_analysis"}}</a> | <a class="item" href="{{AppSubUrl}}/kanban/index.html" target="_blank" rel="opener">{{.i18n.Tr "explore.data_analysis"}}</a> | ||||
{{end}} | {{end}} | ||||
<a class="item" href="{{AppSubUrl}}/OpenI">{{.i18n.Tr "custom.head.openi.repo"}}</a> | |||||
<a class="item" href="{{AppSubUrl}}/OpenI">{{.i18n.Tr "custom.head.openi.repo"}}</a> | |||||
<a class="item" href="{{AppSubUrl}}/tech/tech_view">2030科技项目</a> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
{{else if .IsLandingPageHome}} | {{else if .IsLandingPageHome}} | ||||
@@ -95,6 +96,7 @@ | |||||
<a class="item" href="{{AppSubUrl}}/kanban/index.html" target="_blank" rel="opener">{{.i18n.Tr "explore.data_analysis"}}</a> | <a class="item" href="{{AppSubUrl}}/kanban/index.html" target="_blank" rel="opener">{{.i18n.Tr "explore.data_analysis"}}</a> | ||||
{{end}} | {{end}} | ||||
<a class="item" href="{{AppSubUrl}}/OpenI">{{.i18n.Tr "custom.head.openi.repo"}}</a> | <a class="item" href="{{AppSubUrl}}/OpenI">{{.i18n.Tr "custom.head.openi.repo"}}</a> | ||||
<a class="item" href="{{AppSubUrl}}/tech/tech_view">2030科技项目</a> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
{{else if .IsLandingPageExplore}} | {{else if .IsLandingPageExplore}} | ||||
@@ -0,0 +1,5 @@ | |||||
{{template "base/head_home" .}} | |||||
<link rel="stylesheet" href="{{StaticUrlPrefix}}/css/vp-tech-adminview.css?v={{MD5 AppVer}}" /> | |||||
<div id="__vue-root"></div> | |||||
<script src="{{StaticUrlPrefix}}/js/vp-tech-adminview.js?v={{MD5 AppVer}}"></script> | |||||
{{template "base/footer" .}} |
@@ -0,0 +1,5 @@ | |||||
{{template "base/head_home" .}} | |||||
<link rel="stylesheet" href="{{StaticUrlPrefix}}/css/vp-tech-create.css?v={{MD5 AppVer}}" /> | |||||
<div id="__vue-root"></div> | |||||
<script src="{{StaticUrlPrefix}}/js/vp-tech-create.js?v={{MD5 AppVer}}"></script> | |||||
{{template "base/footer" .}} |
@@ -0,0 +1,5 @@ | |||||
{{template "base/head_home" .}} | |||||
<link rel="stylesheet" href="{{StaticUrlPrefix}}/css/vp-tech-repoview.css?v={{MD5 AppVer}}" /> | |||||
<div id="__vue-root"></div> | |||||
<script src="{{StaticUrlPrefix}}/js/vp-tech-repoview.js?v={{MD5 AppVer}}"></script> | |||||
{{template "base/footer" .}} |
@@ -0,0 +1,5 @@ | |||||
{{template "base/head_home" .}} | |||||
<link rel="stylesheet" href="{{StaticUrlPrefix}}/css/vp-tech-techview.css?v={{MD5 AppVer}}" /> | |||||
<div id="__vue-root"></div> | |||||
<script src="{{StaticUrlPrefix}}/js/vp-tech-techview.js?v={{MD5 AppVer}}"></script> | |||||
{{template "base/footer" .}} |
@@ -0,0 +1,153 @@ | |||||
/* 科技项目汇聚功能相关 */ | |||||
import service from '../service'; | |||||
// 新建申请页面科技项目查询接口 no-项目编号,name-科技项目名称,institution-参与单位 | |||||
export const getTechs = (params) => { | |||||
return service({ | |||||
url: '/api/v1/tech', | |||||
method: 'get', | |||||
params: params, | |||||
}); | |||||
} | |||||
// 新建启智项目申请页面提交 url-启智项目地址,no-项目立项编号,institution-贡献单位,多个单位用逗号分隔 | |||||
export const setOpenIApply = (data) => { | |||||
return service({ | |||||
url: '/api/v1/tech/openi', | |||||
method: 'post', | |||||
data: data, | |||||
}); | |||||
} | |||||
// 新建启智项目申请页面提交 | |||||
// url-启智项目地址,uid-启智项目uid,repo_name-启智项目名称,topics-关键词,description-简介, | |||||
// no-项目立项编号,institution-贡献单位,多个单位用逗号分隔 | |||||
export const setNoOpenIApply = (data) => { | |||||
return service({ | |||||
url: '/api/v1/tech/no_openi', | |||||
method: 'post', | |||||
data: data, | |||||
}); | |||||
} | |||||
// 新建非启智项目申请页面项目路径可选的用户和组织 | |||||
// 返回 [{id:用户ID,name:用户名字,rel_avatar_link:用户图像地址,short_name:用户短名称},...] | |||||
export const getCreateRepoUser = () => { | |||||
return service({ | |||||
url: '/api/v1/create_repo/user', | |||||
method: 'get', | |||||
params: {}, | |||||
}); | |||||
} | |||||
// 项目过滤信息列表-筛选信息 type=0查询科技项目页, type=1查询启智项目页 | |||||
// 返回 {type_name:项目类型的名称, 字符串数组,institution_name:参与单位的名称,字符串数组,execute_year:执行年份,字符串数组, | |||||
// apply_year:申请年份,字符串数组,topic-关键词,字符串数组,project_name:科技项目名称,字符串数组} | |||||
export const getTechFilterInfo = (params) => { | |||||
return service({ | |||||
url: '/api/v1/tech/filter', | |||||
method: 'get', | |||||
params: { | |||||
type: params.type, | |||||
}, | |||||
}); | |||||
} | |||||
// 按科技项目页查询功能 | |||||
// 输入 name-科技项目名称,模糊匹配,type_name-项目类型的名称,精确匹配,institution_name-参与单位的名称,精确匹配,execute_year-执行年份,精确匹配,apply_year-申请年份,精确匹配,page,pageSize,sort | |||||
// 返回 {"total":10,"data":[{}]} | |||||
// data: {id:科技项目id,project_name:科技项目名称,institution:承担单位,all_institution:参与单位,apply_year:申报年份,execute_period:执行周期,repo_numer:项目成果数,repo:[]项目信息数组} | |||||
export const getTechSearch = (params) => { | |||||
return service({ | |||||
url: '/api/v1/tech/search', | |||||
method: 'get', | |||||
params: params, | |||||
}); | |||||
} | |||||
// 按启智项目页查询功能 | |||||
// 输入 name-项目名称,模糊匹配,tech_name-科技项目名称,精确匹配,institution_name-参与单位的名称,精确匹配,topic-关键词,精确匹配,page,pageSize,sort | |||||
// 返回 {"total":10,"data":[{}]} | |||||
// data: {id:项目id,owner_id:项目拥有者id,name:项目名称,alias:项目别名,topics:关键词 字符串数组,description:项目简介,updated_unix:最后更新时间,institution:贡献单位} | |||||
export const getTechOpenISearch = (params) => { | |||||
return service({ | |||||
url: '/api/v1/tech/repo_search', | |||||
method: 'get', | |||||
params: params, | |||||
}); | |||||
} | |||||
// 后台管理项目列表 | |||||
// 输入 page,pageSize | |||||
// 返回 {"total":10,"data":[{}]} | |||||
// data: {id:记录的id,name:启智项目名称,owner_name:启智项目拥有者名称,tech_name:科技项目名称,tech_number:科技项目编号,institution:项目承担单位, | |||||
// execute_period:执行周期,contact:联系人,contact_phone:联系电话,contact_email:联系邮件,apply_user:申请账号,status:状态} | |||||
export const getTechAdminList = (params) => { | |||||
return service({ | |||||
url: '/api/v1/tech/admin', | |||||
method: 'get', | |||||
params: params, | |||||
}); | |||||
} | |||||
// 后台管理项目列表交互(显示或隐藏) | |||||
// 输入 type-show/hide,id:[1,2,3] | |||||
// 返回 { code:0, message:"" } | |||||
export const setTechAdminOperation = (data) => { | |||||
return service({ | |||||
url: `/api/v1/tech/admin/action/${data.type}`, | |||||
method: 'post', | |||||
data: data.id, | |||||
}); | |||||
} | |||||
// 后台管理科技项目编号基本信息导入功能(科技项目管理员有权限) | |||||
// 输入 form file | |||||
export const setTechImportExcel = () => { | |||||
return service({ | |||||
url: `/api/v1/tech/basic`, | |||||
method: 'post', | |||||
data: {}, | |||||
}); | |||||
} | |||||
// 增加科技项目管理员(管理员才有权限) | |||||
// 输入 name:['111', '222'] | |||||
// 返回 { code:0, message:"" } | |||||
export const setTechAdminAdd = (data) => { | |||||
return service({ | |||||
url: '/api/v1/tech/admin_add', | |||||
method: 'post', | |||||
data: data, | |||||
}); | |||||
} | |||||
// 判断是否是科技项目管理员 | |||||
// 输入 name:['111', '222'] | |||||
export const getIsTechAdmin = () => { | |||||
return service({ | |||||
url: '/api/v1/tech/is_admin', | |||||
method: 'get', | |||||
params: {}, | |||||
}); | |||||
} | |||||
// ========================================================= | |||||
// 搜索Topics q-topic | |||||
// 返回 {topics: [{id,repo_count,topic_name,created,updated}]} | |||||
export const getTopics = (params) => { | |||||
return service({ | |||||
url: '/api/v1/topics/search', | |||||
method: 'get', | |||||
params: params, | |||||
}); | |||||
} | |||||
// 检测 repo name q:名称, owner:所属者 | |||||
export const getCheckRepoName = (params) => { | |||||
return service({ | |||||
url: '/repo/check_name', | |||||
method: 'get', | |||||
params: params, | |||||
}); | |||||
} |
@@ -0,0 +1,211 @@ | |||||
<template> | |||||
<div> | |||||
<div class="ui container"> | |||||
<div class="top-container"> | |||||
<el-checkbox class="check-toggle" v-model="allChecked" @change="allSelectChange">全选/全不选</el-checkbox> | |||||
<el-button class="btn-agree">批量同意展示</el-button> | |||||
<el-button class="btn-cancel">批量取消展示</el-button> | |||||
</div> | |||||
<div class="table-container"> | |||||
<div class="table-title">2030科技项目管理</div> | |||||
<div class="table-wrap"> | |||||
<el-table ref="tableRef" border :data="tableData" style="width:100%;" v-loading="loading" stripe row-key="id"> | |||||
<el-table-column label="" align="center" header-align="center" width="40" fixed> | |||||
<template slot-scope="scope"> | |||||
<el-checkbox v-model="scope.row.checked" @change="rowSelectChange(scope.row)"></el-checkbox> | |||||
</template> | |||||
</el-table-column> | |||||
<el-table-column prop="name" label="启智项目名称" align="center" header-align="center" fixed></el-table-column> | |||||
<el-table-column prop="tech_name" label="科技项目名称" align="center" header-align="center" | |||||
fixed></el-table-column> | |||||
<el-table-column prop="status" label="展示状态" align="center" header-align="center" fixed></el-table-column> | |||||
<el-table-column prop="tech_number" label="项目立项编号" align="center" header-align="center"></el-table-column> | |||||
<el-table-column prop="institution" label="项目承担单位" align="center" header-align="center"></el-table-column> | |||||
<el-table-column prop="execute_period" label="执行周期" align="center" header-align="center"></el-table-column> | |||||
<el-table-column prop="contact" label="联系人" align="center" header-align="center"></el-table-column> | |||||
<el-table-column prop="contact_phone" label="电话" align="center" header-align="center"></el-table-column> | |||||
<el-table-column prop="apply_user" label="申请账号" align="center" header-align="center"></el-table-column> | |||||
<el-table-column prop="" label="操作" align="center" header-align="center" fixed="right"></el-table-column> | |||||
</el-table> | |||||
</div> | |||||
<div class="center"> | |||||
<el-pagination ref="paginationRef" background @current-change="currentChange" @size-change="sizeChange" | |||||
:current-page.sync="page" :page-sizes="pageSizes" :page-size.sync="pageSize" | |||||
layout="total, sizes, prev, pager, next, jumper" :total="total"> | |||||
</el-pagination> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</template> | |||||
<script> | |||||
import { getTechAdminList, setTechAdminOperation } from '~/apis/modules/tech'; | |||||
export default { | |||||
data() { | |||||
return { | |||||
allChecked: false, | |||||
loading: false, | |||||
tableData: [], | |||||
page: 1, | |||||
pageSizes: [15, 30, 50, 100], | |||||
pageSize: 50, | |||||
total: 0, | |||||
}; | |||||
}, | |||||
components: {}, | |||||
methods: { | |||||
getData() { | |||||
this.loading = true; | |||||
getTechAdminList({ | |||||
page: this.page, | |||||
pageSize: this.pageSize, | |||||
}).then(res => { | |||||
this.loading = false; | |||||
const { total, data } = res.data; | |||||
this.tableData = data.map((item, index) => { | |||||
return { | |||||
checked: false, | |||||
id: 'id' + Math.random(), | |||||
...item, | |||||
} | |||||
}); | |||||
this.total = total; | |||||
}).catch(err => { | |||||
this.loading = false; | |||||
console.log(err); | |||||
}); | |||||
}, | |||||
allSelectChange() { | |||||
for (let i = 0, iLen = this.tableData.length; i < iLen; i++) { | |||||
this.tableData[i].checked = this.allChecked; | |||||
} | |||||
this.tableData.splice(1, 0); | |||||
}, | |||||
rowSelectChange(row) { | |||||
if (row.checked == false) { | |||||
this.allChecked = false; | |||||
} else { | |||||
if (this.tableData.filter((item) => item.checked).length == this.tableData.length) { | |||||
this.allChecked = true; | |||||
} | |||||
} | |||||
this.tableData.splice(1, 0); | |||||
}, | |||||
currentChange(page) { | |||||
this.page = page; | |||||
this.getData(); | |||||
}, | |||||
sizeChange(pageSize) { | |||||
this.pageSize = pageSize; | |||||
this.getData(); | |||||
}, | |||||
}, | |||||
beforeMount() { | |||||
}, | |||||
mounted() { | |||||
this.tableData = new Array(15).fill(0).map((item, index) => { | |||||
return { | |||||
id: '记录的id-' + index, | |||||
name: '启智项目名称-' + index, | |||||
owner_name: '启智项目拥有者名称-' + index, | |||||
tech_name: '科技项目名称-' + index, | |||||
tech_number: '科技项目编号-' + index, | |||||
institution: '项目承担单位-' + index, | |||||
execute_period: '执行周期-' + index, | |||||
contact: '联系人-' + index, | |||||
contact_phone: '联系电话-' + index, | |||||
contact_email: '联系邮件-' + index, | |||||
apply_user: '申请账号-' + index, | |||||
status: '状态-' + index, | |||||
} | |||||
}); | |||||
this.total = this.tableData.length; | |||||
}, | |||||
beforeDestroy() { }, | |||||
}; | |||||
</script> | |||||
<style scoped lang="less"> | |||||
.top-container { | |||||
display: flex; | |||||
align-items: center; | |||||
margin: 15px 0; | |||||
.check-toggle { | |||||
margin-right: 20px; | |||||
} | |||||
.btn-agree { | |||||
margin-right: 10px; | |||||
background: rgb(50, 145, 248); | |||||
color: rgb(255, 255, 255); | |||||
&:hover { | |||||
opacity: 0.9; | |||||
} | |||||
&:active { | |||||
opacity: 0.8; | |||||
} | |||||
} | |||||
.btn-cancel { | |||||
margin-right: 10px; | |||||
background: rgb(250, 140, 22); | |||||
color: rgb(255, 255, 255); | |||||
&:hover { | |||||
opacity: 0.9; | |||||
} | |||||
&:active { | |||||
opacity: 0.8; | |||||
} | |||||
} | |||||
} | |||||
.table-container { | |||||
.table-title { | |||||
height: 43px; | |||||
font-size: 16px; | |||||
font-weight: 700; | |||||
padding: 15px; | |||||
color: rgb(16, 16, 16); | |||||
border-color: rgb(212, 212, 213); | |||||
border-width: 1px; | |||||
border-style: solid; | |||||
border-radius: 5px 5px 0px 0px; | |||||
background: rgb(240, 240, 240); | |||||
display: flex; | |||||
align-items: center; | |||||
} | |||||
.table-wrap { | |||||
margin-bottom: 12px; | |||||
overflow-x: auto; | |||||
/deep/ .el-table__header { | |||||
th { | |||||
background: rgb(249, 249, 249); | |||||
font-size: 12px; | |||||
color: rgb(136, 136, 136); | |||||
font-weight: normal; | |||||
} | |||||
} | |||||
/deep/ .el-table__body { | |||||
td { | |||||
font-size: 12px; | |||||
} | |||||
} | |||||
/deep/ .el-radio__label { | |||||
display: none; | |||||
} | |||||
} | |||||
} | |||||
</style> |
@@ -0,0 +1,17 @@ | |||||
import Vue from 'vue'; | |||||
import ElementUI from 'element-ui'; | |||||
import 'element-ui/lib/theme-chalk/index.css'; | |||||
import localeEn from 'element-ui/lib/locale/lang/en'; | |||||
import localeZh from 'element-ui/lib/locale/lang/zh-CN'; | |||||
import { i18n, lang } from '~/langs'; | |||||
import App from './index.vue'; | |||||
Vue.use(ElementUI, { | |||||
locale: lang === 'zh-CN' ? localeZh : localeEn, | |||||
size: 'small', | |||||
}); | |||||
new Vue({ | |||||
i18n, | |||||
render: (h) => h(App), | |||||
}).$mount('#__vue-root'); |
@@ -0,0 +1,277 @@ | |||||
<template> | |||||
<div> | |||||
<div class="filter-main" v-show="!showSecond"> | |||||
<div class="filter-c" v-for="(item, index) in mainData"> | |||||
<div class="filter-title">{{ item.title }}</div> | |||||
<div class="filter-item-c"> | |||||
<div class="filter-item" v-for="(_item, _index) in item.showData" @click="changeFilter(item, _item)" | |||||
:style="conds[item.key] == _item ? { backgroundColor: item.focusBgColor, color: item.focusColor } : { backgroundColor: item.bgColor, color: item.color }"> | |||||
{{ _item }} | |||||
</div> | |||||
</div> | |||||
<div class="filter-view-more-c" v-if="item.data.length > item.showMaxLen"> | |||||
<span class="filter-view-more" @click="goMore(item)"> | |||||
<i class="el-icon-arrow-down"></i><span>展开更多</span> | |||||
</span> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="filter-second" v-show="showSecond"> | |||||
<div class="filter-second-hd"> | |||||
<span class="filter-second-go-back" @click="goBack()"> | |||||
<i class="el-icon-back"></i><span>返回上一级</span> | |||||
</span> | |||||
</div> | |||||
<div class="filter-title">{{ secondData.title }}</div> | |||||
<div class="filter-item-c"> | |||||
<div class="filter-item" v-for="(_item, _index) in secondData.data" @click="changeFilter(secondData, _item)" | |||||
:style="conds[secondData.key] == _item ? { backgroundColor: secondData.focusBgColor, color: secondData.focusColor } : { backgroundColor: secondData.bgColor, color: secondData.color }"> | |||||
{{ _item }} | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</template> | |||||
<script> | |||||
import { getTechFilterInfo } from '~/apis/modules/tech'; | |||||
export default { | |||||
name: "Filters", | |||||
props: { | |||||
type: { type: Number, default: -1 }, // 0-tech_view, 1-repo_view | |||||
condition: { type: Object, default: () => ({}) }, | |||||
}, | |||||
components: {}, | |||||
data() { | |||||
return { | |||||
list_tech: [{ | |||||
title: '项目类型', | |||||
key: 'type_name', | |||||
bgColor: 'rgb(237, 234, 251)', | |||||
color: 'rgb(100, 59, 159)', | |||||
focusBgColor: 'rgb(100, 59, 159)', | |||||
focusColor: 'rgb(255, 255, 255)', | |||||
data: [], | |||||
showData: [], | |||||
showMaxLen: 6, | |||||
}, { | |||||
title: '项目参与单位', | |||||
key: 'institution_name', | |||||
bgColor: 'rgb(234, 241, 251)', | |||||
color: 'rgb(18, 76, 157)', | |||||
focusBgColor: 'rgb(18, 76, 157)', | |||||
focusColor: 'rgb(255, 255, 255)', | |||||
data: [], | |||||
showData: [], | |||||
showMaxLen: 10, | |||||
}, { | |||||
title: '执行周期包含年份', | |||||
key: 'execute_year', | |||||
bgColor: 'rgb(225, 242, 234)', | |||||
color: 'rgb(8, 96, 96)', | |||||
focusBgColor: 'rgb(8, 96, 96)', | |||||
focusColor: 'rgb(255, 255, 255)', | |||||
data: [], | |||||
showData: [], | |||||
showMaxLen: 10, | |||||
}, { | |||||
title: '申报年份', | |||||
key: 'apply_year', | |||||
bgColor: 'rgb(231, 249, 222)', | |||||
color: 'rgb(55, 94, 2)', | |||||
focusBgColor: 'rgb(55, 94, 2)', | |||||
focusColor: 'rgb(255, 255, 255)', | |||||
data: [], | |||||
showData: [], | |||||
showMaxLen: 10, | |||||
}], | |||||
list_repo: [{ | |||||
title: '关键词', | |||||
key: 'topic', | |||||
bgColor: 'rgb(234, 250, 251)', | |||||
color: 'rgb(0, 167, 132)', | |||||
focusBgColor: 'rgb(0, 167, 132)', | |||||
focusColor: 'rgb(255, 255, 255)', | |||||
data: [], | |||||
showData: [], | |||||
showMaxLen: 10, | |||||
}, { | |||||
title: '所属科技项目', | |||||
key: 'project_name', | |||||
bgColor: 'rgb(234, 245, 251)', | |||||
color: 'rgb(8, 0, 148)', | |||||
focusBgColor: 'rgb(8, 0, 148)', | |||||
focusColor: 'rgb(255, 255, 255)', | |||||
data: [], | |||||
showData: [], | |||||
showMaxLen: 10, | |||||
}, { | |||||
title: '成果贡献单位', | |||||
key: 'institution_name', | |||||
bgColor: 'rgb(234, 241, 251)', | |||||
color: 'rgb(18, 76, 157)', | |||||
focusBgColor: 'rgb(18, 76, 157)', | |||||
focusColor: 'rgb(255, 255, 255)', | |||||
data: [], | |||||
showData: [], | |||||
showMaxLen: 10, | |||||
}, | |||||
], | |||||
conds: { | |||||
type_name: '', | |||||
institution_name: '', | |||||
execute_year: '', | |||||
apply_year: '', | |||||
topic: '', | |||||
project_name: '', | |||||
}, | |||||
mainData: [], | |||||
showSecond: false, | |||||
secondData: {}, | |||||
}; | |||||
}, | |||||
methods: { | |||||
goMore(item) { | |||||
this.secondData = item; | |||||
this.showSecond = true; | |||||
}, | |||||
goBack() { | |||||
this.showSecond = false; | |||||
}, | |||||
changeFilter(item, _item) { | |||||
const value = this.conds[item.key] == _item ? '' : _item; | |||||
this.$emit('changeCondition', { | |||||
[item.key]: value | |||||
}); | |||||
} | |||||
}, | |||||
watch: { | |||||
condition: { | |||||
handler(newVal) { | |||||
console.log('Filters:watch:condition', newVal); | |||||
this.conds.type_name = newVal.type_name || ''; | |||||
this.conds.institution_name = newVal.institution_name || ''; | |||||
this.conds.execute_year = newVal.execute_year || ''; | |||||
this.conds.apply_year = newVal.apply_year || ''; | |||||
this.conds.topic = newVal.topic || ''; | |||||
this.conds.project_name = newVal.project_name || ''; | |||||
}, | |||||
immediate: true, | |||||
deep: true, | |||||
}, | |||||
}, | |||||
beforeMount() { | |||||
if (this.type == 0) { | |||||
this.mainData = this.list_tech; | |||||
} else if (this.type == 1) { | |||||
this.mainData = this.list_repo; | |||||
} | |||||
const data = { | |||||
type_name: ['基础前沿', '应用示范研究', '重大共性关键技术', '其他', '基础前沿1', '基础前沿2', '基础前沿3', '基础前沿4', '基础前沿5'], | |||||
institution_name: ['北京大学', '北京工业大学', '北京航空航天大学', '北京交通大学', '清华大学'], | |||||
execute_year: ['2019', '2020', '2021', '2022', '2023'], | |||||
apply_year: ['2018', '2019', '2020', '2021', '2022'], | |||||
topic: ['数据库', '操作系统', '云计算', '大数据', '数据可视化', '其他'], | |||||
project_name: ['新一代神经网络模型', '小样本条件下的自适应机器学习理论', '面向复杂数据处理的新型神经网络模型'], | |||||
} | |||||
for (let i = 0, iLen = this.mainData.length; i < iLen; i++) { | |||||
const filterItem = this.mainData[i]; | |||||
const key = filterItem.key; | |||||
const max = filterItem.showMaxLen; | |||||
if (data[key]) { | |||||
filterItem.data = data[key]; | |||||
filterItem.showData = data[key].slice(0, max); | |||||
if (this.conds[key] && filterItem.showData.indexOf(this.conds[key]) < 0) { | |||||
filterItem.showData.push(this.conds[key]); | |||||
} | |||||
} | |||||
} | |||||
return; | |||||
getTechFilterInfo({ | |||||
type: this.type, | |||||
}).then(res => { | |||||
console.log(res); | |||||
}).catch(err => { | |||||
console.log(err); | |||||
}); | |||||
}, | |||||
mounted() { }, | |||||
}; | |||||
</script> | |||||
<style scoped lang="less"> | |||||
.filter-c { | |||||
margin-bottom: 32px; | |||||
.filter-title { | |||||
font-size: 18px; | |||||
color: rgb(16, 16, 16); | |||||
margin: 14px 0; | |||||
} | |||||
.filter-item-c { | |||||
display: flex; | |||||
flex-wrap: wrap; | |||||
.filter-item { | |||||
border-radius: 3px; | |||||
padding: 3px 10px; | |||||
margin-right: 10px; | |||||
margin-bottom: 10px; | |||||
cursor: pointer; | |||||
} | |||||
} | |||||
.filter-view-more-c { | |||||
margin-top: 6px; | |||||
.filter-view-more { | |||||
color: rgb(50, 145, 248); | |||||
font-size: 14px; | |||||
cursor: pointer; | |||||
i { | |||||
margin-right: 4px; | |||||
} | |||||
} | |||||
} | |||||
} | |||||
.filter-second { | |||||
.filter-second-hd { | |||||
margin: 14px 0 24px 0; | |||||
.filter-second-go-back { | |||||
color: rgb(50, 145, 248); | |||||
font-size: 14px; | |||||
cursor: pointer; | |||||
i { | |||||
margin-right: 4px; | |||||
} | |||||
} | |||||
} | |||||
.filter-title { | |||||
font-size: 18px; | |||||
color: rgb(16, 16, 16); | |||||
margin: 14px 0; | |||||
} | |||||
.filter-item-c { | |||||
display: flex; | |||||
flex-wrap: wrap; | |||||
.filter-item { | |||||
border-radius: 3px; | |||||
padding: 3px 10px; | |||||
margin-right: 10px; | |||||
margin-bottom: 10px; | |||||
cursor: pointer; | |||||
} | |||||
} | |||||
} | |||||
</style> |
@@ -0,0 +1,157 @@ | |||||
<template> | |||||
<div class="item"> | |||||
<div class="title-c"> | |||||
<div class="avatar-c"> | |||||
<img v-if="data.RelAvatarLink" class="avatar" :src="data.RelAvatarLink" /> | |||||
<img v-else class="avatar" :avatar="data.OwnerName" /> | |||||
</div> | |||||
<div class="title"> | |||||
<span>{{ data.Alias }}</span> | |||||
</div> | |||||
</div> | |||||
<div class="descr"> | |||||
{{ data.Description }} | |||||
</div> | |||||
<div class="topics"> | |||||
<a v-for="(item, index) in data.Topics" :key="index" class="topic" | |||||
:href="`/explore/repos?q=&topic=${item.topic}&sort=hot`">{{ item }}</a> | |||||
</div> | |||||
<div class="footer"> | |||||
<div class="contractor">鹏城实验室</div> | |||||
<div class="update-time"> | |||||
<span>{{ $t('repos.updated') }}</span> | |||||
<el-tooltip effect="dark" :content="dateFormat(data.UpdatedUnix)" placement="top-start"> | |||||
<span>{{ calcFromNow(data.UpdatedUnix) }}</span> | |||||
</el-tooltip> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</template> | |||||
<script> | |||||
import dayjs from 'dayjs'; | |||||
import { lang } from '~/langs'; | |||||
import { timeSinceUnix } from '~/utils'; | |||||
export default { | |||||
name: "PrjResultsItem", | |||||
props: { | |||||
data: { type: Object, default: () => ({}) }, | |||||
}, | |||||
components: {}, | |||||
data() { | |||||
return { | |||||
}; | |||||
}, | |||||
methods: { | |||||
calcFromNow(unix) { | |||||
return timeSinceUnix(unix, Date.now() / 1000); | |||||
}, | |||||
dateFormat(unix) { | |||||
return lang == 'zh-CN' ? dayjs(unix * 1000).format('YYYY年MM月DD日 HH时mm分ss秒') : | |||||
dayjs(unix * 1000).format('ddd, D MMM YYYY HH:mm:ss [CST]'); | |||||
} | |||||
}, | |||||
mounted() { }, | |||||
}; | |||||
</script> | |||||
<style scoped lang="less"> | |||||
.item { | |||||
border-color: rgb(232, 224, 236); | |||||
border-width: 1px; | |||||
border-style: solid; | |||||
box-shadow: rgba(168, 157, 226, 0.2) 0px 5px 10px 0px; | |||||
background: url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20version%3D%221.1%22%3E%3Cdefs%3E%3ClinearGradient%20id%3D%221%22%20x1%3D%220%22%20x2%3D%221%22%20y1%3D%220%22%20y2%3D%220%22%20gradientTransform%3D%22matrix(-0.01900000000000005%2C%200.997%2C%20-0.12862587255310284%2C%20-0.01900000000000005%2C%200.995%2C%200.014)%22%3E%3Cstop%20stop-color%3D%22%23f2edf5%22%20stop-opacity%3D%221%22%20offset%3D%220.01%22%3E%3C%2Fstop%3E%3Cstop%20stop-color%3D%22%23ffffff%22%20stop-opacity%3D%221%22%20offset%3D%220.31%22%3E%3C%2Fstop%3E%3C%2FlinearGradient%3E%3C%2Fdefs%3E%3Crect%20width%3D%22100%25%22%20height%3D%22100%25%22%20fill%3D%22url(%231)%22%3E%3C%2Frect%3E%3C%2Fsvg%3E"); | |||||
overflow: hidden; | |||||
padding: 15px; | |||||
} | |||||
.title-c { | |||||
display: flex; | |||||
align-items: center; | |||||
.avatar-c { | |||||
height: 28px; | |||||
width: 28px; | |||||
margin-right: 6px; | |||||
img { | |||||
border-radius: 100%; | |||||
height: 100%; | |||||
width: 100%; | |||||
} | |||||
} | |||||
.title { | |||||
flex: 1; | |||||
overflow: hidden; | |||||
text-overflow: ellipsis; | |||||
white-space: nowrap; | |||||
span { | |||||
color: rgb(16, 16, 16); | |||||
font-size: 16px; | |||||
font-weight: 400; | |||||
} | |||||
} | |||||
} | |||||
.descr { | |||||
height: 40px; | |||||
margin-top: 8px; | |||||
font-size: 12px; | |||||
font-weight: 300; | |||||
color: rgb(136, 136, 136); | |||||
text-overflow: ellipsis; | |||||
word-break: break-all; | |||||
display: -webkit-box; | |||||
-webkit-box-orient: vertical; | |||||
-webkit-line-clamp: 2; | |||||
max-height: 41px; | |||||
overflow: hidden; | |||||
} | |||||
.topics { | |||||
overflow: hidden; | |||||
text-overflow: ellipsis; | |||||
white-space: nowrap; | |||||
margin-top: 5px; | |||||
height: 20px; | |||||
.topic { | |||||
color: rgba(16, 16, 16, 0.8); | |||||
border-radius: 4px; | |||||
font-size: 12px; | |||||
background: rgba(232, 232, 232, 0.6); | |||||
padding: 2px 6px; | |||||
margin-right: 8px; | |||||
} | |||||
} | |||||
.footer { | |||||
margin-top: 12px; | |||||
display: flex; | |||||
align-items: center; | |||||
justify-content: space-between; | |||||
height: 20px; | |||||
.contractor { | |||||
font-size: 14px; | |||||
font-weight: 400; | |||||
color: rgba(0, 40, 192, 0.73); | |||||
overflow: hidden; | |||||
text-overflow: ellipsis; | |||||
white-space: nowrap; | |||||
} | |||||
.update-time { | |||||
text-align: right; | |||||
min-width: 140px; | |||||
font-size: 12px; | |||||
font-weight: 300; | |||||
color: rgb(136, 136, 136); | |||||
} | |||||
} | |||||
</style> |
@@ -0,0 +1,888 @@ | |||||
<template> | |||||
<div class="list-container"> | |||||
<div class="list-item-container" style="min-height:540px;" v-loading="loading"> | |||||
<div class="item-container" v-for="(item, index) in list" :key="item.ID"> | |||||
<PrjResultsItem :data="item"></PrjResultsItem> | |||||
</div> | |||||
<div v-show="(!list.length && !loading)" class="no-data">{{ $t('repos.noReposfound') }}</div> | |||||
</div> | |||||
<div class="center"> | |||||
<el-pagination ref="paginationRef" background @current-change="currentChange" @size-change="sizeChange" | |||||
:current-page.sync="iPage" :page-sizes="iPageSizes" :page-size.sync="iPageSize" | |||||
layout="total, sizes, prev, pager, next, jumper" :total="total"> | |||||
</el-pagination> | |||||
</div> | |||||
</div> | |||||
</template> | |||||
<script> | |||||
import PrjResultsItem from './PrjResultsItem.vue'; | |||||
import LetterAvatar from '~/utils/letteravatar'; | |||||
export default { | |||||
name: "PrjResultsList", | |||||
props: { | |||||
q: { type: String, default: '' }, | |||||
page: { type: Number, default: 1 }, | |||||
pageSize: { type: Number, default: 15 }, | |||||
pageSizes: { type: Array, default: () => [15, 30, 50] } | |||||
}, | |||||
components: { PrjResultsItem }, | |||||
data() { | |||||
return { | |||||
loading: false, | |||||
list: [ | |||||
{ | |||||
"ID": 4781, | |||||
"OwnerID": 679, | |||||
"OwnerName": "OpenI", | |||||
"LowerName": "msadapter", | |||||
"Name": "MSAdapter", | |||||
"Alias": "MSAdapter", | |||||
"NumWatches": 3, | |||||
"NumStars": 0, | |||||
"NumForks": 0, | |||||
"Description": "MindSpore对PyTorch接口的支持工具", | |||||
"Topics": null, | |||||
"AiTaskCnt": 0, | |||||
"ModelCnt": 0, | |||||
"DatasetCnt": 0, | |||||
"CreatedUnix": 1669691488, | |||||
"UpdatedUnix": 1670839285, | |||||
"PrimaryLanguage": null, | |||||
"RelAvatarLink": "", | |||||
"Contributors": [ | |||||
{ | |||||
"RelAvatarLink": "/user/avatar/wjtest1207/-1?18", | |||||
"UserName": "wjtest1207", | |||||
"Email": "wjtest1207@163.com", | |||||
"CommitCnt": 1 | |||||
} | |||||
], | |||||
"IsPrivate": false, | |||||
"IsFork": false, | |||||
"IsMirror": false, | |||||
"IsOwnerPrivate": false, | |||||
"IsArchived": false | |||||
}, | |||||
{ | |||||
"ID": 501, | |||||
"OwnerID": 224, | |||||
"OwnerName": "OpenIOSSG", | |||||
"LowerName": "promote", | |||||
"Name": "promote", | |||||
"Alias": "promote", | |||||
"NumWatches": 1, | |||||
"NumStars": 0, | |||||
"NumForks": 0, | |||||
"Description": "", | |||||
"Topics": null, | |||||
"AiTaskCnt": 0, | |||||
"ModelCnt": 0, | |||||
"DatasetCnt": 0, | |||||
"CreatedUnix": 1642470476, | |||||
"UpdatedUnix": 1670256276, | |||||
"PrimaryLanguage": { | |||||
"ID": 724, | |||||
"RepoID": 501, | |||||
"CommitID": "2fd3316bcf89250f80b0d1f6a05cb2c69fdb2845", | |||||
"IsPrimary": true, | |||||
"Language": "Markdown", | |||||
"Percentage": 100, | |||||
"Color": "#cccccc", | |||||
"CreatedUnix": 1642470477 | |||||
}, | |||||
"RelAvatarLink": "", | |||||
"Contributors": [], | |||||
"IsPrivate": false, | |||||
"IsFork": false, | |||||
"IsMirror": false, | |||||
"IsOwnerPrivate": false, | |||||
"IsArchived": false | |||||
}, | |||||
{ | |||||
"ID": 696, | |||||
"OwnerID": 679, | |||||
"OwnerName": "OpenI", | |||||
"LowerName": "octopus", | |||||
"Name": "octopus", | |||||
"Alias": "octopus", | |||||
"NumWatches": 3, | |||||
"NumStars": 1, | |||||
"NumForks": 0, | |||||
"Description": "面向多计算场景的一站式融合计算平台", | |||||
"Topics": [ | |||||
"openi", | |||||
"deep-learning", | |||||
"golang" | |||||
], | |||||
"AiTaskCnt": 0, | |||||
"ModelCnt": 0, | |||||
"DatasetCnt": 0, | |||||
"CreatedUnix": 1647933529, | |||||
"UpdatedUnix": 1670899396, | |||||
"PrimaryLanguage": { | |||||
"ID": 1018, | |||||
"RepoID": 696, | |||||
"CommitID": "70699543cc3bf19f70ee7b126b27b752b0577469", | |||||
"IsPrimary": true, | |||||
"Language": "CSS", | |||||
"Percentage": 36.5, | |||||
"Color": "#563d7c", | |||||
"CreatedUnix": 1647933538 | |||||
}, | |||||
"RelAvatarLink": "/repo-avatars/696-c9d9105eba8ad76589b65edff1588bc5", | |||||
"Contributors": [ | |||||
{ | |||||
"RelAvatarLink": "", | |||||
"UserName": "", | |||||
"Email": "2522636547@qq.com", | |||||
"CommitCnt": 253 | |||||
}, | |||||
{ | |||||
"RelAvatarLink": "", | |||||
"UserName": "", | |||||
"Email": "835952234@qq.com", | |||||
"CommitCnt": 203 | |||||
}, | |||||
{ | |||||
"RelAvatarLink": "", | |||||
"UserName": "", | |||||
"Email": "linfj@pcl.ac.cn", | |||||
"CommitCnt": 174 | |||||
}, | |||||
{ | |||||
"RelAvatarLink": "", | |||||
"UserName": "", | |||||
"Email": "hackmong@163.com", | |||||
"CommitCnt": 121 | |||||
}, | |||||
{ | |||||
"RelAvatarLink": "", | |||||
"UserName": "", | |||||
"Email": "liaowsh@pcl.ac.cn", | |||||
"CommitCnt": 114 | |||||
}, | |||||
{ | |||||
"RelAvatarLink": "/user/avatar/liwei_test/-1?25", | |||||
"UserName": "liwei_test", | |||||
"Email": "liw03@pcl.ac.cn", | |||||
"CommitCnt": 88 | |||||
} | |||||
], | |||||
"IsPrivate": false, | |||||
"IsFork": false, | |||||
"IsMirror": false, | |||||
"IsOwnerPrivate": false, | |||||
"IsArchived": false | |||||
}, | |||||
{ | |||||
"ID": 697, | |||||
"OwnerID": 679, | |||||
"OwnerName": "OpenI", | |||||
"LowerName": "paddle", | |||||
"Name": "Paddle", | |||||
"Alias": "Paddle", | |||||
"NumWatches": 3, | |||||
"NumStars": 0, | |||||
"NumForks": 0, | |||||
"Description": "PaddlePaddle (PArallel Distributed Deep LEarning) 是一个简单易用、高效灵活、可扩展的深度学习平台,最初由百度科学家和工程师共同开发,目的是将深度学习技术应用到百度的众多产品中。", | |||||
"Topics": [ | |||||
"ai开发工具", | |||||
"deep-learning" | |||||
], | |||||
"AiTaskCnt": 0, | |||||
"ModelCnt": 0, | |||||
"DatasetCnt": 0, | |||||
"CreatedUnix": 1647933857, | |||||
"UpdatedUnix": 1670838791, | |||||
"PrimaryLanguage": { | |||||
"ID": 1021, | |||||
"RepoID": 697, | |||||
"CommitID": "c46e661dfd4dca4ccb2d8bb83225d2dcb0bff52c", | |||||
"IsPrimary": true, | |||||
"Language": "Python", | |||||
"Percentage": 45.9, | |||||
"Color": "#3572A5", | |||||
"CreatedUnix": 1647933890 | |||||
}, | |||||
"RelAvatarLink": "/repo-avatars/697-c50e829c78c6c3168605586c750887e4", | |||||
"Contributors": [ | |||||
{ | |||||
"RelAvatarLink": "", | |||||
"UserName": "", | |||||
"Email": "yuyang18@baidu.com", | |||||
"CommitCnt": 2039 | |||||
}, | |||||
{ | |||||
"RelAvatarLink": "", | |||||
"UserName": "", | |||||
"Email": "luotao02@baidu.com", | |||||
"CommitCnt": 1101 | |||||
}, | |||||
{ | |||||
"RelAvatarLink": "", | |||||
"UserName": "", | |||||
"Email": "fengjiayi@baidu.com", | |||||
"CommitCnt": 864 | |||||
}, | |||||
{ | |||||
"RelAvatarLink": "", | |||||
"UserName": "", | |||||
"Email": "qiaolongfei@baidu.com", | |||||
"CommitCnt": 1456 | |||||
}, | |||||
{ | |||||
"RelAvatarLink": "", | |||||
"UserName": "", | |||||
"Email": "tangjian03@baidu.com", | |||||
"CommitCnt": 730 | |||||
}, | |||||
{ | |||||
"RelAvatarLink": "", | |||||
"UserName": "", | |||||
"Email": "panxin.grad@gmail.com", | |||||
"CommitCnt": 678 | |||||
} | |||||
], | |||||
"IsPrivate": false, | |||||
"IsFork": false, | |||||
"IsMirror": false, | |||||
"IsOwnerPrivate": false, | |||||
"IsArchived": false | |||||
}, | |||||
{ | |||||
"ID": 702, | |||||
"OwnerID": 679, | |||||
"OwnerName": "OpenI", | |||||
"LowerName": "tensorlayerx", | |||||
"Name": "TensorLayerX", | |||||
"Alias": "TensorLayerX", | |||||
"NumWatches": 3, | |||||
"NumStars": 0, | |||||
"NumForks": 0, | |||||
"Description": "TensorLayer3.0一款兼容多深度学习框架后端的深度学习库, 目前可以用TensorFlow、MindSpore、PaddlePaddle作为后端计算引擎。", | |||||
"Topics": [ | |||||
"openi-paper", | |||||
"pytorch", | |||||
"标签aaa", | |||||
"paddlepaddle", | |||||
"test-abcdefghijklmno测-试-123456", | |||||
"tensorflow", | |||||
"mindspore", | |||||
"高层次库", | |||||
"深度学习", | |||||
"支持多计算后端" | |||||
], | |||||
"AiTaskCnt": 0, | |||||
"ModelCnt": 0, | |||||
"DatasetCnt": 0, | |||||
"CreatedUnix": 1647935532, | |||||
"UpdatedUnix": 1671012469, | |||||
"PrimaryLanguage": { | |||||
"ID": 1039, | |||||
"RepoID": 702, | |||||
"CommitID": "6eafa9118008338521d3d085d70627b37ccba51d", | |||||
"IsPrimary": true, | |||||
"Language": "Python", | |||||
"Percentage": 99.6, | |||||
"Color": "#3572A5", | |||||
"CreatedUnix": 1647935549 | |||||
}, | |||||
"RelAvatarLink": "/repo-avatars/702-a18a6669062a1a24aea776744c003f34", | |||||
"Contributors": [ | |||||
{ | |||||
"RelAvatarLink": "", | |||||
"UserName": "", | |||||
"Email": "dhsig552@163.com", | |||||
"CommitCnt": 1598 | |||||
}, | |||||
{ | |||||
"RelAvatarLink": "", | |||||
"UserName": "", | |||||
"Email": "luo.mai.cs@gmail.com", | |||||
"CommitCnt": 203 | |||||
}, | |||||
{ | |||||
"RelAvatarLink": "", | |||||
"UserName": "", | |||||
"Email": "37874862+warshallrho@users.noreply.github.com", | |||||
"CommitCnt": 130 | |||||
}, | |||||
{ | |||||
"RelAvatarLink": "", | |||||
"UserName": "", | |||||
"Email": "jingqing.zhang15@imperial.ac.uk", | |||||
"CommitCnt": 129 | |||||
}, | |||||
{ | |||||
"RelAvatarLink": "", | |||||
"UserName": "", | |||||
"Email": "rundi_wu@pku.edu.cn", | |||||
"CommitCnt": 159 | |||||
}, | |||||
{ | |||||
"RelAvatarLink": "", | |||||
"UserName": "", | |||||
"Email": "lg4869@outlook.com", | |||||
"CommitCnt": 67 | |||||
} | |||||
], | |||||
"IsPrivate": false, | |||||
"IsFork": false, | |||||
"IsMirror": false, | |||||
"IsOwnerPrivate": false, | |||||
"IsArchived": false | |||||
}, | |||||
{ | |||||
"ID": 4780, | |||||
"OwnerID": 218, | |||||
"OwnerName": "PCL-Platform.Intelligence", | |||||
"LowerName": "pcl_pangu", | |||||
"Name": "pcl_pangu", | |||||
"Alias": "pcl_pangu", | |||||
"NumWatches": 1, | |||||
"NumStars": 0, | |||||
"NumForks": 0, | |||||
"Description": "鹏程·盘古SDK 上线!集成了鹏程·盘古alpha模型、增强版Evolution模型、多语言mPangu模型,欢迎测试和使用。希望鹏程·盘古模型的可持续学习与应用生态快速发展!", | |||||
"Topics": [ | |||||
"大模型" | |||||
], | |||||
"AiTaskCnt": 0, | |||||
"ModelCnt": 0, | |||||
"DatasetCnt": 0, | |||||
"CreatedUnix": 1669691367, | |||||
"UpdatedUnix": 1670921009, | |||||
"PrimaryLanguage": null, | |||||
"RelAvatarLink": "/repo-avatars/4780-5b45386c19f3e34b4749e6dde7dc3181", | |||||
"Contributors": [ | |||||
{ | |||||
"RelAvatarLink": "/user/avatar/wjtest1207/-1?40", | |||||
"UserName": "wjtest1207", | |||||
"Email": "wjtest1207@163.com", | |||||
"CommitCnt": 1 | |||||
} | |||||
], | |||||
"IsPrivate": false, | |||||
"IsFork": false, | |||||
"IsMirror": false, | |||||
"IsOwnerPrivate": false, | |||||
"IsArchived": false | |||||
}, | |||||
{ | |||||
"ID": 4405, | |||||
"OwnerID": 585, | |||||
"OwnerName": "arXiv_Computation_and_Language_2019", | |||||
"LowerName": "paddlenlp", | |||||
"Name": "PaddleNLP", | |||||
"Alias": "PaddleNLP", | |||||
"NumWatches": 1, | |||||
"NumStars": 0, | |||||
"NumForks": 0, | |||||
"Description": "", | |||||
"Topics": null, | |||||
"AiTaskCnt": 0, | |||||
"ModelCnt": 0, | |||||
"DatasetCnt": 0, | |||||
"CreatedUnix": 1667453897, | |||||
"UpdatedUnix": 1670256902, | |||||
"PrimaryLanguage": null, | |||||
"RelAvatarLink": "", | |||||
"Contributors": [], | |||||
"IsPrivate": false, | |||||
"IsFork": false, | |||||
"IsMirror": false, | |||||
"IsOwnerPrivate": false, | |||||
"IsArchived": false | |||||
}, | |||||
{ | |||||
"ID": 4127, | |||||
"OwnerID": 507, | |||||
"OwnerName": "international_conference_on_machine_learning", | |||||
"LowerName": "fairseq", | |||||
"Name": "fairseq", | |||||
"Alias": "fairseq", | |||||
"NumWatches": 1, | |||||
"NumStars": 0, | |||||
"NumForks": 0, | |||||
"Description": "", | |||||
"Topics": null, | |||||
"AiTaskCnt": 0, | |||||
"ModelCnt": 0, | |||||
"DatasetCnt": 0, | |||||
"CreatedUnix": 1667442805, | |||||
"UpdatedUnix": 1670256623, | |||||
"PrimaryLanguage": { | |||||
"ID": 6206, | |||||
"RepoID": 4127, | |||||
"CommitID": "b8ac3fa6cc95f9dc97085232d4faf125e5bcd2e7", | |||||
"IsPrimary": true, | |||||
"Language": "Python", | |||||
"Percentage": 97.8, | |||||
"Color": "#3572A5", | |||||
"CreatedUnix": 1667443078 | |||||
}, | |||||
"RelAvatarLink": "", | |||||
"Contributors": [], | |||||
"IsPrivate": false, | |||||
"IsFork": false, | |||||
"IsMirror": true, | |||||
"IsOwnerPrivate": false, | |||||
"IsArchived": false | |||||
}, | |||||
{ | |||||
"ID": 2176, | |||||
"OwnerID": 536, | |||||
"OwnerName": "openi_paper", | |||||
"LowerName": "paddledetection", | |||||
"Name": "PaddleDetection", | |||||
"Alias": "PaddleDetection", | |||||
"NumWatches": 1, | |||||
"NumStars": 0, | |||||
"NumForks": 0, | |||||
"Description": "", | |||||
"Topics": null, | |||||
"AiTaskCnt": 0, | |||||
"ModelCnt": 0, | |||||
"DatasetCnt": 0, | |||||
"CreatedUnix": 1666872337, | |||||
"UpdatedUnix": 1670257237, | |||||
"PrimaryLanguage": null, | |||||
"RelAvatarLink": "", | |||||
"Contributors": [], | |||||
"IsPrivate": false, | |||||
"IsFork": false, | |||||
"IsMirror": false, | |||||
"IsOwnerPrivate": false, | |||||
"IsArchived": false | |||||
}, | |||||
{ | |||||
"ID": 4619, | |||||
"OwnerID": 536, | |||||
"OwnerName": "openi_paper", | |||||
"LowerName": "fairseq", | |||||
"Name": "fairseq", | |||||
"Alias": "fairseq", | |||||
"NumWatches": 1, | |||||
"NumStars": 0, | |||||
"NumForks": 0, | |||||
"Description": "", | |||||
"Topics": null, | |||||
"AiTaskCnt": 0, | |||||
"ModelCnt": 0, | |||||
"DatasetCnt": 0, | |||||
"CreatedUnix": 1667461670, | |||||
"UpdatedUnix": 1670256376, | |||||
"PrimaryLanguage": null, | |||||
"RelAvatarLink": "", | |||||
"Contributors": [], | |||||
"IsPrivate": false, | |||||
"IsFork": false, | |||||
"IsMirror": false, | |||||
"IsOwnerPrivate": false, | |||||
"IsArchived": false | |||||
}, | |||||
{ | |||||
"ID": 598, | |||||
"OwnerID": 251, | |||||
"OwnerName": "PCL_AutoML", | |||||
"LowerName": "xbbo", | |||||
"Name": "XBBO", | |||||
"Alias": "XBBO", | |||||
"NumWatches": 1, | |||||
"NumStars": 0, | |||||
"NumForks": 0, | |||||
"Description": "超参搜索(黑盒优化)框架", | |||||
"Topics": [ | |||||
"openi-paper", | |||||
"自动机器学习", | |||||
"优化", | |||||
"超参搜索" | |||||
], | |||||
"AiTaskCnt": 0, | |||||
"ModelCnt": 0, | |||||
"DatasetCnt": 0, | |||||
"CreatedUnix": 1645065667, | |||||
"UpdatedUnix": 1671012526, | |||||
"PrimaryLanguage": { | |||||
"ID": 842, | |||||
"RepoID": 598, | |||||
"CommitID": "bb089a69ce3541246a948c08bd37e31ab23e439c", | |||||
"IsPrimary": true, | |||||
"Language": "Python", | |||||
"Percentage": 98.7, | |||||
"Color": "#3572A5", | |||||
"CreatedUnix": 1645065672 | |||||
}, | |||||
"RelAvatarLink": "/repo-avatars/598-5c870fdbde9a0457989616263b77c63c", | |||||
"Contributors": [ | |||||
{ | |||||
"RelAvatarLink": "", | |||||
"UserName": "", | |||||
"Email": "isleizhang@outlook.com", | |||||
"CommitCnt": 103 | |||||
}, | |||||
{ | |||||
"RelAvatarLink": "", | |||||
"UserName": "", | |||||
"Email": "mathcoder.zl@gmail.com", | |||||
"CommitCnt": 10 | |||||
} | |||||
], | |||||
"IsPrivate": false, | |||||
"IsFork": false, | |||||
"IsMirror": false, | |||||
"IsOwnerPrivate": false, | |||||
"IsArchived": false | |||||
}, | |||||
{ | |||||
"ID": 999, | |||||
"OwnerID": 431, | |||||
"OwnerName": "GAMMALab", | |||||
"LowerName": "openhgnn", | |||||
"Name": "OpenHGNN", | |||||
"Alias": "OpenHGNN", | |||||
"NumWatches": 1, | |||||
"NumStars": 0, | |||||
"NumForks": 2, | |||||
"Description": "OpenHGNN是由北邮GAMMA Lab开发的基于PyTorch和DGL的开源异质图神经网络工具包。", | |||||
"Topics": [ | |||||
"openi-paper", | |||||
"pytorch", | |||||
"dgl", | |||||
"heterogeneous", | |||||
"异质图", | |||||
"gnn", | |||||
"图神经网络" | |||||
], | |||||
"AiTaskCnt": 0, | |||||
"ModelCnt": 0, | |||||
"DatasetCnt": 0, | |||||
"CreatedUnix": 1659322878, | |||||
"UpdatedUnix": 1671012520, | |||||
"PrimaryLanguage": null, | |||||
"RelAvatarLink": "", | |||||
"Contributors": [ | |||||
{ | |||||
"RelAvatarLink": "/user/avatar/wjtest001/-1?56", | |||||
"UserName": "wjtest001", | |||||
"Email": "towangjing@yeah.net", | |||||
"CommitCnt": 1 | |||||
} | |||||
], | |||||
"IsPrivate": false, | |||||
"IsFork": false, | |||||
"IsMirror": false, | |||||
"IsOwnerPrivate": false, | |||||
"IsArchived": false | |||||
}, | |||||
{ | |||||
"ID": 703, | |||||
"OwnerID": 679, | |||||
"OwnerName": "OpenI", | |||||
"LowerName": "apulis-ai-platform", | |||||
"Name": "Apulis-AI-Platform", | |||||
"Alias": "Apulis-AI-Platform", | |||||
"NumWatches": 3, | |||||
"NumStars": 2, | |||||
"NumForks": 0, | |||||
"Description": "依瞳人工智能平台旨在为不同行业的用户提供基于深度学习的端到端解决方案,使用户可以用最快的速度、最少的时间开始高性能的深度学习工作,从而大幅节省研究成本、提高研发效率,同时可为中小企业解决私有云难建成、成本高等问题。 平台融合了Tensorflow、PyTorch、MindSpore等开源深度学习框架,提供了模型训练、超参调优、集群状态监控等开发环境,方便AI开发者快速搭建人工智能开发环境,开展AI开发应用。在监控模块基础上搭建预警模块,自动将平台异常通知管理员,提升平台的预警效率及安全性能。", | |||||
"Topics": [ | |||||
"ai开发工具", | |||||
"openi-paper" | |||||
], | |||||
"AiTaskCnt": 0, | |||||
"ModelCnt": 0, | |||||
"DatasetCnt": 0, | |||||
"CreatedUnix": 1647935724, | |||||
"UpdatedUnix": 1671012418, | |||||
"PrimaryLanguage": { | |||||
"ID": 1054, | |||||
"RepoID": 703, | |||||
"CommitID": "18a76ed026dfa5a1e71a74f3518e9ba6f830d77f", | |||||
"IsPrimary": true, | |||||
"Language": "JavaScript", | |||||
"Percentage": 57.4, | |||||
"Color": "#f1e05a", | |||||
"CreatedUnix": 1647935738 | |||||
}, | |||||
"RelAvatarLink": "", | |||||
"Contributors": [ | |||||
{ | |||||
"RelAvatarLink": "", | |||||
"UserName": "", | |||||
"Email": "869071540@qq.com", | |||||
"CommitCnt": 1103 | |||||
}, | |||||
{ | |||||
"RelAvatarLink": "", | |||||
"UserName": "", | |||||
"Email": "jinlmsft@hotmail.com", | |||||
"CommitCnt": 745 | |||||
}, | |||||
{ | |||||
"RelAvatarLink": "", | |||||
"UserName": "", | |||||
"Email": "hongzhi.li@microsoft.com", | |||||
"CommitCnt": 504 | |||||
}, | |||||
{ | |||||
"RelAvatarLink": "", | |||||
"UserName": "", | |||||
"Email": "xjhan1995@gmail.com", | |||||
"CommitCnt": 399 | |||||
}, | |||||
{ | |||||
"RelAvatarLink": "", | |||||
"UserName": "", | |||||
"Email": "hongzhili@users.noreply.github.com", | |||||
"CommitCnt": 377 | |||||
}, | |||||
{ | |||||
"RelAvatarLink": "", | |||||
"UserName": "", | |||||
"Email": "xudifsd@gmail.com", | |||||
"CommitCnt": 251 | |||||
} | |||||
], | |||||
"IsPrivate": false, | |||||
"IsFork": false, | |||||
"IsMirror": false, | |||||
"IsOwnerPrivate": false, | |||||
"IsArchived": false | |||||
}, | |||||
{ | |||||
"ID": 695, | |||||
"OwnerID": 679, | |||||
"OwnerName": "OpenI", | |||||
"LowerName": "cubeai", | |||||
"Name": "cubeai", | |||||
"Alias": "cubeai", | |||||
"NumWatches": 3, | |||||
"NumStars": 3, | |||||
"NumForks": 0, | |||||
"Description": "CubeAI智立方是中国联通研究院自主研发的集AI模型自动化服务封装、发布、共享、部署和能力开放等功能于一体的开源AI算能服务平台,其核心作用在于打通AI模型开发至实际生产应用之间的壁垒,加速AI创新和应用进程,促进AI应用从设计、开发直到部署、运营整个生命周期的自动化快速迭代和演进。", | |||||
"Topics": [ | |||||
"ai开发工具", | |||||
"openi", | |||||
"ai模型服务化", | |||||
"ai模型共享", | |||||
"ai模型部署", | |||||
"ai能力开放" | |||||
], | |||||
"AiTaskCnt": 0, | |||||
"ModelCnt": 0, | |||||
"DatasetCnt": 0, | |||||
"CreatedUnix": 1647933184, | |||||
"UpdatedUnix": 1670838880, | |||||
"PrimaryLanguage": { | |||||
"ID": 1006, | |||||
"RepoID": 695, | |||||
"CommitID": "09e1a0146612cff32fb01881707c831414494599", | |||||
"IsPrimary": true, | |||||
"Language": "Shell", | |||||
"Percentage": 96.8, | |||||
"Color": "#89e051", | |||||
"CreatedUnix": 1647933187 | |||||
}, | |||||
"RelAvatarLink": "/repo-avatars/695-5d57aff010bceee7d1634ea64ca6a298", | |||||
"Contributors": [ | |||||
{ | |||||
"RelAvatarLink": "", | |||||
"UserName": "", | |||||
"Email": "huolongshe@126.com", | |||||
"CommitCnt": 15 | |||||
} | |||||
], | |||||
"IsPrivate": false, | |||||
"IsFork": false, | |||||
"IsMirror": false, | |||||
"IsOwnerPrivate": false, | |||||
"IsArchived": false | |||||
}, | |||||
{ | |||||
"ID": 595, | |||||
"OwnerID": 251, | |||||
"OwnerName": "PCL_AutoML", | |||||
"LowerName": "xnas", | |||||
"Name": "XNAS", | |||||
"Alias": "XNAS", | |||||
"NumWatches": 1, | |||||
"NumStars": 0, | |||||
"NumForks": 0, | |||||
"Description": "神经网络结构搜索框架", | |||||
"Topics": [ | |||||
"openi-paper", | |||||
"自动机器学习", | |||||
"automl", | |||||
"神经网络结构搜索" | |||||
], | |||||
"AiTaskCnt": 0, | |||||
"ModelCnt": 0, | |||||
"DatasetCnt": 0, | |||||
"CreatedUnix": 1645065509, | |||||
"UpdatedUnix": 1671012496, | |||||
"PrimaryLanguage": { | |||||
"ID": 838, | |||||
"RepoID": 595, | |||||
"CommitID": "2c54ceb09b255cbcabd67f3c39fc777c4b2403f4", | |||||
"IsPrimary": true, | |||||
"Language": "Python", | |||||
"Percentage": 100, | |||||
"Color": "#3572A5", | |||||
"CreatedUnix": 1645065513 | |||||
}, | |||||
"RelAvatarLink": "/repo-avatars/595-4284a9fbc95ba42b7753910d8fcd1828", | |||||
"Contributors": [ | |||||
{ | |||||
"RelAvatarLink": "", | |||||
"UserName": "", | |||||
"Email": "zhengxiawu@126.com", | |||||
"CommitCnt": 262 | |||||
}, | |||||
{ | |||||
"RelAvatarLink": "", | |||||
"UserName": "", | |||||
"Email": "sdut_snow@163.com", | |||||
"CommitCnt": 66 | |||||
}, | |||||
{ | |||||
"RelAvatarLink": "", | |||||
"UserName": "", | |||||
"Email": "1004463561@qq.com", | |||||
"CommitCnt": 31 | |||||
}, | |||||
{ | |||||
"RelAvatarLink": "", | |||||
"UserName": "", | |||||
"Email": "thrase@163.com", | |||||
"CommitCnt": 23 | |||||
}, | |||||
{ | |||||
"RelAvatarLink": "", | |||||
"UserName": "", | |||||
"Email": "shaokunzhang529@gmail.com", | |||||
"CommitCnt": 24 | |||||
}, | |||||
{ | |||||
"RelAvatarLink": "", | |||||
"UserName": "", | |||||
"Email": "51071696+WOODchen7@users.noreply.github.com", | |||||
"CommitCnt": 7 | |||||
} | |||||
], | |||||
"IsPrivate": false, | |||||
"IsFork": false, | |||||
"IsMirror": false, | |||||
"IsOwnerPrivate": false, | |||||
"IsArchived": false | |||||
} | |||||
], | |||||
iPageSizes: [15, 30, 50], | |||||
iPageSize: 15, | |||||
iPage: 1, | |||||
total: 0, | |||||
}; | |||||
}, | |||||
methods: { | |||||
getListData() { | |||||
return; | |||||
this.loading = true; | |||||
getReposListData({ | |||||
q: this.q || '', | |||||
topic: this.topic || '', | |||||
sort: this.sort || 'mostpopular', | |||||
pageSize: this.iPageSize || 15, | |||||
page: this.iPage || 1, | |||||
}).then(res => { | |||||
res = res.data; | |||||
this.loading = false; | |||||
if (res.Code == 0) { | |||||
const list = res.Data.Repos || []; | |||||
this.list = list.map((item) => { | |||||
item.Contributors = (item.Contributors || []).map((_item) => { | |||||
return { | |||||
..._item, | |||||
bgColor: this.randomColor(_item.Email[0].toLocaleUpperCase()), | |||||
} | |||||
}); | |||||
const contributors = item.Contributors || []; | |||||
return { | |||||
...item, | |||||
NameShow: this.handlerSearchStr(item.Alias, this.q), | |||||
DescriptionShow: this.handlerSearchStr(item.Description, this.q), | |||||
TopicsShow: (item.Topics || []).map((_item) => { | |||||
return { | |||||
topic: _item, | |||||
topicShow: this.handlerSearchStr(_item, this.q) | |||||
} | |||||
}), | |||||
} | |||||
}); | |||||
this.total = res.Data.Total; | |||||
this.iPage = this.iPage; | |||||
this.iPageSize = this.iPageSize; | |||||
this.$nextTick(() => { | |||||
LetterAvatar.transform(); | |||||
}); | |||||
} else { | |||||
this.list = []; | |||||
this.total = 0; | |||||
this.iPage = this.iPage; | |||||
this.iPageSize = this.iPageSize; | |||||
} | |||||
}).catch(err => { | |||||
console.log(err); | |||||
this.loading = false; | |||||
this.list = []; | |||||
this.total = 0; | |||||
this.iPage = this.iPage; | |||||
this.iPageSize = this.iPageSize; | |||||
}); | |||||
}, | |||||
search() { | |||||
this.getListData(); | |||||
}, | |||||
currentChange(page) { | |||||
this.iPage = page; | |||||
this.$emit('current-change', { | |||||
page: this.iPage, | |||||
pageSize: this.iPageSize, | |||||
}); | |||||
}, | |||||
sizeChange(pageSize) { | |||||
this.iPageSize = pageSize; | |||||
this.$emit('size-change', { | |||||
page: this.iPage, | |||||
pageSize: this.iPageSize, | |||||
}); | |||||
}, | |||||
}, | |||||
mounted() { }, | |||||
}; | |||||
</script> | |||||
<style scoped lang="less"> | |||||
.list-container { | |||||
.list-item-container { | |||||
display: flex; | |||||
flex-wrap: wrap; | |||||
.item-container { | |||||
width: 50%; | |||||
padding: 12px; | |||||
} | |||||
} | |||||
} | |||||
.center { | |||||
text-align: center; | |||||
} | |||||
.no-data { | |||||
height: 60px; | |||||
display: flex; | |||||
justify-content: center; | |||||
align-items: center; | |||||
} | |||||
</style> |
@@ -0,0 +1,243 @@ | |||||
<template> | |||||
<div class="item"> | |||||
<div class="header"> | |||||
<div class="header-l"> | |||||
<div class="title">小样本条件下的自适应机器学习理论与模型研究</div> | |||||
<div class="prj-type">应用示范研究</div> | |||||
</div> | |||||
<div class="header-r"> | |||||
<a href=""> | |||||
<span>更多成果</span> | |||||
<i class="el-icon-arrow-right"></i> | |||||
</a> | |||||
</div> | |||||
</div> | |||||
<div class="content"> | |||||
<div class="item-l-c"> | |||||
<div class="row"> | |||||
<span class="tit">负责单位:</span> | |||||
<span class="val">鹏城实验室</span> | |||||
</div> | |||||
<div class="row"> | |||||
<span class="tit">参与单位:</span> | |||||
<span class="val">大连理工大学、北京理工大学、北京理工大学、北京理工大学、北京理工大学、北京理工大学</span> | |||||
</div> | |||||
<div class="row"> | |||||
<span class="tit">申报年份:</span> | |||||
<span class="val">2018</span> | |||||
</div> | |||||
<div class="row"> | |||||
<span class="tit">执行周期:</span> | |||||
<span class="val">2019 - 2023</span> | |||||
</div> | |||||
<div class="row"> | |||||
<span class="tit">项目成果数:</span> | |||||
<span class="val">10</span> | |||||
</div> | |||||
</div> | |||||
<div class="item-r-c"> | |||||
<a class="repo-item-c" href="javascript:;" v-for="(item, index) in [1, 2]"> | |||||
<div class="repo-item"> | |||||
<div class="repo-hd"> | |||||
<div class="repo-avatar"> | |||||
<img v-if="data.RelAvatarLink" class="avatar" :src="data.RelAvatarLink" /> | |||||
<img v-else class="avatar" :avatar="data.OwnerName" /> | |||||
</div> | |||||
<div class="repo-tit">面向服务的群智化生态化软件开发支撑平台(aiforge)</div> | |||||
</div> | |||||
<div class="repo-content"> | |||||
<div class="repo-descr"> | |||||
本项目是群体化方法与技术的开源实现案例,在基于Gitea的基础上,进一步支持社交化的协同开发、协同学习、协同研究等群体创新实践服务,特别是针对新一代人工智能技术特点,重点支持项目管理、git代码管理、大数据集存储管理与智能计算平台接入。 | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</a> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</template> | |||||
<script> | |||||
import dayjs from 'dayjs'; | |||||
import { lang } from '~/langs'; | |||||
import { timeSinceUnix } from '~/utils'; | |||||
export default { | |||||
name: "SciAndTechPrjItem", | |||||
props: { | |||||
data: { type: Object, default: () => ({}) }, | |||||
}, | |||||
components: {}, | |||||
data() { | |||||
return { | |||||
}; | |||||
}, | |||||
methods: { | |||||
calcFromNow(unix) { | |||||
return timeSinceUnix(unix, Date.now() / 1000); | |||||
}, | |||||
dateFormat(unix) { | |||||
return lang == 'zh-CN' ? dayjs(unix * 1000).format('YYYY年MM月DD日 HH时mm分ss秒') : | |||||
dayjs(unix * 1000).format('ddd, D MMM YYYY HH:mm:ss [CST]'); | |||||
} | |||||
}, | |||||
mounted() { }, | |||||
}; | |||||
</script> | |||||
<style scoped lang="less"> | |||||
.item { | |||||
border-color: rgb(232, 224, 236); | |||||
border-width: 1px; | |||||
border-style: solid; | |||||
box-shadow: rgba(168, 157, 226, 0.2) 0px 5px 10px 0px; | |||||
background: url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20version%3D%221.1%22%3E%3Cdefs%3E%3ClinearGradient%20id%3D%221%22%20x1%3D%220%22%20x2%3D%221%22%20y1%3D%220%22%20y2%3D%220%22%20gradientTransform%3D%22matrix(-0.01900000000000005%2C%200.997%2C%20-0.12862587255310284%2C%20-0.01900000000000005%2C%200.995%2C%200.014)%22%3E%3Cstop%20stop-color%3D%22%23f2edf5%22%20stop-opacity%3D%221%22%20offset%3D%220.01%22%3E%3C%2Fstop%3E%3Cstop%20stop-color%3D%22%23ffffff%22%20stop-opacity%3D%221%22%20offset%3D%220.31%22%3E%3C%2Fstop%3E%3C%2FlinearGradient%3E%3C%2Fdefs%3E%3Crect%20width%3D%22100%25%22%20height%3D%22100%25%22%20fill%3D%22url(%231)%22%3E%3C%2Frect%3E%3C%2Fsvg%3E"); | |||||
overflow: hidden; | |||||
padding: 15px; | |||||
.header { | |||||
display: flex; | |||||
align-items: center; | |||||
justify-content: space-between; | |||||
.header-l { | |||||
display: flex; | |||||
align-items: center; | |||||
.title { | |||||
color: rgb(16, 16, 16); | |||||
font-size: 18px; | |||||
font-weight: bold; | |||||
overflow: hidden; | |||||
text-overflow: ellipsis; | |||||
white-space: nowrap; | |||||
max-width: 800px; | |||||
} | |||||
.prj-type { | |||||
margin-left: 14px; | |||||
font-size: 12px; | |||||
font-weight: 400; | |||||
color: rgb(100, 59, 159); | |||||
background: rgb(237, 234, 251); | |||||
padding: 2px 5px; | |||||
border-radius: 4px; | |||||
} | |||||
} | |||||
.header-r { | |||||
display: flex; | |||||
align-items: baseline; | |||||
text-align: right; | |||||
color: rgb(50, 145, 248); | |||||
font-size: 12px; | |||||
width: 80px; | |||||
justify-content: flex-end; | |||||
i { | |||||
margin-left: 1px; | |||||
} | |||||
} | |||||
} | |||||
.content { | |||||
display: flex; | |||||
margin-top: 10px; | |||||
.item-l-c { | |||||
flex: 1; | |||||
.row { | |||||
display: flex; | |||||
font-size: 14px; | |||||
color: rgb(16, 16, 16); | |||||
margin: 8px 0; | |||||
font-weight: 400; | |||||
.tit { | |||||
color: rgba(136, 136, 136, 1); | |||||
} | |||||
.val { | |||||
flex: 1; | |||||
width: 0; | |||||
overflow: hidden; | |||||
text-overflow: ellipsis; | |||||
white-space: nowrap; | |||||
} | |||||
&:last-child { | |||||
margin-bottom: 0; | |||||
} | |||||
} | |||||
} | |||||
.item-r-c { | |||||
flex: 2; | |||||
margin-left: 10px; | |||||
display: flex; | |||||
.repo-item-c { | |||||
display: block; | |||||
flex: 1; | |||||
margin: 10px; | |||||
padding: 20px; | |||||
border-color: rgba(157, 197, 226, 0.4); | |||||
border-width: 1px; | |||||
border-style: solid; | |||||
border-radius: 5px; | |||||
box-shadow: rgba(157, 197, 226, 0.2) 0px 5px 10px 0px; | |||||
background: rgb(255, 255, 255); | |||||
width: 0; | |||||
.repo-item { | |||||
.repo-hd { | |||||
display: flex; | |||||
align-items: center; | |||||
.repo-avatar { | |||||
width: 28px; | |||||
height: 28px; | |||||
img { | |||||
width: 100%; | |||||
height: 100%; | |||||
border-radius: 100%; | |||||
} | |||||
} | |||||
.repo-tit { | |||||
flex: 1; | |||||
margin-left: 8px; | |||||
width: 0; | |||||
font-size: 14px; | |||||
color: rgb(50, 145, 248); | |||||
overflow: hidden; | |||||
text-overflow: ellipsis; | |||||
white-space: nowrap; | |||||
} | |||||
} | |||||
.repo-content { | |||||
margin-top: 10px; | |||||
.repo-descr { | |||||
width: 100%; | |||||
font-size: 12px; | |||||
color: rgb(136, 136, 136); | |||||
text-overflow: ellipsis; | |||||
word-break: break-all; | |||||
display: -webkit-box; | |||||
-webkit-box-orient: vertical; | |||||
-webkit-line-clamp: 2; | |||||
max-height: 41px; | |||||
overflow: hidden; | |||||
} | |||||
} | |||||
} | |||||
} | |||||
} | |||||
} | |||||
} | |||||
</style> |
@@ -0,0 +1,885 @@ | |||||
<template> | |||||
<div class="list-container"> | |||||
<div class="list-item-container" style="min-height:540px;" v-loading="loading"> | |||||
<div class="item-container" v-for="(item, index) in list" :key="item.ID"> | |||||
<SciAndTechPrjItem :data="item"></SciAndTechPrjItem> | |||||
</div> | |||||
<div v-show="(!list.length && !loading)" class="no-data">{{ $t('repos.noReposfound') }}</div> | |||||
</div> | |||||
<div class="center"> | |||||
<el-pagination ref="paginationRef" background @current-change="currentChange" @size-change="sizeChange" | |||||
:current-page.sync="iPage" :page-sizes="iPageSizes" :page-size.sync="iPageSize" | |||||
layout="total, sizes, prev, pager, next, jumper" :total="total"> | |||||
</el-pagination> | |||||
</div> | |||||
</div> | |||||
</template> | |||||
<script> | |||||
import SciAndTechPrjItem from './SciAndTechPrjItem.vue'; | |||||
import LetterAvatar from '~/utils/letteravatar'; | |||||
export default { | |||||
name: "SciAndTechPrjList", | |||||
props: { | |||||
q: { type: String, default: '' }, | |||||
page: { type: Number, default: 1 }, | |||||
pageSize: { type: Number, default: 15 }, | |||||
pageSizes: { type: Array, default: () => [15, 30, 50] } | |||||
}, | |||||
components: { SciAndTechPrjItem }, | |||||
data() { | |||||
return { | |||||
loading: false, | |||||
list: [ | |||||
{ | |||||
"ID": 4781, | |||||
"OwnerID": 679, | |||||
"OwnerName": "OpenI", | |||||
"LowerName": "msadapter", | |||||
"Name": "MSAdapter", | |||||
"Alias": "MSAdapter", | |||||
"NumWatches": 3, | |||||
"NumStars": 0, | |||||
"NumForks": 0, | |||||
"Description": "MindSpore对PyTorch接口的支持工具", | |||||
"Topics": null, | |||||
"AiTaskCnt": 0, | |||||
"ModelCnt": 0, | |||||
"DatasetCnt": 0, | |||||
"CreatedUnix": 1669691488, | |||||
"UpdatedUnix": 1670839285, | |||||
"PrimaryLanguage": null, | |||||
"RelAvatarLink": "", | |||||
"Contributors": [ | |||||
{ | |||||
"RelAvatarLink": "/user/avatar/wjtest1207/-1?18", | |||||
"UserName": "wjtest1207", | |||||
"Email": "wjtest1207@163.com", | |||||
"CommitCnt": 1 | |||||
} | |||||
], | |||||
"IsPrivate": false, | |||||
"IsFork": false, | |||||
"IsMirror": false, | |||||
"IsOwnerPrivate": false, | |||||
"IsArchived": false | |||||
}, | |||||
{ | |||||
"ID": 501, | |||||
"OwnerID": 224, | |||||
"OwnerName": "OpenIOSSG", | |||||
"LowerName": "promote", | |||||
"Name": "promote", | |||||
"Alias": "promote", | |||||
"NumWatches": 1, | |||||
"NumStars": 0, | |||||
"NumForks": 0, | |||||
"Description": "", | |||||
"Topics": null, | |||||
"AiTaskCnt": 0, | |||||
"ModelCnt": 0, | |||||
"DatasetCnt": 0, | |||||
"CreatedUnix": 1642470476, | |||||
"UpdatedUnix": 1670256276, | |||||
"PrimaryLanguage": { | |||||
"ID": 724, | |||||
"RepoID": 501, | |||||
"CommitID": "2fd3316bcf89250f80b0d1f6a05cb2c69fdb2845", | |||||
"IsPrimary": true, | |||||
"Language": "Markdown", | |||||
"Percentage": 100, | |||||
"Color": "#cccccc", | |||||
"CreatedUnix": 1642470477 | |||||
}, | |||||
"RelAvatarLink": "", | |||||
"Contributors": [], | |||||
"IsPrivate": false, | |||||
"IsFork": false, | |||||
"IsMirror": false, | |||||
"IsOwnerPrivate": false, | |||||
"IsArchived": false | |||||
}, | |||||
{ | |||||
"ID": 696, | |||||
"OwnerID": 679, | |||||
"OwnerName": "OpenI", | |||||
"LowerName": "octopus", | |||||
"Name": "octopus", | |||||
"Alias": "octopus", | |||||
"NumWatches": 3, | |||||
"NumStars": 1, | |||||
"NumForks": 0, | |||||
"Description": "面向多计算场景的一站式融合计算平台", | |||||
"Topics": [ | |||||
"openi", | |||||
"deep-learning", | |||||
"golang" | |||||
], | |||||
"AiTaskCnt": 0, | |||||
"ModelCnt": 0, | |||||
"DatasetCnt": 0, | |||||
"CreatedUnix": 1647933529, | |||||
"UpdatedUnix": 1670899396, | |||||
"PrimaryLanguage": { | |||||
"ID": 1018, | |||||
"RepoID": 696, | |||||
"CommitID": "70699543cc3bf19f70ee7b126b27b752b0577469", | |||||
"IsPrimary": true, | |||||
"Language": "CSS", | |||||
"Percentage": 36.5, | |||||
"Color": "#563d7c", | |||||
"CreatedUnix": 1647933538 | |||||
}, | |||||
"RelAvatarLink": "/repo-avatars/696-c9d9105eba8ad76589b65edff1588bc5", | |||||
"Contributors": [ | |||||
{ | |||||
"RelAvatarLink": "", | |||||
"UserName": "", | |||||
"Email": "2522636547@qq.com", | |||||
"CommitCnt": 253 | |||||
}, | |||||
{ | |||||
"RelAvatarLink": "", | |||||
"UserName": "", | |||||
"Email": "835952234@qq.com", | |||||
"CommitCnt": 203 | |||||
}, | |||||
{ | |||||
"RelAvatarLink": "", | |||||
"UserName": "", | |||||
"Email": "linfj@pcl.ac.cn", | |||||
"CommitCnt": 174 | |||||
}, | |||||
{ | |||||
"RelAvatarLink": "", | |||||
"UserName": "", | |||||
"Email": "hackmong@163.com", | |||||
"CommitCnt": 121 | |||||
}, | |||||
{ | |||||
"RelAvatarLink": "", | |||||
"UserName": "", | |||||
"Email": "liaowsh@pcl.ac.cn", | |||||
"CommitCnt": 114 | |||||
}, | |||||
{ | |||||
"RelAvatarLink": "/user/avatar/liwei_test/-1?25", | |||||
"UserName": "liwei_test", | |||||
"Email": "liw03@pcl.ac.cn", | |||||
"CommitCnt": 88 | |||||
} | |||||
], | |||||
"IsPrivate": false, | |||||
"IsFork": false, | |||||
"IsMirror": false, | |||||
"IsOwnerPrivate": false, | |||||
"IsArchived": false | |||||
}, | |||||
{ | |||||
"ID": 697, | |||||
"OwnerID": 679, | |||||
"OwnerName": "OpenI", | |||||
"LowerName": "paddle", | |||||
"Name": "Paddle", | |||||
"Alias": "Paddle", | |||||
"NumWatches": 3, | |||||
"NumStars": 0, | |||||
"NumForks": 0, | |||||
"Description": "PaddlePaddle (PArallel Distributed Deep LEarning) 是一个简单易用、高效灵活、可扩展的深度学习平台,最初由百度科学家和工程师共同开发,目的是将深度学习技术应用到百度的众多产品中。", | |||||
"Topics": [ | |||||
"ai开发工具", | |||||
"deep-learning" | |||||
], | |||||
"AiTaskCnt": 0, | |||||
"ModelCnt": 0, | |||||
"DatasetCnt": 0, | |||||
"CreatedUnix": 1647933857, | |||||
"UpdatedUnix": 1670838791, | |||||
"PrimaryLanguage": { | |||||
"ID": 1021, | |||||
"RepoID": 697, | |||||
"CommitID": "c46e661dfd4dca4ccb2d8bb83225d2dcb0bff52c", | |||||
"IsPrimary": true, | |||||
"Language": "Python", | |||||
"Percentage": 45.9, | |||||
"Color": "#3572A5", | |||||
"CreatedUnix": 1647933890 | |||||
}, | |||||
"RelAvatarLink": "/repo-avatars/697-c50e829c78c6c3168605586c750887e4", | |||||
"Contributors": [ | |||||
{ | |||||
"RelAvatarLink": "", | |||||
"UserName": "", | |||||
"Email": "yuyang18@baidu.com", | |||||
"CommitCnt": 2039 | |||||
}, | |||||
{ | |||||
"RelAvatarLink": "", | |||||
"UserName": "", | |||||
"Email": "luotao02@baidu.com", | |||||
"CommitCnt": 1101 | |||||
}, | |||||
{ | |||||
"RelAvatarLink": "", | |||||
"UserName": "", | |||||
"Email": "fengjiayi@baidu.com", | |||||
"CommitCnt": 864 | |||||
}, | |||||
{ | |||||
"RelAvatarLink": "", | |||||
"UserName": "", | |||||
"Email": "qiaolongfei@baidu.com", | |||||
"CommitCnt": 1456 | |||||
}, | |||||
{ | |||||
"RelAvatarLink": "", | |||||
"UserName": "", | |||||
"Email": "tangjian03@baidu.com", | |||||
"CommitCnt": 730 | |||||
}, | |||||
{ | |||||
"RelAvatarLink": "", | |||||
"UserName": "", | |||||
"Email": "panxin.grad@gmail.com", | |||||
"CommitCnt": 678 | |||||
} | |||||
], | |||||
"IsPrivate": false, | |||||
"IsFork": false, | |||||
"IsMirror": false, | |||||
"IsOwnerPrivate": false, | |||||
"IsArchived": false | |||||
}, | |||||
{ | |||||
"ID": 702, | |||||
"OwnerID": 679, | |||||
"OwnerName": "OpenI", | |||||
"LowerName": "tensorlayerx", | |||||
"Name": "TensorLayerX", | |||||
"Alias": "TensorLayerX", | |||||
"NumWatches": 3, | |||||
"NumStars": 0, | |||||
"NumForks": 0, | |||||
"Description": "TensorLayer3.0一款兼容多深度学习框架后端的深度学习库, 目前可以用TensorFlow、MindSpore、PaddlePaddle作为后端计算引擎。", | |||||
"Topics": [ | |||||
"openi-paper", | |||||
"pytorch", | |||||
"标签aaa", | |||||
"paddlepaddle", | |||||
"test-abcdefghijklmno测-试-123456", | |||||
"tensorflow", | |||||
"mindspore", | |||||
"高层次库", | |||||
"深度学习", | |||||
"支持多计算后端" | |||||
], | |||||
"AiTaskCnt": 0, | |||||
"ModelCnt": 0, | |||||
"DatasetCnt": 0, | |||||
"CreatedUnix": 1647935532, | |||||
"UpdatedUnix": 1671012469, | |||||
"PrimaryLanguage": { | |||||
"ID": 1039, | |||||
"RepoID": 702, | |||||
"CommitID": "6eafa9118008338521d3d085d70627b37ccba51d", | |||||
"IsPrimary": true, | |||||
"Language": "Python", | |||||
"Percentage": 99.6, | |||||
"Color": "#3572A5", | |||||
"CreatedUnix": 1647935549 | |||||
}, | |||||
"RelAvatarLink": "/repo-avatars/702-a18a6669062a1a24aea776744c003f34", | |||||
"Contributors": [ | |||||
{ | |||||
"RelAvatarLink": "", | |||||
"UserName": "", | |||||
"Email": "dhsig552@163.com", | |||||
"CommitCnt": 1598 | |||||
}, | |||||
{ | |||||
"RelAvatarLink": "", | |||||
"UserName": "", | |||||
"Email": "luo.mai.cs@gmail.com", | |||||
"CommitCnt": 203 | |||||
}, | |||||
{ | |||||
"RelAvatarLink": "", | |||||
"UserName": "", | |||||
"Email": "37874862+warshallrho@users.noreply.github.com", | |||||
"CommitCnt": 130 | |||||
}, | |||||
{ | |||||
"RelAvatarLink": "", | |||||
"UserName": "", | |||||
"Email": "jingqing.zhang15@imperial.ac.uk", | |||||
"CommitCnt": 129 | |||||
}, | |||||
{ | |||||
"RelAvatarLink": "", | |||||
"UserName": "", | |||||
"Email": "rundi_wu@pku.edu.cn", | |||||
"CommitCnt": 159 | |||||
}, | |||||
{ | |||||
"RelAvatarLink": "", | |||||
"UserName": "", | |||||
"Email": "lg4869@outlook.com", | |||||
"CommitCnt": 67 | |||||
} | |||||
], | |||||
"IsPrivate": false, | |||||
"IsFork": false, | |||||
"IsMirror": false, | |||||
"IsOwnerPrivate": false, | |||||
"IsArchived": false | |||||
}, | |||||
{ | |||||
"ID": 4780, | |||||
"OwnerID": 218, | |||||
"OwnerName": "PCL-Platform.Intelligence", | |||||
"LowerName": "pcl_pangu", | |||||
"Name": "pcl_pangu", | |||||
"Alias": "pcl_pangu", | |||||
"NumWatches": 1, | |||||
"NumStars": 0, | |||||
"NumForks": 0, | |||||
"Description": "鹏程·盘古SDK 上线!集成了鹏程·盘古alpha模型、增强版Evolution模型、多语言mPangu模型,欢迎测试和使用。希望鹏程·盘古模型的可持续学习与应用生态快速发展!", | |||||
"Topics": [ | |||||
"大模型" | |||||
], | |||||
"AiTaskCnt": 0, | |||||
"ModelCnt": 0, | |||||
"DatasetCnt": 0, | |||||
"CreatedUnix": 1669691367, | |||||
"UpdatedUnix": 1670921009, | |||||
"PrimaryLanguage": null, | |||||
"RelAvatarLink": "/repo-avatars/4780-5b45386c19f3e34b4749e6dde7dc3181", | |||||
"Contributors": [ | |||||
{ | |||||
"RelAvatarLink": "/user/avatar/wjtest1207/-1?40", | |||||
"UserName": "wjtest1207", | |||||
"Email": "wjtest1207@163.com", | |||||
"CommitCnt": 1 | |||||
} | |||||
], | |||||
"IsPrivate": false, | |||||
"IsFork": false, | |||||
"IsMirror": false, | |||||
"IsOwnerPrivate": false, | |||||
"IsArchived": false | |||||
}, | |||||
{ | |||||
"ID": 4405, | |||||
"OwnerID": 585, | |||||
"OwnerName": "arXiv_Computation_and_Language_2019", | |||||
"LowerName": "paddlenlp", | |||||
"Name": "PaddleNLP", | |||||
"Alias": "PaddleNLP", | |||||
"NumWatches": 1, | |||||
"NumStars": 0, | |||||
"NumForks": 0, | |||||
"Description": "", | |||||
"Topics": null, | |||||
"AiTaskCnt": 0, | |||||
"ModelCnt": 0, | |||||
"DatasetCnt": 0, | |||||
"CreatedUnix": 1667453897, | |||||
"UpdatedUnix": 1670256902, | |||||
"PrimaryLanguage": null, | |||||
"RelAvatarLink": "", | |||||
"Contributors": [], | |||||
"IsPrivate": false, | |||||
"IsFork": false, | |||||
"IsMirror": false, | |||||
"IsOwnerPrivate": false, | |||||
"IsArchived": false | |||||
}, | |||||
{ | |||||
"ID": 4127, | |||||
"OwnerID": 507, | |||||
"OwnerName": "international_conference_on_machine_learning", | |||||
"LowerName": "fairseq", | |||||
"Name": "fairseq", | |||||
"Alias": "fairseq", | |||||
"NumWatches": 1, | |||||
"NumStars": 0, | |||||
"NumForks": 0, | |||||
"Description": "", | |||||
"Topics": null, | |||||
"AiTaskCnt": 0, | |||||
"ModelCnt": 0, | |||||
"DatasetCnt": 0, | |||||
"CreatedUnix": 1667442805, | |||||
"UpdatedUnix": 1670256623, | |||||
"PrimaryLanguage": { | |||||
"ID": 6206, | |||||
"RepoID": 4127, | |||||
"CommitID": "b8ac3fa6cc95f9dc97085232d4faf125e5bcd2e7", | |||||
"IsPrimary": true, | |||||
"Language": "Python", | |||||
"Percentage": 97.8, | |||||
"Color": "#3572A5", | |||||
"CreatedUnix": 1667443078 | |||||
}, | |||||
"RelAvatarLink": "", | |||||
"Contributors": [], | |||||
"IsPrivate": false, | |||||
"IsFork": false, | |||||
"IsMirror": true, | |||||
"IsOwnerPrivate": false, | |||||
"IsArchived": false | |||||
}, | |||||
{ | |||||
"ID": 2176, | |||||
"OwnerID": 536, | |||||
"OwnerName": "openi_paper", | |||||
"LowerName": "paddledetection", | |||||
"Name": "PaddleDetection", | |||||
"Alias": "PaddleDetection", | |||||
"NumWatches": 1, | |||||
"NumStars": 0, | |||||
"NumForks": 0, | |||||
"Description": "", | |||||
"Topics": null, | |||||
"AiTaskCnt": 0, | |||||
"ModelCnt": 0, | |||||
"DatasetCnt": 0, | |||||
"CreatedUnix": 1666872337, | |||||
"UpdatedUnix": 1670257237, | |||||
"PrimaryLanguage": null, | |||||
"RelAvatarLink": "", | |||||
"Contributors": [], | |||||
"IsPrivate": false, | |||||
"IsFork": false, | |||||
"IsMirror": false, | |||||
"IsOwnerPrivate": false, | |||||
"IsArchived": false | |||||
}, | |||||
{ | |||||
"ID": 4619, | |||||
"OwnerID": 536, | |||||
"OwnerName": "openi_paper", | |||||
"LowerName": "fairseq", | |||||
"Name": "fairseq", | |||||
"Alias": "fairseq", | |||||
"NumWatches": 1, | |||||
"NumStars": 0, | |||||
"NumForks": 0, | |||||
"Description": "", | |||||
"Topics": null, | |||||
"AiTaskCnt": 0, | |||||
"ModelCnt": 0, | |||||
"DatasetCnt": 0, | |||||
"CreatedUnix": 1667461670, | |||||
"UpdatedUnix": 1670256376, | |||||
"PrimaryLanguage": null, | |||||
"RelAvatarLink": "", | |||||
"Contributors": [], | |||||
"IsPrivate": false, | |||||
"IsFork": false, | |||||
"IsMirror": false, | |||||
"IsOwnerPrivate": false, | |||||
"IsArchived": false | |||||
}, | |||||
{ | |||||
"ID": 598, | |||||
"OwnerID": 251, | |||||
"OwnerName": "PCL_AutoML", | |||||
"LowerName": "xbbo", | |||||
"Name": "XBBO", | |||||
"Alias": "XBBO", | |||||
"NumWatches": 1, | |||||
"NumStars": 0, | |||||
"NumForks": 0, | |||||
"Description": "超参搜索(黑盒优化)框架", | |||||
"Topics": [ | |||||
"openi-paper", | |||||
"自动机器学习", | |||||
"优化", | |||||
"超参搜索" | |||||
], | |||||
"AiTaskCnt": 0, | |||||
"ModelCnt": 0, | |||||
"DatasetCnt": 0, | |||||
"CreatedUnix": 1645065667, | |||||
"UpdatedUnix": 1671012526, | |||||
"PrimaryLanguage": { | |||||
"ID": 842, | |||||
"RepoID": 598, | |||||
"CommitID": "bb089a69ce3541246a948c08bd37e31ab23e439c", | |||||
"IsPrimary": true, | |||||
"Language": "Python", | |||||
"Percentage": 98.7, | |||||
"Color": "#3572A5", | |||||
"CreatedUnix": 1645065672 | |||||
}, | |||||
"RelAvatarLink": "/repo-avatars/598-5c870fdbde9a0457989616263b77c63c", | |||||
"Contributors": [ | |||||
{ | |||||
"RelAvatarLink": "", | |||||
"UserName": "", | |||||
"Email": "isleizhang@outlook.com", | |||||
"CommitCnt": 103 | |||||
}, | |||||
{ | |||||
"RelAvatarLink": "", | |||||
"UserName": "", | |||||
"Email": "mathcoder.zl@gmail.com", | |||||
"CommitCnt": 10 | |||||
} | |||||
], | |||||
"IsPrivate": false, | |||||
"IsFork": false, | |||||
"IsMirror": false, | |||||
"IsOwnerPrivate": false, | |||||
"IsArchived": false | |||||
}, | |||||
{ | |||||
"ID": 999, | |||||
"OwnerID": 431, | |||||
"OwnerName": "GAMMALab", | |||||
"LowerName": "openhgnn", | |||||
"Name": "OpenHGNN", | |||||
"Alias": "OpenHGNN", | |||||
"NumWatches": 1, | |||||
"NumStars": 0, | |||||
"NumForks": 2, | |||||
"Description": "OpenHGNN是由北邮GAMMA Lab开发的基于PyTorch和DGL的开源异质图神经网络工具包。", | |||||
"Topics": [ | |||||
"openi-paper", | |||||
"pytorch", | |||||
"dgl", | |||||
"heterogeneous", | |||||
"异质图", | |||||
"gnn", | |||||
"图神经网络" | |||||
], | |||||
"AiTaskCnt": 0, | |||||
"ModelCnt": 0, | |||||
"DatasetCnt": 0, | |||||
"CreatedUnix": 1659322878, | |||||
"UpdatedUnix": 1671012520, | |||||
"PrimaryLanguage": null, | |||||
"RelAvatarLink": "", | |||||
"Contributors": [ | |||||
{ | |||||
"RelAvatarLink": "/user/avatar/wjtest001/-1?56", | |||||
"UserName": "wjtest001", | |||||
"Email": "towangjing@yeah.net", | |||||
"CommitCnt": 1 | |||||
} | |||||
], | |||||
"IsPrivate": false, | |||||
"IsFork": false, | |||||
"IsMirror": false, | |||||
"IsOwnerPrivate": false, | |||||
"IsArchived": false | |||||
}, | |||||
{ | |||||
"ID": 703, | |||||
"OwnerID": 679, | |||||
"OwnerName": "OpenI", | |||||
"LowerName": "apulis-ai-platform", | |||||
"Name": "Apulis-AI-Platform", | |||||
"Alias": "Apulis-AI-Platform", | |||||
"NumWatches": 3, | |||||
"NumStars": 2, | |||||
"NumForks": 0, | |||||
"Description": "依瞳人工智能平台旨在为不同行业的用户提供基于深度学习的端到端解决方案,使用户可以用最快的速度、最少的时间开始高性能的深度学习工作,从而大幅节省研究成本、提高研发效率,同时可为中小企业解决私有云难建成、成本高等问题。 平台融合了Tensorflow、PyTorch、MindSpore等开源深度学习框架,提供了模型训练、超参调优、集群状态监控等开发环境,方便AI开发者快速搭建人工智能开发环境,开展AI开发应用。在监控模块基础上搭建预警模块,自动将平台异常通知管理员,提升平台的预警效率及安全性能。", | |||||
"Topics": [ | |||||
"ai开发工具", | |||||
"openi-paper" | |||||
], | |||||
"AiTaskCnt": 0, | |||||
"ModelCnt": 0, | |||||
"DatasetCnt": 0, | |||||
"CreatedUnix": 1647935724, | |||||
"UpdatedUnix": 1671012418, | |||||
"PrimaryLanguage": { | |||||
"ID": 1054, | |||||
"RepoID": 703, | |||||
"CommitID": "18a76ed026dfa5a1e71a74f3518e9ba6f830d77f", | |||||
"IsPrimary": true, | |||||
"Language": "JavaScript", | |||||
"Percentage": 57.4, | |||||
"Color": "#f1e05a", | |||||
"CreatedUnix": 1647935738 | |||||
}, | |||||
"RelAvatarLink": "", | |||||
"Contributors": [ | |||||
{ | |||||
"RelAvatarLink": "", | |||||
"UserName": "", | |||||
"Email": "869071540@qq.com", | |||||
"CommitCnt": 1103 | |||||
}, | |||||
{ | |||||
"RelAvatarLink": "", | |||||
"UserName": "", | |||||
"Email": "jinlmsft@hotmail.com", | |||||
"CommitCnt": 745 | |||||
}, | |||||
{ | |||||
"RelAvatarLink": "", | |||||
"UserName": "", | |||||
"Email": "hongzhi.li@microsoft.com", | |||||
"CommitCnt": 504 | |||||
}, | |||||
{ | |||||
"RelAvatarLink": "", | |||||
"UserName": "", | |||||
"Email": "xjhan1995@gmail.com", | |||||
"CommitCnt": 399 | |||||
}, | |||||
{ | |||||
"RelAvatarLink": "", | |||||
"UserName": "", | |||||
"Email": "hongzhili@users.noreply.github.com", | |||||
"CommitCnt": 377 | |||||
}, | |||||
{ | |||||
"RelAvatarLink": "", | |||||
"UserName": "", | |||||
"Email": "xudifsd@gmail.com", | |||||
"CommitCnt": 251 | |||||
} | |||||
], | |||||
"IsPrivate": false, | |||||
"IsFork": false, | |||||
"IsMirror": false, | |||||
"IsOwnerPrivate": false, | |||||
"IsArchived": false | |||||
}, | |||||
{ | |||||
"ID": 695, | |||||
"OwnerID": 679, | |||||
"OwnerName": "OpenI", | |||||
"LowerName": "cubeai", | |||||
"Name": "cubeai", | |||||
"Alias": "cubeai", | |||||
"NumWatches": 3, | |||||
"NumStars": 3, | |||||
"NumForks": 0, | |||||
"Description": "CubeAI智立方是中国联通研究院自主研发的集AI模型自动化服务封装、发布、共享、部署和能力开放等功能于一体的开源AI算能服务平台,其核心作用在于打通AI模型开发至实际生产应用之间的壁垒,加速AI创新和应用进程,促进AI应用从设计、开发直到部署、运营整个生命周期的自动化快速迭代和演进。", | |||||
"Topics": [ | |||||
"ai开发工具", | |||||
"openi", | |||||
"ai模型服务化", | |||||
"ai模型共享", | |||||
"ai模型部署", | |||||
"ai能力开放" | |||||
], | |||||
"AiTaskCnt": 0, | |||||
"ModelCnt": 0, | |||||
"DatasetCnt": 0, | |||||
"CreatedUnix": 1647933184, | |||||
"UpdatedUnix": 1670838880, | |||||
"PrimaryLanguage": { | |||||
"ID": 1006, | |||||
"RepoID": 695, | |||||
"CommitID": "09e1a0146612cff32fb01881707c831414494599", | |||||
"IsPrimary": true, | |||||
"Language": "Shell", | |||||
"Percentage": 96.8, | |||||
"Color": "#89e051", | |||||
"CreatedUnix": 1647933187 | |||||
}, | |||||
"RelAvatarLink": "/repo-avatars/695-5d57aff010bceee7d1634ea64ca6a298", | |||||
"Contributors": [ | |||||
{ | |||||
"RelAvatarLink": "", | |||||
"UserName": "", | |||||
"Email": "huolongshe@126.com", | |||||
"CommitCnt": 15 | |||||
} | |||||
], | |||||
"IsPrivate": false, | |||||
"IsFork": false, | |||||
"IsMirror": false, | |||||
"IsOwnerPrivate": false, | |||||
"IsArchived": false | |||||
}, | |||||
{ | |||||
"ID": 595, | |||||
"OwnerID": 251, | |||||
"OwnerName": "PCL_AutoML", | |||||
"LowerName": "xnas", | |||||
"Name": "XNAS", | |||||
"Alias": "XNAS", | |||||
"NumWatches": 1, | |||||
"NumStars": 0, | |||||
"NumForks": 0, | |||||
"Description": "神经网络结构搜索框架", | |||||
"Topics": [ | |||||
"openi-paper", | |||||
"自动机器学习", | |||||
"automl", | |||||
"神经网络结构搜索" | |||||
], | |||||
"AiTaskCnt": 0, | |||||
"ModelCnt": 0, | |||||
"DatasetCnt": 0, | |||||
"CreatedUnix": 1645065509, | |||||
"UpdatedUnix": 1671012496, | |||||
"PrimaryLanguage": { | |||||
"ID": 838, | |||||
"RepoID": 595, | |||||
"CommitID": "2c54ceb09b255cbcabd67f3c39fc777c4b2403f4", | |||||
"IsPrimary": true, | |||||
"Language": "Python", | |||||
"Percentage": 100, | |||||
"Color": "#3572A5", | |||||
"CreatedUnix": 1645065513 | |||||
}, | |||||
"RelAvatarLink": "/repo-avatars/595-4284a9fbc95ba42b7753910d8fcd1828", | |||||
"Contributors": [ | |||||
{ | |||||
"RelAvatarLink": "", | |||||
"UserName": "", | |||||
"Email": "zhengxiawu@126.com", | |||||
"CommitCnt": 262 | |||||
}, | |||||
{ | |||||
"RelAvatarLink": "", | |||||
"UserName": "", | |||||
"Email": "sdut_snow@163.com", | |||||
"CommitCnt": 66 | |||||
}, | |||||
{ | |||||
"RelAvatarLink": "", | |||||
"UserName": "", | |||||
"Email": "1004463561@qq.com", | |||||
"CommitCnt": 31 | |||||
}, | |||||
{ | |||||
"RelAvatarLink": "", | |||||
"UserName": "", | |||||
"Email": "thrase@163.com", | |||||
"CommitCnt": 23 | |||||
}, | |||||
{ | |||||
"RelAvatarLink": "", | |||||
"UserName": "", | |||||
"Email": "shaokunzhang529@gmail.com", | |||||
"CommitCnt": 24 | |||||
}, | |||||
{ | |||||
"RelAvatarLink": "", | |||||
"UserName": "", | |||||
"Email": "51071696+WOODchen7@users.noreply.github.com", | |||||
"CommitCnt": 7 | |||||
} | |||||
], | |||||
"IsPrivate": false, | |||||
"IsFork": false, | |||||
"IsMirror": false, | |||||
"IsOwnerPrivate": false, | |||||
"IsArchived": false | |||||
} | |||||
], | |||||
iPageSizes: [15, 30, 50], | |||||
iPageSize: 15, | |||||
iPage: 1, | |||||
total: 0, | |||||
}; | |||||
}, | |||||
methods: { | |||||
getListData() { | |||||
return; | |||||
this.loading = true; | |||||
getReposListData({ | |||||
q: this.q || '', | |||||
topic: this.topic || '', | |||||
sort: this.sort || 'mostpopular', | |||||
pageSize: this.iPageSize || 15, | |||||
page: this.iPage || 1, | |||||
}).then(res => { | |||||
res = res.data; | |||||
this.loading = false; | |||||
if (res.Code == 0) { | |||||
const list = res.Data.Repos || []; | |||||
this.list = list.map((item) => { | |||||
item.Contributors = (item.Contributors || []).map((_item) => { | |||||
return { | |||||
..._item, | |||||
bgColor: this.randomColor(_item.Email[0].toLocaleUpperCase()), | |||||
} | |||||
}); | |||||
const contributors = item.Contributors || []; | |||||
return { | |||||
...item, | |||||
NameShow: this.handlerSearchStr(item.Alias, this.q), | |||||
DescriptionShow: this.handlerSearchStr(item.Description, this.q), | |||||
TopicsShow: (item.Topics || []).map((_item) => { | |||||
return { | |||||
topic: _item, | |||||
topicShow: this.handlerSearchStr(_item, this.q) | |||||
} | |||||
}), | |||||
} | |||||
}); | |||||
this.total = res.Data.Total; | |||||
this.iPage = this.iPage; | |||||
this.iPageSize = this.iPageSize; | |||||
this.$nextTick(() => { | |||||
LetterAvatar.transform(); | |||||
}); | |||||
} else { | |||||
this.list = []; | |||||
this.total = 0; | |||||
this.iPage = this.iPage; | |||||
this.iPageSize = this.iPageSize; | |||||
} | |||||
}).catch(err => { | |||||
console.log(err); | |||||
this.loading = false; | |||||
this.list = []; | |||||
this.total = 0; | |||||
this.iPage = this.iPage; | |||||
this.iPageSize = this.iPageSize; | |||||
}); | |||||
}, | |||||
search() { | |||||
this.getListData(); | |||||
}, | |||||
currentChange(page) { | |||||
this.iPage = page; | |||||
this.$emit('current-change', { | |||||
page: this.iPage, | |||||
pageSize: this.iPageSize, | |||||
}); | |||||
}, | |||||
sizeChange(pageSize) { | |||||
this.iPageSize = pageSize; | |||||
this.$emit('size-change', { | |||||
page: this.iPage, | |||||
pageSize: this.iPageSize, | |||||
}); | |||||
}, | |||||
}, | |||||
mounted() { }, | |||||
}; | |||||
</script> | |||||
<style scoped lang="less"> | |||||
.list-container { | |||||
.list-item-container { | |||||
.item-container { | |||||
width: 100%; | |||||
padding: 12px; | |||||
} | |||||
} | |||||
} | |||||
.center { | |||||
text-align: center; | |||||
} | |||||
.no-data { | |||||
height: 60px; | |||||
display: flex; | |||||
justify-content: center; | |||||
align-items: center; | |||||
} | |||||
</style> |
@@ -0,0 +1,179 @@ | |||||
<template> | |||||
<div class="search-bar"> | |||||
<div class="search-bar-l"> | |||||
<div class="search-c"> | |||||
<div class="search-input-c"> | |||||
<input type="text" :placeholder="serchPlaceHolder" v-model="keyword" @keyup.enter.native="search"> | |||||
</div> | |||||
<div class="search-btn" @click="search">搜索</div> | |||||
</div> | |||||
<el-button class="apply-btn" type="primary" icon="el-icon-plus" size="medium" @click="apply">申请展示项目</el-button> | |||||
<el-button class="apply-btn" type="primary" icon="el-icon-s-management" size="medium" v-if="isTechAdmin" | |||||
@click="manage">管理展示项目</el-button> | |||||
<div class="openi-link-c"> | |||||
<a class="openi-link" href="">OpenI启智社区开源指南</a> | |||||
</div> | |||||
</div> | |||||
<div class="sort-c"> | |||||
<el-select class="select" size="medium" v-model="sortType" @change="changeSort" placeholder="排序" clearable> | |||||
<el-option v-for="item in sortList" :key="item.k" :label="item.v" :value="item.k" /> | |||||
</el-select> | |||||
</div> | |||||
</div> | |||||
</template> | |||||
<script> | |||||
import { getIsTechAdmin } from '~/apis/modules/tech'; | |||||
export default { | |||||
name: "SearchBar", | |||||
props: { | |||||
condition: { type: Object, default: () => ({}) }, | |||||
}, | |||||
components: {}, | |||||
data() { | |||||
return { | |||||
keyword: '', | |||||
serchPlaceHolder: '搜索项目名称/简介', | |||||
sortType: '', | |||||
sortList: [{ | |||||
k: '1', | |||||
v: '最近更新', | |||||
}, { | |||||
k: '2', | |||||
v: '项目成果数', | |||||
}], | |||||
isTechAdmin: true, | |||||
}; | |||||
}, | |||||
methods: { | |||||
search() { | |||||
this.$emit('changeCondition', { | |||||
q: this.keyword.trim() | |||||
}); | |||||
}, | |||||
apply() { | |||||
window.location.href = '/tech/new'; | |||||
}, | |||||
manage() { | |||||
window.location.href = '/tech/admin_view'; | |||||
}, | |||||
changeSort() { | |||||
this.$emit('changeCondition', { | |||||
sort: this.sortType | |||||
}); | |||||
} | |||||
}, | |||||
watch: { | |||||
condition: { | |||||
handler(newVal) { | |||||
console.log('searchBar:watch:condition', newVal); | |||||
this.keyword = newVal.q; | |||||
this.sortType = newVal.sort; | |||||
}, | |||||
immediate: true, | |||||
deep: true, | |||||
}, | |||||
}, | |||||
beforeMount() { | |||||
getIsTechAdmin().then(res => { | |||||
console.log(res); | |||||
}).catch(err => { | |||||
console.log(err); | |||||
}); | |||||
}, | |||||
mounted() { }, | |||||
}; | |||||
</script> | |||||
<style scoped lang="less"> | |||||
.search-bar { | |||||
margin: 30px 0; | |||||
display: flex; | |||||
justify-content: space-between; | |||||
.search-bar-l { | |||||
display: flex; | |||||
.search-c { | |||||
display: flex; | |||||
align-items: center; | |||||
justify-content: center; | |||||
margin-right: 20px; | |||||
.search-input-c { | |||||
width: 268px; | |||||
height: 40px; | |||||
border-color: rgba(0, 61, 192, 0.73); | |||||
border-width: 2px; | |||||
border-style: solid; | |||||
font-size: 14px; | |||||
line-height: 20px; | |||||
padding: 8px; | |||||
display: flex; | |||||
color: rgb(136, 136, 136); | |||||
align-items: center; | |||||
background: url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20version%3D%221.1%22%3E%3Cdefs%3E%3ClinearGradient%20id%3D%221%22%20x1%3D%220%22%20x2%3D%221%22%20y1%3D%220%22%20y2%3D%220%22%20gradientTransform%3D%22matrix(6.123233995736766e-17%2C%201%2C%20-0.014005111865831027%2C%206.123233995736766e-17%2C%200.5%2C%200)%22%3E%3Cstop%20stop-color%3D%22%23e2d1ea%22%20stop-opacity%3D%221%22%20offset%3D%220%22%3E%3C%2Fstop%3E%3Cstop%20stop-color%3D%22%23ffffff%22%20stop-opacity%3D%221%22%20offset%3D%220.3%22%3E%3C%2Fstop%3E%3C%2FlinearGradient%3E%3C%2Fdefs%3E%3Crect%20width%3D%22100%25%22%20height%3D%22100%25%22%20fill%3D%22url(%231)%22%3E%3C%2Frect%3E%3C%2Fsvg%3E"); | |||||
input { | |||||
width: 100%; | |||||
border: none; | |||||
outline: none; | |||||
} | |||||
} | |||||
.search-btn { | |||||
height: 40px; | |||||
font-size: 14px; | |||||
line-height: 20px; | |||||
padding: 0px; | |||||
display: flex; | |||||
color: rgb(255, 255, 255); | |||||
align-items: center; | |||||
text-align: center; | |||||
justify-content: center; | |||||
padding: 0 20px; | |||||
cursor: pointer; | |||||
background: url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20version%3D%221.1%22%3E%3Cdefs%3E%3ClinearGradient%20id%3D%221%22%20x1%3D%220%22%20x2%3D%221%22%20y1%3D%220%22%20y2%3D%220%22%20gradientTransform%3D%22matrix(-1.1800000000000002%2C%200.9499999999999998%2C%20-0.23749999999999996%2C%20-1.1800000000000002%2C%201.024%2C%200.047)%22%3E%3Cstop%20stop-color%3D%22%23bbd2f2%22%20stop-opacity%3D%221%22%20offset%3D%220.02%22%3E%3C%2Fstop%3E%3Cstop%20stop-color%3D%22%23003dc0%22%20stop-opacity%3D%220.73%22%20offset%3D%221%22%3E%3C%2Fstop%3E%3C%2FlinearGradient%3E%3C%2Fdefs%3E%3Crect%20width%3D%22100%25%22%20height%3D%22100%25%22%20fill%3D%22url(%231)%22%3E%3C%2Frect%3E%3C%2Fsvg%3E"); | |||||
} | |||||
} | |||||
.apply-btn { | |||||
margin-left: 20px; | |||||
border-color: rgb(31, 1, 115); | |||||
border-width: 1px; | |||||
border-style: solid; | |||||
border-radius: 6px; | |||||
font-size: 14px; | |||||
background: url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20version%3D%221.1%22%3E%3Cdefs%3E%3ClinearGradient%20id%3D%221%22%20x1%3D%220%22%20x2%3D%221%22%20y1%3D%220%22%20y2%3D%220%22%20gradientTransform%3D%22matrix(6.123233995736766e-17%2C%201%2C%20-0.08281144868278038%2C%206.123233995736766e-17%2C%200.5%2C%200)%22%3E%3Cstop%20stop-color%3D%22%233291f8%22%20stop-opacity%3D%221%22%20offset%3D%220%22%3E%3C%2Fstop%3E%3Cstop%20stop-color%3D%22%23060075%22%20stop-opacity%3D%220.73%22%20offset%3D%221%22%3E%3C%2Fstop%3E%3C%2FlinearGradient%3E%3C%2Fdefs%3E%3Crect%20width%3D%22100%25%22%20height%3D%22100%25%22%20fill%3D%22url(%231)%22%3E%3C%2Frect%3E%3C%2Fsvg%3E"); | |||||
&:hover { | |||||
opacity: 0.9; | |||||
} | |||||
&:active { | |||||
opacity: 0.8; | |||||
} | |||||
} | |||||
.openi-link-c { | |||||
margin-left: 20px; | |||||
display: flex; | |||||
align-items: center; | |||||
justify-content: center; | |||||
.openi-link { | |||||
text-decoration: underline; | |||||
color: rgb(50, 145, 248); | |||||
} | |||||
} | |||||
} | |||||
.sort-c { | |||||
display: flex; | |||||
align-items: center; | |||||
justify-content: center; | |||||
justify-self: flex-end; | |||||
} | |||||
} | |||||
</style> |
@@ -0,0 +1,141 @@ | |||||
<template> | |||||
<div> | |||||
<div class="bg-container"> | |||||
<div class="bg"> | |||||
<div class="bg-01"></div> | |||||
<div class="bg-02"></div> | |||||
<div class="bg-03"></div> | |||||
<div class="bg-04"></div> | |||||
</div> | |||||
<div class="title-c"> | |||||
<div class="title-main">科技创新2030</div> | |||||
<div class="title-second">新一代人工智能重大项目成果展示</div> | |||||
</div> | |||||
<div class="menu"> | |||||
<TopMenu :menu="menu"></TopMenu> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</template> | |||||
<script> | |||||
import TopMenu from './TopMenu.vue'; | |||||
export default { | |||||
name: "TopHeader", | |||||
props: { | |||||
menu: { type: Number, default: -1 }, | |||||
}, | |||||
components: { | |||||
TopMenu | |||||
}, | |||||
data() { | |||||
return { | |||||
list: [], | |||||
}; | |||||
}, | |||||
methods: {}, | |||||
mounted() { }, | |||||
}; | |||||
</script> | |||||
<style scoped lang="less"> | |||||
.bg-container { | |||||
height: 200px; | |||||
width: 100%; | |||||
background: url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20version%3D%221.1%22%3E%3Cdefs%3E%3ClinearGradient%20id%3D%221%22%20x1%3D%220%22%20x2%3D%221%22%20y1%3D%220%22%20y2%3D%220%22%20gradientTransform%3D%22matrix(0.9059999999999998%2C%20-0.8390000000000001%2C%200.016184413580246918%2C%200.9059999999999998%2C%20-0.183%2C%200.683)%22%3E%3Cstop%20stop-color%3D%22%233bb6fe%22%20stop-opacity%3D%221%22%20offset%3D%220%22%3E%3C%2Fstop%3E%3Cstop%20stop-color%3D%22%232250cf%22%20stop-opacity%3D%221%22%20offset%3D%220.61%22%3E%3C%2Fstop%3E%3Cstop%20stop-color%3D%22%237c23b4%22%20stop-opacity%3D%221%22%20offset%3D%220.99%22%3E%3C%2Fstop%3E%3C%2FlinearGradient%3E%3C%2Fdefs%3E%3Crect%20width%3D%22100%25%22%20height%3D%22100%25%22%20fill%3D%22url(%231)%22%3E%3C%2Frect%3E%3C%2Fsvg%3E"); | |||||
overflow: hidden; | |||||
position: relative; | |||||
.bg { | |||||
position: absolute; | |||||
width: 100%; | |||||
height: 100%; | |||||
left: 67%; | |||||
top: 23%; | |||||
.bg-01 { | |||||
position: absolute; | |||||
top: -296.85px; | |||||
left: -100.21px; | |||||
width: 11.52px; | |||||
height: 430.36px; | |||||
transform: rotate(46deg); | |||||
border-radius: 45px; | |||||
display: flex; | |||||
background: url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20version%3D%221.1%22%3E%3Cdefs%3E%3ClinearGradient%20id%3D%221%22%20x1%3D%220%22%20x2%3D%221%22%20y1%3D%220%22%20y2%3D%220%22%20gradientTransform%3D%22matrix(2.6570000000000005%2C%20-1.366%2C%201906.3802884596842%2C%202.6570000000000005%2C%20-0.714%2C%201.313)%22%3E%3Cstop%20stop-color%3D%22%2315cf16%22%20stop-opacity%3D%221%22%20offset%3D%220%22%3E%3C%2Fstop%3E%3Cstop%20stop-color%3D%22%23ed6bc9%22%20stop-opacity%3D%220%22%20offset%3D%221%22%3E%3C%2Fstop%3E%3C%2FlinearGradient%3E%3C%2Fdefs%3E%3Crect%20width%3D%22100%25%22%20height%3D%22100%25%22%20fill%3D%22url(%231)%22%3E%3C%2Frect%3E%3C%2Fsvg%3E"); | |||||
} | |||||
.bg-02 { | |||||
position: absolute; | |||||
top: -130.68px; | |||||
left: -213.01px; | |||||
width: 3.64px; | |||||
height: 430.36px; | |||||
transform: rotate(46deg); | |||||
border-radius: 45px; | |||||
background: url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20version%3D%221.1%22%3E%3Cdefs%3E%3ClinearGradient%20id%3D%221%22%20x1%3D%220%22%20x2%3D%221%22%20y1%3D%220%22%20y2%3D%220%22%20gradientTransform%3D%22matrix(2.6570000000000005%2C%20-1.366%2C%2019094.65120710059%2C%202.6570000000000005%2C%20-0.714%2C%201.313)%22%3E%3Cstop%20stop-color%3D%22%23ffffff%22%20stop-opacity%3D%221%22%20offset%3D%220%22%3E%3C%2Fstop%3E%3Cstop%20stop-color%3D%22%23ed6bc9%22%20stop-opacity%3D%220%22%20offset%3D%221%22%3E%3C%2Fstop%3E%3C%2FlinearGradient%3E%3C%2Fdefs%3E%3Crect%20width%3D%22100%25%22%20height%3D%22100%25%22%20fill%3D%22url(%231)%22%3E%3C%2Frect%3E%3C%2Fsvg%3E"); | |||||
} | |||||
.bg-03 { | |||||
position: absolute; | |||||
top: -178.07px; | |||||
left: -50.045px; | |||||
width: 111.15px; | |||||
height: 306.28px; | |||||
transform: rotate(46deg); | |||||
border-radius: 63px; | |||||
background: url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20version%3D%221.1%22%3E%3Cdefs%3E%3ClinearGradient%20id%3D%221%22%20x1%3D%220%22%20x2%3D%221%22%20y1%3D%220%22%20y2%3D%220%22%20gradientTransform%3D%22matrix(2.6570000000000005%2C%20-1.366%2C%2010.372156049382713%2C%202.6570000000000005%2C%20-0.714%2C%201.313)%22%3E%3Cstop%20stop-color%3D%22%23f8da77%22%20stop-opacity%3D%221%22%20offset%3D%220%22%3E%3C%2Fstop%3E%3Cstop%20stop-color%3D%22%23ed6bc9%22%20stop-opacity%3D%220%22%20offset%3D%221%22%3E%3C%2Fstop%3E%3C%2FlinearGradient%3E%3C%2Fdefs%3E%3Crect%20width%3D%22100%25%22%20height%3D%22100%25%22%20fill%3D%22url(%231)%22%3E%3C%2Frect%3E%3C%2Fsvg%3E"); | |||||
} | |||||
.bg-04 { | |||||
position: absolute; | |||||
top: -218.72px; | |||||
left: 239.81px; | |||||
width: 20.38px; | |||||
height: 306.28px; | |||||
transform: rotate(46deg); | |||||
border-radius: 45px; | |||||
background: url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20version%3D%221.1%22%3E%3Cdefs%3E%3ClinearGradient%20id%3D%221%22%20x1%3D%220%22%20x2%3D%221%22%20y1%3D%220%22%20y2%3D%220%22%20gradientTransform%3D%22matrix(2.6570000000000005%2C%20-1.366%2C%20308.5173674049777%2C%202.6570000000000005%2C%20-0.714%2C%201.313)%22%3E%3Cstop%20stop-color%3D%22%2377f8f8%22%20stop-opacity%3D%220.6%22%20offset%3D%220%22%3E%3C%2Fstop%3E%3Cstop%20stop-color%3D%22%23ed6bc9%22%20stop-opacity%3D%220%22%20offset%3D%221%22%3E%3C%2Fstop%3E%3C%2FlinearGradient%3E%3C%2Fdefs%3E%3Crect%20width%3D%22100%25%22%20height%3D%22100%25%22%20fill%3D%22url(%231)%22%3E%3C%2Frect%3E%3C%2Fsvg%3E"); | |||||
} | |||||
} | |||||
.title-c { | |||||
position: absolute; | |||||
top: 0; | |||||
left: 0; | |||||
width: 100%; | |||||
height: 100%; | |||||
z-index: 1; | |||||
.title-main { | |||||
text-align: center; | |||||
color: rgba(255, 230, 21, 1); | |||||
font-weight: 700; | |||||
text-shadow: rgb(34 7 94) 0px 2px 6px; | |||||
line-height: 39px; | |||||
font-size: 28px; | |||||
margin: 26px 0 4px; | |||||
} | |||||
.title-second { | |||||
text-align: center; | |||||
font-weight: 700; | |||||
text-shadow: rgb(34 7 94) 0px 2px 6px; | |||||
color: rgb(255, 255, 255); | |||||
font-size: 36px; | |||||
font-weight: 500; | |||||
line-height: 50px; | |||||
} | |||||
} | |||||
.menu { | |||||
position: absolute; | |||||
bottom: 0; | |||||
height: 40px; | |||||
width: 100%; | |||||
z-index: 2; | |||||
padding: 0 140px; | |||||
} | |||||
} | |||||
</style> |
@@ -0,0 +1,99 @@ | |||||
<template> | |||||
<div class="container ui" style="padding:0 75px;"> | |||||
<div class="menu"> | |||||
<div class="menu-l"> | |||||
<div class="menu-item" v-for="(item, index) in list" :key="index" :class="focusIndex == index ? 'focused' : ''" | |||||
@click="changeMenu(item, index)"> | |||||
{{ item.title }} | |||||
</div> | |||||
</div> | |||||
<div class="menu-r"></div> | |||||
</div> | |||||
</div> | |||||
</template> | |||||
<script> | |||||
export default { | |||||
name: "TopMenu", | |||||
props: { | |||||
menu: { type: Number, default: -1 }, | |||||
}, | |||||
components: {}, | |||||
data() { | |||||
return { | |||||
focusIndex: 0, | |||||
list: [{ | |||||
key: 'tech_view', | |||||
title: '按科技项目查看', | |||||
url: '/tech/tech_view', | |||||
}, { | |||||
key: 'repo_view', | |||||
title: '按项目成果查看', | |||||
url: '/tech/repo_view', | |||||
},/* { | |||||
key: '', | |||||
title: '我申请的项目', | |||||
url: '', | |||||
}*/], | |||||
}; | |||||
}, | |||||
methods: { | |||||
changeMenu(item, index) { | |||||
if (this.focusIndex == index) return; | |||||
this.focusIndex = index; | |||||
window.location.href = item.url; | |||||
} | |||||
}, | |||||
beforeMount() { | |||||
this.focusIndex = this.menu; | |||||
}, | |||||
mounted() { }, | |||||
}; | |||||
</script> | |||||
<style scoped lang="less"> | |||||
.menu { | |||||
display: flex; | |||||
align-items: center; | |||||
justify-content: space-between; | |||||
.menu-l { | |||||
display: flex; | |||||
align-items: center; | |||||
justify-content: flex-start; | |||||
} | |||||
.menu-r { | |||||
display: flex; | |||||
align-items: center; | |||||
justify-content: flex-end; | |||||
} | |||||
.menu-item { | |||||
display: flex; | |||||
border-color: rgb(187, 187, 187); | |||||
border-width: 1px 1px 0px 0px; | |||||
border-style: solid; | |||||
font-size: 14px; | |||||
line-height: 20px; | |||||
color: rgba(255, 255, 255, 0.7); | |||||
align-items: center; | |||||
text-align: center; | |||||
justify-content: center; | |||||
background: rgba(104, 50, 165, 0.2); | |||||
height: 40px; | |||||
width: 178px; | |||||
cursor: pointer; | |||||
&:first-child { | |||||
border-left-width: 1px; | |||||
} | |||||
&.focused { | |||||
cursor: default; | |||||
color: rgb(255, 255, 255); | |||||
background: rgba(249, 249, 249, 0.2); | |||||
} | |||||
} | |||||
} | |||||
</style> |
@@ -0,0 +1,470 @@ | |||||
<template> | |||||
<div> | |||||
<TopHeader :menu="-1"></TopHeader> | |||||
<div class="ui container"> | |||||
<div class="title">您申请的项目将在2030科技项目页面展示</div> | |||||
<div class="form-c" v-show="!selectTechPrj"> | |||||
<div class="form-wrap"> | |||||
<div class="form-header">申请展示项目</div> | |||||
<div class="form-content"> | |||||
<div class="form-row"> | |||||
<div class="row-label required">申请项目存放于</div> | |||||
<div class="row-content"> | |||||
<el-radio v-model="form.type" label="openi" @input="changeType()">启智社区</el-radio> | |||||
<el-radio v-model="form.type" label="no-openi" @input="changeType()">非启智社区</el-radio> | |||||
</div> | |||||
</div> | |||||
<div class="form-row"> | |||||
<div class="row-label required">现项目地址</div> | |||||
<div class="row-content"> | |||||
<el-input size="medium" v-model="form.url" @input="changeUrl" | |||||
placeholder='请输入现有项目的 HTTP(s) 或 Git " clone" URL,如:https://openi.pcl.ac.cn/OpenI/aiforge'></el-input> | |||||
</div> | |||||
</div> | |||||
<div v-show="form.type == 'no-openi'"> | |||||
<div class="form-row" :class="form.alias_err ? 'form-row-err' : ''"> | |||||
<div class="row-label required baseline">启智项目名称</div> | |||||
<div class="row-content"> | |||||
<div> | |||||
<el-input size="medium" v-model="form.repo_alias" @input="changeAlias"></el-input> | |||||
</div> | |||||
<div class="tips"> | |||||
请输入中文、字母、数字和-_ .,最多100个字符。 | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="form-row" :class="form.name_err ? 'form-row-err' : ''"> | |||||
<div class="row-label required baseline">启智项目路径</div> | |||||
<div class="row-content"> | |||||
<div class="reop-url-c"> | |||||
<el-select size="medium" v-model="form.uid"></el-select> | |||||
<span style="margin: 0 8px;font-size:22px;"> / </span> | |||||
<el-input size="medium" v-model="form.repo_name" @input="changeRepoName"></el-input> | |||||
</div> | |||||
<div class="tips"> | |||||
启智项目地址:<span class="openi-repo-url">{{ form.repo_url }}</span> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="form-row"> | |||||
<div class="row-label">关键词</div> | |||||
<div class="row-content"> | |||||
<el-select style="width:100%" size="medium" v-model="form.topics" multiple filterable remote | |||||
allow-create default-first-option placeholder="请选择标签" :remote-method="searchTopics" | |||||
:loading="form.topicLoading"> | |||||
<el-option v-for="item in topicsList" :key="item.value" :label="item.label" :value="item.value"> | |||||
</el-option> | |||||
</el-select> | |||||
</div> | |||||
</div> | |||||
<div class="form-row"> | |||||
<div class="row-label baseline">项目简介</div> | |||||
<div class="row-content"> | |||||
<el-input size="medium" type="textarea" :rows="3" placeholder="请输入项目简介(长度不超过255)" :maxLength="255" | |||||
v-model="form.description"></el-input> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="form-row"> | |||||
<div class="row-label required">科技项目</div> | |||||
<div class="row-content"> | |||||
<el-input placeholder="请选择科技项目" size="medium" v-model="form.tech_show" :readonly="true"> | |||||
<el-button size="medium" slot="append" @click="goSelectTechPrj">选择科技项目</el-button> | |||||
</el-input> | |||||
</div> | |||||
</div> | |||||
<div class="form-row"> | |||||
<div class="row-label required">成果贡献单位</div> | |||||
<div class="row-content"> | |||||
<el-select style="width:100%" size="medium" v-model="form.institution" multiple> | |||||
<el-option v-for="item in institutionList" :key="item.key" :label="item.value" | |||||
:value="item.value"></el-option> | |||||
</el-select> | |||||
</div> | |||||
</div> | |||||
<div class="form-btn-group"> | |||||
<el-button size="medium" type="primary" class="btn confirm-btn" @click="submit">提交申请</el-button> | |||||
<el-button size="medium" class="btn" @click="cancel">{{ $t('cancel') }}</el-button> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="form-select-tech-prj" v-show="selectTechPrj"> | |||||
<div class="form-wrap"> | |||||
<div class="form-header">选择科技项目</div> | |||||
<div class="form-content"> | |||||
<div class="form-row"> | |||||
<div class="row-label required">请输入科技项目</div> | |||||
<div class="row-content"> | |||||
<el-input placeholder="请输入内容" size="medium" v-model="form.tech_search_keyword" | |||||
@keyup.enter.native="searchTechList" class="input-with-select"> | |||||
<el-select v-model="form.tech_search_sel" style="width:142px" size="medium" slot="prepend" | |||||
placeholder="请选择"> | |||||
<el-option label="项目立项编号" value="0"></el-option> | |||||
<el-option label="参与单位" value="1"></el-option> | |||||
<el-option label="项目名称" value="2"></el-option> | |||||
</el-select> | |||||
<el-button size="medium" slot="append" icon="el-icon-search" @click="searchTechList"></el-button> | |||||
</el-input> | |||||
</div> | |||||
</div> | |||||
<div class="form-table"> | |||||
<div style="margin: 0 20px 30px 20px"> | |||||
<el-table ref="tableRef" border :data="tableData" style="width:100%" v-loading="loading" stripe> | |||||
<el-table-column prop="no" label="项目立项编号" align="center" header-align="center" | |||||
width="120"></el-table-column> | |||||
<el-table-column prop="name" label="科技项目名称" align="center" header-align="center" | |||||
width="150"></el-table-column> | |||||
<el-table-column prop="unit" label="项目承担单位" align="center" header-align="center" | |||||
width="150"></el-table-column> | |||||
<el-table-column prop="allunit" label="所有参与单位" align="center" header-align="center"></el-table-column> | |||||
<el-table-column width="100" label="操作" align="center" header-align="center"> | |||||
<template slot-scope="scope"> | |||||
<el-button type="primary">选择</el-button> | |||||
</template> | |||||
</el-table-column> | |||||
</el-table> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</template> | |||||
<script> | |||||
import TopHeader from '../components/TopHeader.vue'; | |||||
import { getTechs, setOpenIApply, setNoOpenIApply, getCreateRepoUser, getCheckRepoName, getTopics } from '~/apis/modules/tech'; | |||||
export default { | |||||
data() { | |||||
return { | |||||
form: { | |||||
type: 'openi', | |||||
url: '', | |||||
repo_alias: '', | |||||
alias_err: false, | |||||
uid: '', | |||||
repo_name: '', | |||||
name_err: false, | |||||
repo_url: '', | |||||
topics: [], | |||||
topicLoading: false, | |||||
description: '', | |||||
tech_search_sel: '0', | |||||
tech_search_keyword: '', | |||||
tech_show: '', | |||||
institution: [], | |||||
}, | |||||
selectTechPrj: false, | |||||
loading: false, | |||||
tableData: [{ | |||||
selected: '0', | |||||
no: 'xxxxxxxxxx1', | |||||
name: 'Name NameName', | |||||
unit: '项目承担单位项目承担单位1', | |||||
allunit: '所有参与单位1、所有参与单位、所有参与单位、所有参与单位、所有参与单位', | |||||
}, { | |||||
selected: '0', | |||||
no: 'xxxxxxxxxx2', | |||||
name: 'Name NameName2', | |||||
unit: '项目承担单位项目承担单位2', | |||||
allunit: '所有参与单位2、所有参与单位、所有参与单位', | |||||
}], | |||||
topicsList: [], | |||||
institutionList: [], | |||||
}; | |||||
}, | |||||
components: { | |||||
TopHeader, | |||||
}, | |||||
methods: { | |||||
resetData() { | |||||
this.form.url = ''; | |||||
this.form.repo_alias = ''; | |||||
this.form.alias_err = false; | |||||
this.form.uid = ''; | |||||
this.form.repo_name = ''; | |||||
this.form.repo_url = ''; | |||||
this.form.name_err = false; | |||||
this.form.topics = []; | |||||
this.form.topicLoading = false; | |||||
this.form.description = ''; | |||||
this.form.tech_search_sel = '0'; | |||||
this.form.tech_search_keyword = ''; | |||||
this.form.tech_show = ''; | |||||
this.form.institution = []; | |||||
this.tableData = []; | |||||
this.topicsList = []; | |||||
}, | |||||
changeType() { | |||||
this.resetData(); | |||||
}, | |||||
checkRepoAlias() { | |||||
const reg = /^[\u4E00-\u9FA5A-Za-z0-9_.-]{1,100}$/; | |||||
const res = reg.test(this.form.repo_alias); | |||||
this.form.alias_err = !res; | |||||
return res; | |||||
}, | |||||
checkRepoName() { | |||||
const reg = /^[A-Za-z0-9_.-]{1,100}$/; | |||||
const res = reg.test(this.form.repo_name); | |||||
this.form.name_err = !res; | |||||
return res; | |||||
}, | |||||
changeUrl() { | |||||
if (this.form.type == 'openi') return; | |||||
const owner = 'Itx003'; | |||||
const urlAdd = location.href.split("/")[0] + "//" + location.href.split("/")[2]; | |||||
const repoValue = this.form.url.match(/^(.*\/)?((.+?)(\.git)?)$/)[3]; | |||||
this.form.repo_alias = repoValue; | |||||
getCheckRepoName({ owner: 'Itx003', q: repoValue }).then(res => { | |||||
const repo_name = res.data.name; | |||||
this.form.repo_name = repo_name; | |||||
this.form.repo_url = `${urlAdd}/${owner}/${repo_name}.git`; | |||||
}).catch(err => { | |||||
console.log(err); | |||||
this.form.repo_name = ''; | |||||
this.form.repo_url = ''; | |||||
}); | |||||
}, | |||||
changeAlias() { | |||||
const owner = 'Itx003'; | |||||
const aliasValue = this.form.repo_alias; | |||||
const urlAdd = location.href.split("/")[0] + "//" + location.href.split("/")[2]; | |||||
if (aliasValue && this.checkRepoAlias()) { | |||||
getCheckRepoName({ owner: 'Itx003', q: aliasValue }).then(res => { | |||||
const repo_name = res.data.name; | |||||
this.form.repo_name = repo_name; | |||||
this.form.repo_url = `${urlAdd}/${owner}/${repo_name}.git`; | |||||
}).catch(err => { | |||||
console.log(err); | |||||
this.form.repo_name = ''; | |||||
this.form.repo_url = ''; | |||||
}); | |||||
} else { | |||||
this.form.repo_name = ''; | |||||
this.form.repo_url = ''; | |||||
} | |||||
}, | |||||
changeRepoName() { | |||||
const owner = 'Itx003'; | |||||
const repo_name = this.form.repo_name; | |||||
const urlAdd = location.href.split("/")[0] + "//" + location.href.split("/")[2]; | |||||
if (this.checkRepoName()) { | |||||
this.form.repo_url = `${urlAdd}/${owner}/${repo_name}.git`; | |||||
} else { | |||||
this.form.repo_url = ''; | |||||
} | |||||
}, | |||||
searchTopics(query) { | |||||
if (query !== '') { | |||||
this.form.topicLoading = true; | |||||
getTopics({ q: query }).then(res => { | |||||
this.form.topicLoading = false; | |||||
const topics = res.data.topics || []; | |||||
this.topicsList = topics.map(item => { | |||||
return { | |||||
value: item.topic_name, | |||||
label: item.topic_name, | |||||
} | |||||
}); | |||||
}).catch(err => { | |||||
this.topicsList = []; | |||||
}); | |||||
} else { | |||||
this.topicsList = []; | |||||
} | |||||
}, | |||||
goSelectTechPrj() { | |||||
this.selectTechPrj = true; | |||||
}, | |||||
searchTechList() { | |||||
getTechs({ | |||||
no: this.form.tech_search_sel == '0' ? this.form.tech_search_keyword : '', | |||||
institution: this.form.tech_search_sel == '1' ? this.form.tech_search_keyword : '', | |||||
name: this.form.tech_search_sel == '2' ? this.form.tech_search_keyword : '', | |||||
}).then(res => { | |||||
console.log(res); | |||||
}).catch(err => { | |||||
console.log(err); | |||||
}) | |||||
}, | |||||
changeTableSelect(row) { | |||||
for (let i = 0, iLen = this.tableData.length; i < iLen; i++) { | |||||
this.tableData[i].selected = '0'; | |||||
} | |||||
row.selected = '1'; | |||||
this.$refs.tableRef.setCurrentRow(row); | |||||
}, | |||||
submit() { | |||||
console.log(this.form); | |||||
}, | |||||
cancel() { | |||||
window.history.back(); | |||||
} | |||||
}, | |||||
beforeMount() { | |||||
getCreateRepoUser().then(res => { | |||||
console.log(res); | |||||
}).catch(err => { | |||||
console.log(err); | |||||
}); | |||||
}, | |||||
mounted() { | |||||
}, | |||||
beforeDestroy() { }, | |||||
}; | |||||
</script> | |||||
<style scoped lang="less"> | |||||
.title { | |||||
text-align: center; | |||||
margin: 30px 0; | |||||
font-size: 14px; | |||||
color: rgb(16, 16, 16); | |||||
} | |||||
.form-c, | |||||
.form-select-tech-prj { | |||||
display: flex; | |||||
justify-content: center; | |||||
.form-wrap { | |||||
width: 1000px; | |||||
background: rgb(255, 255, 255); | |||||
border-color: rgb(212, 212, 213); | |||||
border-width: 1px; | |||||
border-style: solid; | |||||
border-radius: 5px; | |||||
box-sizing: border-box; | |||||
.form-header { | |||||
height: 45px; | |||||
background: rgb(240, 240, 240); | |||||
border-bottom: 1px solid rgb(212, 212, 213); | |||||
color: rgb(16, 16, 16); | |||||
padding-left: 16px; | |||||
font-size: 16px; | |||||
font-weight: 700; | |||||
display: flex; | |||||
align-items: center; | |||||
} | |||||
.form-content { | |||||
margin-top: 40px; | |||||
.form-row { | |||||
display: flex; | |||||
align-items: center; | |||||
width: 80%; | |||||
margin: 20px auto; | |||||
padding-right: 50px; | |||||
.row-label { | |||||
flex: 2; | |||||
text-align: right; | |||||
margin-right: 24px; | |||||
position: relative; | |||||
&.required { | |||||
&::after { | |||||
position: absolute; | |||||
top: -2px; | |||||
right: -10px; | |||||
content: '*'; | |||||
color: #db2828; | |||||
} | |||||
} | |||||
&.baseline { | |||||
align-self: baseline; | |||||
margin-top: 11px; | |||||
} | |||||
} | |||||
.row-content { | |||||
flex: 9; | |||||
.tips { | |||||
margin-top: 4px; | |||||
font-size: 14px; | |||||
color: rgb(136, 136, 136); | |||||
} | |||||
} | |||||
.reop-url-c { | |||||
display: flex; | |||||
align-items: center; | |||||
} | |||||
.openi-repo-url { | |||||
color: rgba(16, 16, 16, 1); | |||||
} | |||||
&.form-row-err { | |||||
.row-label { | |||||
color: #9f3a38; | |||||
} | |||||
/deep/ .el-input__inner:not([readonly="readonly"]) { | |||||
color: #9f3a38; | |||||
background: #fff6f6; | |||||
border-color: #e0b4b4; | |||||
} | |||||
} | |||||
} | |||||
.form-table { | |||||
margin-top: 30px; | |||||
margin-bottom: 30px; | |||||
/deep/ .el-table__header { | |||||
th { | |||||
background: rgb(249, 249, 249); | |||||
font-size: 12px; | |||||
color: rgb(136, 136, 136); | |||||
font-weight: normal; | |||||
} | |||||
} | |||||
/deep/ .el-table__body { | |||||
td { | |||||
font-size: 12px; | |||||
} | |||||
} | |||||
/deep/ .el-radio__label { | |||||
display: none; | |||||
} | |||||
} | |||||
.form-btn-group { | |||||
display: flex; | |||||
justify-content: center; | |||||
align-items: center; | |||||
margin: 30px 0 40px; | |||||
} | |||||
} | |||||
} | |||||
} | |||||
.btn { | |||||
color: rgb(2, 0, 4); | |||||
background-color: rgb(194, 199, 204); | |||||
border-color: rgb(194, 199, 204); | |||||
&.confirm-btn { | |||||
color: #fff; | |||||
background-color: rgb(56, 158, 13); | |||||
border-color: rgb(56, 158, 13); | |||||
margin-right: 20px; | |||||
} | |||||
} | |||||
</style> |
@@ -0,0 +1,17 @@ | |||||
import Vue from 'vue'; | |||||
import ElementUI from 'element-ui'; | |||||
import 'element-ui/lib/theme-chalk/index.css'; | |||||
import localeEn from 'element-ui/lib/locale/lang/en'; | |||||
import localeZh from 'element-ui/lib/locale/lang/zh-CN'; | |||||
import { i18n, lang } from '~/langs'; | |||||
import App from './index.vue'; | |||||
Vue.use(ElementUI, { | |||||
locale: lang === 'zh-CN' ? localeZh : localeEn, | |||||
size: 'small', | |||||
}); | |||||
new Vue({ | |||||
i18n, | |||||
render: (h) => h(App), | |||||
}).$mount('#__vue-root'); |
@@ -0,0 +1,92 @@ | |||||
<template> | |||||
<div> | |||||
<TopHeader :menu="1"></TopHeader> | |||||
<div class="ui container"> | |||||
<SearchBar :condition="condition" @changeCondition="changeCondition"></SearchBar> | |||||
<div class="conent-c"> | |||||
<div class="filter-c"> | |||||
<Filters :type="1" :condition="condition" @changeCondition="changeCondition"></Filters> | |||||
</div> | |||||
<div class="result-c"> | |||||
<PrjResultsList ref="resultListRef" :condition="condition"></PrjResultsList> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</template> | |||||
<script> | |||||
import TopHeader from '../components/TopHeader.vue'; | |||||
import SearchBar from '../components/SearchBar.vue'; | |||||
import Filters from '../components/Filters.vue'; | |||||
import PrjResultsList from '../components/PrjResultsList.vue'; | |||||
import { getUrlSearchParams } from '~/utils'; | |||||
export default { | |||||
data() { | |||||
return { | |||||
condition: { | |||||
q: '', // 搜索框 | |||||
topic: '', // 关键词 | |||||
project_name: '', // 项目类型 | |||||
institution_name: '', // 成果贡献单位 | |||||
page: '', | |||||
pageSize: '', | |||||
sort: '', | |||||
}, | |||||
pageSizes: [15, 30, 50, 100], | |||||
}; | |||||
}, | |||||
components: { | |||||
TopHeader, | |||||
SearchBar, | |||||
Filters, | |||||
PrjResultsList | |||||
}, | |||||
methods: { | |||||
changeCondition(params) { | |||||
this.condition = { | |||||
...this.condition, | |||||
...params, | |||||
}; | |||||
window.location.href = `/tech/repo_view?` + `q=${encodeURIComponent(this.condition.q.trim())}` + | |||||
`&topic=${encodeURIComponent(this.condition.topic)}` + | |||||
`&project_name=${encodeURIComponent(this.condition.project_name)}` + | |||||
`&institution_name=${encodeURIComponent(this.condition.institution_name)}` + | |||||
`&page=${encodeURIComponent(this.condition.page)}` + | |||||
`&pageSize=${encodeURIComponent(this.condition.pageSize)}` + | |||||
`&sort=${encodeURIComponent(this.condition.sort)}`; | |||||
}, | |||||
}, | |||||
beforeMount() { | |||||
const urlParams = getUrlSearchParams(); | |||||
this.condition.q = urlParams.q || ''; | |||||
this.condition.topic = urlParams.topic || ''; | |||||
this.condition.project_name = urlParams.project_name || ''; | |||||
this.condition.institution_name = urlParams.institution_name || ''; | |||||
this.condition.sort = urlParams.sort || ''; | |||||
this.condition.page = Number(urlParams.page) || 1; | |||||
this.condition.pageSize = this.pageSizes.indexOf(Number(urlParams.pageSize)) >= 0 ? Number(urlParams.pageSize) : 15; | |||||
}, | |||||
mounted() { }, | |||||
beforeDestroy() { }, | |||||
}; | |||||
</script> | |||||
<style scoped lang="less"> | |||||
.conent-c { | |||||
display: flex; | |||||
} | |||||
.filter-c { | |||||
flex: 1; | |||||
padding-left: 12px; | |||||
} | |||||
.result-c { | |||||
margin-left: 10px; | |||||
flex: 3; | |||||
} | |||||
</style> | |||||
@@ -0,0 +1,17 @@ | |||||
import Vue from 'vue'; | |||||
import ElementUI from 'element-ui'; | |||||
import 'element-ui/lib/theme-chalk/index.css'; | |||||
import localeEn from 'element-ui/lib/locale/lang/en'; | |||||
import localeZh from 'element-ui/lib/locale/lang/zh-CN'; | |||||
import { i18n, lang } from '~/langs'; | |||||
import App from './index.vue'; | |||||
Vue.use(ElementUI, { | |||||
locale: lang === 'zh-CN' ? localeZh : localeEn, | |||||
size: 'small', | |||||
}); | |||||
new Vue({ | |||||
i18n, | |||||
render: (h) => h(App), | |||||
}).$mount('#__vue-root'); |
@@ -0,0 +1,93 @@ | |||||
<template> | |||||
<div> | |||||
<TopHeader :menu="0"></TopHeader> | |||||
<div class="ui container"> | |||||
<SearchBar :condition="condition" @changeCondition="changeCondition"></SearchBar> | |||||
<div class="conent-c"> | |||||
<div class="filter-c"> | |||||
<Filters :type="0" :condition="condition" @changeCondition="changeCondition"></Filters> | |||||
</div> | |||||
<div class="result-c"> | |||||
<SciAndTechPrjList ref="resultListRef" :condition="condition"></SciAndTechPrjList> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</template> | |||||
<script> | |||||
import TopHeader from '../components/TopHeader.vue'; | |||||
import SearchBar from '../components/SearchBar.vue'; | |||||
import Filters from '../components/Filters.vue'; | |||||
import SciAndTechPrjList from '../components/SciAndTechPrjList.vue'; | |||||
import { getUrlSearchParams } from '~/utils'; | |||||
export default { | |||||
data() { | |||||
return { | |||||
condition: { | |||||
q: '', // 搜索框 | |||||
type_name: '', // 项目类型 | |||||
institution_name: '', // 项目参与单位 | |||||
execute_year: '', // 执行周期包含年份 | |||||
apply_year: '', | |||||
page: '', | |||||
pageSize: '', | |||||
sort: '', | |||||
}, | |||||
pageSizes: [15, 30, 50, 100], | |||||
}; | |||||
}, | |||||
components: { | |||||
TopHeader, | |||||
SearchBar, | |||||
Filters, | |||||
SciAndTechPrjList | |||||
}, | |||||
methods: { | |||||
changeCondition(params) { | |||||
this.condition = { | |||||
...this.condition, | |||||
...params, | |||||
}; | |||||
window.location.href = `/tech/tech_view?` + `q=${encodeURIComponent(this.condition.q.trim())}` + | |||||
`&type_name=${encodeURIComponent(this.condition.type_name)}` + | |||||
`&institution_name=${encodeURIComponent(this.condition.institution_name)}` + | |||||
`&execute_year=${encodeURIComponent(this.condition.execute_year)}` + | |||||
`&apply_year=${encodeURIComponent(this.condition.apply_year)}` + | |||||
`&page=${encodeURIComponent(this.condition.page)}` + | |||||
`&pageSize=${encodeURIComponent(this.condition.pageSize)}` + | |||||
`&sort=${encodeURIComponent(this.condition.sort)}`; | |||||
}, | |||||
}, | |||||
beforeMount() { | |||||
const urlParams = getUrlSearchParams(); | |||||
this.condition.q = urlParams.q || ''; | |||||
this.condition.type_name = urlParams.type_name || ''; | |||||
this.condition.institution_name = urlParams.institution_name || ''; | |||||
this.condition.execute_year = urlParams.execute_year || ''; | |||||
this.condition.apply_year = urlParams.apply_year || ''; | |||||
this.condition.sort = urlParams.sort || ''; | |||||
this.condition.page = Number(urlParams.page) || 1; | |||||
this.condition.pageSize = this.pageSizes.indexOf(Number(urlParams.pageSize)) >= 0 ? Number(urlParams.pageSize) : 15; | |||||
}, | |||||
mounted() { }, | |||||
beforeDestroy() { }, | |||||
}; | |||||
</script> | |||||
<style scoped lang="less"> | |||||
.conent-c { | |||||
display: flex; | |||||
} | |||||
.filter-c { | |||||
flex: 1; | |||||
padding-left: 12px; | |||||
} | |||||
.result-c { | |||||
margin-left: 10px; | |||||
flex: 3; | |||||
} | |||||
</style> |
@@ -0,0 +1,17 @@ | |||||
import Vue from 'vue'; | |||||
import ElementUI from 'element-ui'; | |||||
import 'element-ui/lib/theme-chalk/index.css'; | |||||
import localeEn from 'element-ui/lib/locale/lang/en'; | |||||
import localeZh from 'element-ui/lib/locale/lang/zh-CN'; | |||||
import { i18n, lang } from '~/langs'; | |||||
import App from './index.vue'; | |||||
Vue.use(ElementUI, { | |||||
locale: lang === 'zh-CN' ? localeZh : localeEn, | |||||
size: 'small', | |||||
}); | |||||
new Vue({ | |||||
i18n, | |||||
render: (h) => h(App), | |||||
}).$mount('#__vue-root'); |