From 4d98052b9a014c202469625cf9848a05ae6e7645 Mon Sep 17 00:00:00 2001
From: yujialong <479214531@qq.com>
Date: Mon, 25 Jul 2022 17:54:24 +0800
Subject: [PATCH] =?UTF-8?q?=E9=80=89=E6=8B=A9=E8=AF=BE=E7=A8=8B=E7=AD=89?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
README.md | 1 +
src/store/index.js | 6 ++++-
src/views/course/AddCurriculum.vue | 39 +++++++++++++++++++-----------
src/views/match/list/index.vue | 18 +++++++++++---
src/views/match/manage/index.vue | 2 +-
src/views/match/preview/index.vue | 6 ++++-
6 files changed, 52 insertions(+), 20 deletions(-)
create mode 100644 README.md
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..767e6f9
--- /dev/null
+++ b/README.md
@@ -0,0 +1 @@
+# 中台前端
\ No newline at end of file
diff --git a/src/store/index.js b/src/store/index.js
index d3b1c2b..acd9371 100644
--- a/src/store/index.js
+++ b/src/store/index.js
@@ -22,7 +22,8 @@ const store = new Vuex.Store({
btns: [],
routes: [],
customerPage: 1,
- matchPage: 1
+ matchPage: 1,
+ platformSource: 0
},
actions: {
setSystemId({ state,commit },systemId) {
@@ -87,6 +88,9 @@ const store = new Vuex.Store({
SET_M_PAGE: (state, page) => {
state.matchPage = page
},
+ SET_M_SOURCE: (state, platformSource) => {
+ state.platformSource = platformSource
+ },
}
});
diff --git a/src/views/course/AddCurriculum.vue b/src/views/course/AddCurriculum.vue
index 3f579b4..19b015b 100644
--- a/src/views/course/AddCurriculum.vue
+++ b/src/views/course/AddCurriculum.vue
@@ -278,9 +278,9 @@
- -
+
-
systemChange(val, item)">
-
+
{{ item.systemName }}
@@ -296,7 +296,7 @@
- -
+
-
projectChange(val, item)">
@@ -308,20 +308,20 @@
已选择项目({{ checkeds.length }}个)
-
-
+
+
{{ systemAll.find(e => e.systemId == scope.row.systemId).systemName }}
-
+
{{ scope.row.type }}
-
+
@@ -443,6 +443,7 @@ export default {
systemAll: [],
systems: [],
systemChecked: [],
+ curSystem: '',
projects: [],
projectAll: [],
projectKeyword: '',
@@ -625,6 +626,7 @@ export default {
getProject(item) {
const { check } = item // 项目选中状态跟随系统
const checked = this.permissions ? this.assessmentData : this.practiceData
+ this.curSystem = item.systemId
this.$get(`${this.api.getInternalProjectBySystemId}?permissions=${this.permissions}&systemId=${item.systemId}`).then(res => {
this.projectAll = JSON.parse(JSON.stringify(res)) // 全部项目,另外保存
const result = []
@@ -964,17 +966,19 @@ $avatar-width: 104px;
margin-bottom: 15px;
}
.item {
+ width: 250px;
max-height: 600px;
+ padding: 10px;
margin-right: 20px;
- overflow: auto;
+ overflow: hidden;
}
.system {
- width: 280px;
- padding: 10px;
background-color: #f9f9f9;
}
.systems {
margin-top: 10px;
+ max-height: 550px;
+ overflow: auto;
li {
display: flex;
align-items: center;
@@ -987,16 +991,23 @@ $avatar-width: 104px;
align-items: center;
margin-left: 5px;
cursor: pointer;
- &:hover {
+ &.active, &:hover {
color: #9076FF;
}
+ span {
+ max-width: 200px;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ overflow: hidden;
+ }
}
}
- .project {
- width: 350px;
- }
.checked {
flex: 1;
+ width: auto;
+ .el-table .cell {
+ font-size: 12px;
+ }
}
.rm {
font-size: 14px;
diff --git a/src/views/match/list/index.vue b/src/views/match/list/index.vue
index a782b13..60fd639 100644
--- a/src/views/match/list/index.vue
+++ b/src/views/match/list/index.vue
@@ -28,13 +28,13 @@
-
-
+
-
-
+
@@ -147,7 +147,7 @@ export default {
publishStatus: "",
startTime: "",
endTime: "",
- platformSource: 0, // 大赛来源(0中台,1职站)
+ platformSource: +this.$route.query.platformSource || 0, // 大赛来源(0中台,1职站)
competitionScope: '', // 大赛范围(0:本校内 1:全平台 2.指定区域、院校)
},
multipleSelection: [],
@@ -251,6 +251,18 @@ export default {
this.$refs.table.clearSelection();
this.initData();
},
+ // 大赛来源回调
+ sourceChange(val) {
+ this.$router.push({
+ path: '/match',
+ query: {
+ ...this.$route.query,
+ platformSource: val
+ }
+ })
+ this.$store.commit('SET_M_SOURCE', val)
+ this.initData()
+ },
delData(row) {
this.$confirm("此删除操作不可逆,是否确认删除选中项?", "提示", {
type: "warning"
diff --git a/src/views/match/manage/index.vue b/src/views/match/manage/index.vue
index d5efdcd..22cfa5a 100644
--- a/src/views/match/manage/index.vue
+++ b/src/views/match/manage/index.vue
@@ -95,7 +95,7 @@ export default {
},
// 返回列表
backPage(){
- this.$router.push(`/match?page=${this.$store.state.matchPage}`)
+ this.$router.push(`/match?page=${this.$store.state.matchPage}&platformSource=${this.$store.state.platformSource}`)
},
// tab切换
tabSwitch(i) {
diff --git a/src/views/match/preview/index.vue b/src/views/match/preview/index.vue
index 207d0b9..29e1408 100644
--- a/src/views/match/preview/index.vue
+++ b/src/views/match/preview/index.vue
@@ -136,7 +136,11 @@ export default {
// 公告列表
getNotice() {
this.$post(`${this.api.queryAnnouncementByContestId}?pageNum=1&pageSize=1000&contestId=${this.form.id}`).then(({ data }) => {
- this.notices = data.records.filter(e => e.status) // 只显示已发布的(status 0草稿 1为已发布)
+ const records = data.records.filter(e => e.status) // 只显示已发布的(status 0草稿 1为已发布)
+ records.map(e => {
+ e.announcementText = e.announcementText.replace(/|\/>)/gi, '')
+ })
+ this.notices = records
}).catch(res => {})
},
// 预览附件