diff --git a/web_src/vuepages/apis/modules/tech.js b/web_src/vuepages/apis/modules/tech.js
index 48dac70b2..679d4f9b6 100644
--- a/web_src/vuepages/apis/modules/tech.js
+++ b/web_src/vuepages/apis/modules/tech.js
@@ -16,6 +16,7 @@ export const setOpenIApply = (data) => {
url: '/api/v1/tech/openi',
method: 'post',
data: data,
+ params: {},
});
}
@@ -27,6 +28,7 @@ export const setNoOpenIApply = (data) => {
url: '/api/v1/tech/no_openi',
method: 'post',
data: data,
+ params: {},
});
}
@@ -34,7 +36,7 @@ export const setNoOpenIApply = (data) => {
// 返回 [{id:用户ID,name:用户名字,rel_avatar_link:用户图像地址,short_name:用户短名称},...]
export const getCreateRepoUser = () => {
return service({
- url: '/api/v1/create_repo/user',
+ url: '/api/v1/user/owners',
method: 'get',
params: {},
});
@@ -98,6 +100,7 @@ export const setTechAdminOperation = (data) => {
url: `/api/v1/tech/admin/action/${data.type}`,
method: 'post',
data: data.id,
+ params: {},
});
}
@@ -108,6 +111,7 @@ export const setTechImportExcel = () => {
url: `/api/v1/tech/basic`,
method: 'post',
data: {},
+ params: {},
});
}
@@ -119,6 +123,7 @@ export const setTechAdminAdd = (data) => {
url: '/api/v1/tech/admin_add',
method: 'post',
data: data,
+ params: {},
});
}
diff --git a/web_src/vuepages/pages/tech/adminview/index.vue b/web_src/vuepages/pages/tech/adminview/index.vue
index 8cd86ae7b..5bd1f7664 100644
--- a/web_src/vuepages/pages/tech/adminview/index.vue
+++ b/web_src/vuepages/pages/tech/adminview/index.vue
@@ -104,7 +104,7 @@ export default {
},
},
beforeMount() {
-
+ this.getData();
},
mounted() {
this.tableData = new Array(15).fill(0).map((item, index) => {
diff --git a/web_src/vuepages/pages/tech/components/Filters.vue b/web_src/vuepages/pages/tech/components/Filters.vue
index f9eb010e9..9fee2f288 100644
--- a/web_src/vuepages/pages/tech/components/Filters.vue
+++ b/web_src/vuepages/pages/tech/components/Filters.vue
@@ -150,7 +150,6 @@ export default {
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 || '';
@@ -169,31 +168,24 @@ export default {
} 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);
+ const data = res.data;
+ if (data) {
+ 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].map(item => item.toString());
+ filterItem.showData = filterItem.data.slice(0, max);
+ if (this.conds[key] && filterItem.showData.indexOf(this.conds[key]) < 0) {
+ filterItem.showData.push(this.conds[key]);
+ }
+ }
+ }
+ }
}).catch(err => {
console.log(err);
});
@@ -264,6 +256,8 @@ export default {
.filter-item-c {
display: flex;
flex-wrap: wrap;
+ max-height: 605px;
+ overflow-y: auto;
.filter-item {
border-radius: 3px;
diff --git a/web_src/vuepages/pages/tech/components/PrjResultsItem.vue b/web_src/vuepages/pages/tech/components/PrjResultsItem.vue
index 3f507a723..99974c162 100644
--- a/web_src/vuepages/pages/tech/components/PrjResultsItem.vue
+++ b/web_src/vuepages/pages/tech/components/PrjResultsItem.vue
@@ -2,26 +2,29 @@
-
- {{ data.Description }}
+
+ {{ data.description }}
@@ -40,9 +43,7 @@ export default {
},
components: {},
data() {
- return {
-
- };
+ return {};
},
methods: {
calcFromNow(unix) {
diff --git a/web_src/vuepages/pages/tech/components/PrjResultsList.vue b/web_src/vuepages/pages/tech/components/PrjResultsList.vue
index 8ec0fcc39..b2de37ed1 100644
--- a/web_src/vuepages/pages/tech/components/PrjResultsList.vue
+++ b/web_src/vuepages/pages/tech/components/PrjResultsList.vue
@@ -1,12 +1,19 @@
-
-
-
+
+
+
-
{{ $t('repos.noReposfound') }}
-
+
@@ -18,766 +25,18 @@
@@ -880,9 +120,35 @@ export default {
}
.no-data {
- height: 60px;
display: flex;
justify-content: center;
align-items: center;
+ padding: 0 12px;
+
+ .item-empty {
+ height: 180px;
+ width: 100%;
+ padding: 12px;
+ 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.06169646324801269%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");
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+
+ .item-empty-icon {
+ height: 80px;
+ width: 100%;
+ }
+
+ .item-empty-tips {
+ font-size: 16px;
+ color: rgb(16, 16, 16);
+ text-align: center;
+ margin-top: 2px;
+ }
+ }
}
diff --git a/web_src/vuepages/pages/tech/components/SciAndTechPrjItem.vue b/web_src/vuepages/pages/tech/components/SciAndTechPrjItem.vue
index 2e358baf2..d238688ab 100644
--- a/web_src/vuepages/pages/tech/components/SciAndTechPrjItem.vue
+++ b/web_src/vuepages/pages/tech/components/SciAndTechPrjItem.vue
@@ -2,11 +2,11 @@
diff --git a/web_src/vuepages/pages/tech/components/SciAndTechPrjList.vue b/web_src/vuepages/pages/tech/components/SciAndTechPrjList.vue
index e2cb0c7e2..575dfd856 100644
--- a/web_src/vuepages/pages/tech/components/SciAndTechPrjList.vue
+++ b/web_src/vuepages/pages/tech/components/SciAndTechPrjList.vue
@@ -4,9 +4,14 @@
-
{{ $t('repos.noReposfound') }}
+
-
+
@@ -18,766 +23,18 @@
@@ -877,9 +116,35 @@ export default {
}
.no-data {
- height: 60px;
display: flex;
justify-content: center;
align-items: center;
+ padding: 0 12px;
+
+ .item-empty {
+ height: 205px;
+ width: 100%;
+ padding: 12px;
+ 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.06169646324801269%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");
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+
+ .item-empty-icon {
+ height: 80px;
+ width: 100%;
+ }
+
+ .item-empty-tips {
+ font-size: 16px;
+ color: rgb(16, 16, 16);
+ text-align: center;
+ margin-top: 10px;
+ }
+ }
}
diff --git a/web_src/vuepages/pages/tech/components/SearchBar.vue b/web_src/vuepages/pages/tech/components/SearchBar.vue
index 07d84d8db..74025e1b8 100644
--- a/web_src/vuepages/pages/tech/components/SearchBar.vue
+++ b/web_src/vuepages/pages/tech/components/SearchBar.vue
@@ -3,7 +3,7 @@
@@ -28,22 +28,36 @@ import { getIsTechAdmin } from '~/apis/modules/tech';
export default {
name: "SearchBar",
props: {
+ type: { type: Number, default: -1 }, // 0-tech_view, 1-repo_view
condition: { type: Object, default: () => ({}) },
},
components: {},
data() {
return {
keyword: '',
- serchPlaceHolder: '搜索项目名称/简介',
+ serchPlaceHolder: '',
sortType: '',
- sortList: [{
- k: '1',
+ techSortList: [{
+ k: 'time',
v: '最近更新',
}, {
- k: '2',
+ k: 'count',
v: '项目成果数',
}],
- isTechAdmin: true,
+ repoSortList: [
+ {
+ k: 'mostpopular',
+ v: '近期热门',
+ }, {
+ k: 'recentupdate',
+ v: '最近更新',
+ }, {
+ k: 'newest',
+ v: '最近创建',
+ }
+ ],
+ sortList: [],
+ isTechAdmin: false,
};
},
methods: {
@@ -67,7 +81,6 @@ export default {
watch: {
condition: {
handler(newVal) {
- console.log('searchBar:watch:condition', newVal);
this.keyword = newVal.q;
this.sortType = newVal.sort;
},
@@ -76,8 +89,18 @@ export default {
},
},
beforeMount() {
+ if (this.type == 0) {
+ this.sortList = this.techSortList;
+ this.serchPlaceHolder = '搜索科技项目名称';
+ } else if (this.type == 1) {
+ this.serchPlaceHolder = '搜索项目名称/简介/标签';
+ this.sortList = this.repoSortList;
+ }
getIsTechAdmin().then(res => {
- console.log(res);
+ res = res.data;
+ if (res.data && res.data.is_admin) {
+ this.isTechAdmin = true;
+ }
}).catch(err => {
console.log(err);
});
diff --git a/web_src/vuepages/pages/tech/components/TopMenu.vue b/web_src/vuepages/pages/tech/components/TopMenu.vue
index aafbe0bac..de8d37088 100644
--- a/web_src/vuepages/pages/tech/components/TopMenu.vue
+++ b/web_src/vuepages/pages/tech/components/TopMenu.vue
@@ -39,7 +39,6 @@ export default {
},
methods: {
changeMenu(item, index) {
- if (this.focusIndex == index) return;
this.focusIndex = index;
window.location.href = item.url;
}
@@ -90,7 +89,6 @@ export default {
}
&.focused {
- cursor: default;
color: rgb(255, 255, 255);
background: rgba(249, 249, 249, 0.2);
}
diff --git a/web_src/vuepages/pages/tech/create/index.vue b/web_src/vuepages/pages/tech/create/index.vue
index 089fc7f65..0c6a1e232 100644
--- a/web_src/vuepages/pages/tech/create/index.vue
+++ b/web_src/vuepages/pages/tech/create/index.vue
@@ -14,10 +14,10 @@
非启智社区
-