选择课程等

dev_202207
yujialong 2 years ago
parent 423bb87fb1
commit 4d98052b9a
  1. 1
      README.md
  2. 6
      src/store/index.js
  3. 39
      src/views/course/AddCurriculum.vue
  4. 18
      src/views/match/list/index.vue
  5. 2
      src/views/match/manage/index.vue
  6. 6
      src/views/match/preview/index.vue

@ -0,0 +1 @@
# 中台前端

@ -22,7 +22,8 @@ const store = new Vuex.Store({
btns: [], btns: [],
routes: [], routes: [],
customerPage: 1, customerPage: 1,
matchPage: 1 matchPage: 1,
platformSource: 0
}, },
actions: { actions: {
setSystemId({ state,commit },systemId) { setSystemId({ state,commit },systemId) {
@ -87,6 +88,9 @@ const store = new Vuex.Store({
SET_M_PAGE: (state, page) => { SET_M_PAGE: (state, page) => {
state.matchPage = page state.matchPage = page
}, },
SET_M_SOURCE: (state, platformSource) => {
state.platformSource = platformSource
},
} }
}); });

@ -278,9 +278,9 @@
<el-input placeholder="请输入系统名称" prefix-icon="el-icon-search" v-model.trim="systemKeyword" clearable></el-input> <el-input placeholder="请输入系统名称" prefix-icon="el-icon-search" v-model.trim="systemKeyword" clearable></el-input>
<ul class="systems"> <ul class="systems">
<li v-for="(item, i) in systems" :key="i"> <li v-for="(item, i) in systems" :key="i" :title="item.systemName">
<el-checkbox v-model="item.check" @change="val => systemChange(val, item)"></el-checkbox> <el-checkbox v-model="item.check" @change="val => systemChange(val, item)"></el-checkbox>
<div class="name" @click="getProject(item)"> <div :class="['name', {active: curSystem == item.systemId}]" @click="getProject(item)">
<span>{{ item.systemName }}</span> <span>{{ item.systemName }}</span>
<i class="el-icon-arrow-right"></i> <i class="el-icon-arrow-right"></i>
</div> </div>
@ -296,7 +296,7 @@
<el-input placeholder="请输入项目名称" prefix-icon="el-icon-search" v-model.trim="projectKeyword" clearable></el-input> <el-input placeholder="请输入项目名称" prefix-icon="el-icon-search" v-model.trim="projectKeyword" clearable></el-input>
<ul class="systems"> <ul class="systems">
<li v-for="(item, i) in projects" :key="i"> <li v-for="(item, i) in projects" :key="i" :title="item.projectName">
<el-checkbox v-model="item.check" :label="item.projectName" @change="val => projectChange(val, item)"></el-checkbox> <el-checkbox v-model="item.check" :label="item.projectName" @change="val => projectChange(val, item)"></el-checkbox>
</li> </li>
</ul> </ul>
@ -308,20 +308,20 @@
<span>已选择项目{{ checkeds.length }}</span> <span>已选择项目{{ checkeds.length }}</span>
</div> </div>
<el-input style="width: 200px;margin-bottom: 20px;" placeholder="请输入项目名称" prefix-icon="el-icon-search" v-model.trim="checkedKeyword" clearable></el-input> <el-input style="width: 200px;margin-bottom: 20px;" placeholder="请输入项目名称" prefix-icon="el-icon-search" v-model.trim="checkedKeyword" clearable></el-input>
<el-table :data="checkeds" class="table" stripe header-align="center"> <el-table :data="checkeds" class="table" stripe header-align="center" max-height="470">
<el-table-column type="index" width="60" label="序号" align="center"></el-table-column> <el-table-column type="index" width="55" label="序号" align="center"></el-table-column>
<el-table-column prop="applicationName" label="系统名称" align="center"> <el-table-column prop="applicationName" label="系统名称" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ systemAll.find(e => e.systemId == scope.row.systemId).systemName }} {{ systemAll.find(e => e.systemId == scope.row.systemId).systemName }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="projectName" width="90" label="系统类型" align="center"> <el-table-column prop="projectName" width="80" label="系统类型" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.type }} {{ scope.row.type }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="projectName" label="项目名称" align="center"></el-table-column> <el-table-column prop="projectName" label="项目名称" align="center"></el-table-column>
<el-table-column label="操作" align="center" width="60"> <el-table-column label="操作" align="center" width="55">
<template slot-scope="scope"> <template slot-scope="scope">
<i class="el-icon-delete rm" @click="delProject(scope.$index)"></i> <i class="el-icon-delete rm" @click="delProject(scope.$index)"></i>
</template> </template>
@ -443,6 +443,7 @@ export default {
systemAll: [], systemAll: [],
systems: [], systems: [],
systemChecked: [], systemChecked: [],
curSystem: '',
projects: [], projects: [],
projectAll: [], projectAll: [],
projectKeyword: '', projectKeyword: '',
@ -625,6 +626,7 @@ export default {
getProject(item) { getProject(item) {
const { check } = item // const { check } = item //
const checked = this.permissions ? this.assessmentData : this.practiceData 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.$get(`${this.api.getInternalProjectBySystemId}?permissions=${this.permissions}&systemId=${item.systemId}`).then(res => {
this.projectAll = JSON.parse(JSON.stringify(res)) // this.projectAll = JSON.parse(JSON.stringify(res)) //
const result = [] const result = []
@ -964,17 +966,19 @@ $avatar-width: 104px;
margin-bottom: 15px; margin-bottom: 15px;
} }
.item { .item {
width: 250px;
max-height: 600px; max-height: 600px;
padding: 10px;
margin-right: 20px; margin-right: 20px;
overflow: auto; overflow: hidden;
} }
.system { .system {
width: 280px;
padding: 10px;
background-color: #f9f9f9; background-color: #f9f9f9;
} }
.systems { .systems {
margin-top: 10px; margin-top: 10px;
max-height: 550px;
overflow: auto;
li { li {
display: flex; display: flex;
align-items: center; align-items: center;
@ -987,16 +991,23 @@ $avatar-width: 104px;
align-items: center; align-items: center;
margin-left: 5px; margin-left: 5px;
cursor: pointer; cursor: pointer;
&:hover { &.active, &:hover {
color: #9076FF; color: #9076FF;
} }
span {
max-width: 200px;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
} }
} }
.project {
width: 350px;
}
.checked { .checked {
flex: 1; flex: 1;
width: auto;
.el-table .cell {
font-size: 12px;
}
} }
.rm { .rm {
font-size: 14px; font-size: 14px;

@ -28,13 +28,13 @@
<ul class="filter"> <ul class="filter">
<li> <li>
<label>大赛来源</label> <label>大赛来源</label>
<el-select v-model="form.platformSource" clearable @change="getData"> <el-select v-model="form.platformSource" clearable @change="sourceChange">
<el-option v-for="(item, i) in sourceList" :key="i" :label="item.name" :value="item.id"></el-option> <el-option v-for="(item, i) in sourceList" :key="i" :label="item.name" :value="item.id"></el-option>
</el-select> </el-select>
</li> </li>
<li> <li>
<label>大赛范围</label> <label>大赛范围</label>
<el-select v-model="form.competitionScope" clearable @change="getData"> <el-select v-model="form.competitionScope" clearable @change="initData">
<el-option v-for="(item, i) in rangeList" :key="i" :label="item.name" :value="item.id"></el-option> <el-option v-for="(item, i) in rangeList" :key="i" :label="item.name" :value="item.id"></el-option>
</el-select> </el-select>
</li> </li>
@ -147,7 +147,7 @@ export default {
publishStatus: "", publishStatus: "",
startTime: "", startTime: "",
endTime: "", endTime: "",
platformSource: 0, // (01) platformSource: +this.$route.query.platformSource || 0, // (01)
competitionScope: '', // (0: 1: 2.) competitionScope: '', // (0: 1: 2.)
}, },
multipleSelection: [], multipleSelection: [],
@ -251,6 +251,18 @@ export default {
this.$refs.table.clearSelection(); this.$refs.table.clearSelection();
this.initData(); 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) { delData(row) {
this.$confirm("此删除操作不可逆,是否确认删除选中项?", "提示", { this.$confirm("此删除操作不可逆,是否确认删除选中项?", "提示", {
type: "warning" type: "warning"

@ -95,7 +95,7 @@ export default {
}, },
// //
backPage(){ 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 // tab
tabSwitch(i) { tabSwitch(i) {

@ -136,7 +136,11 @@ export default {
// //
getNotice() { getNotice() {
this.$post(`${this.api.queryAnnouncementByContestId}?pageNum=1&pageSize=1000&contestId=${this.form.id}`).then(({ data }) => { 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(/<img.*?(?:>|\/>)/gi, '')
})
this.notices = records
}).catch(res => {}) }).catch(res => {})
}, },
// //

Loading…
Cancel
Save