Revert "Revert "全站添加筛选功能缓存""

This reverts commit 7d969302d8.
master V2.3.5
yujialong 7 months ago
parent 7d969302d8
commit 7d038719a5
  1. 2
      public/index.html
  2. 11
      src/pages/achievement/info/course.vue
  3. 34
      src/pages/achievement/info/project.vue
  4. 31
      src/pages/achievement/list/course.vue
  5. 126
      src/pages/achievement/list/project.vue
  6. 8
      src/pages/activity/details/index.vue
  7. 47
      src/pages/activity/list/index.vue
  8. 8
      src/pages/activity/manage/add/index.vue
  9. 39
      src/pages/activity/manage/list/index.vue
  10. 14
      src/pages/activity/manage/manage/index.vue
  11. 20
      src/pages/activity/manage/manage/notice.vue
  12. 7
      src/pages/assessment/add/index.vue
  13. 53
      src/pages/assessment/list/index.vue
  14. 43
      src/pages/course/list/courseManagement/index.vue
  15. 5
      src/pages/expSystem/backstage/index.vue
  16. 9
      src/pages/expSystem/backstage/model.vue
  17. 9
      src/pages/expSystem/backstage/sourceModel.vue
  18. 47
      src/pages/expSystem/list/index.vue
  19. 432
      src/pages/information/contentManage/contentList.vue
  20. 1
      src/pages/information/contentManage/index.vue
  21. 4
      src/pages/match/add/index.vue
  22. 44
      src/pages/match/list/index.vue
  23. 4
      src/pages/match/manage/index.vue
  24. 2
      src/pages/match/manage/matchArch.vue
  25. 28
      src/pages/match/manage/matchArchList.vue
  26. 28
      src/pages/match/manage/matchRank.vue
  27. 32
      src/pages/match/manage/matchSignup.vue
  28. 15
      src/pages/match/manage/notice.vue
  29. 22
      src/pages/product/list/index.vue
  30. 9
      src/pages/product/show/index.vue
  31. 15
      src/pages/project/add/index.vue
  32. 89
      src/pages/project/list/index.vue
  33. 8
      src/pages/station/list/index.vue
  34. 2
      src/pages/station/preview/index.vue
  35. 2
      src/setting.js
  36. 2
      src/store/modules/achievement.js
  37. 10
      src/store/modules/activity.js
  38. 17
      src/store/modules/assessment.js
  39. 25
      src/store/modules/expSystem.js
  40. 12
      src/store/modules/match.js
  41. 17
      src/store/modules/product.js
  42. 9
      src/store/modules/project.js

@ -10,7 +10,7 @@
var _hmt = _hmt || []; var _hmt = _hmt || [];
(function() { (function() {
var hm = document.createElement('script'); var hm = document.createElement('script');
hm.src = 'https://hm.baidu.com/hm.js?72fbad6ebf1d6c705117fe8fe0686a0e'; hm.src = 'https://hm.baidu.com/hm.js?e4d7deeca2d6ea71d2bd5fa2365bc654';
var s = document.getElementsByTagName('script')[0]; var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(hm, s); s.parentNode.insertBefore(hm, s);
})(); })();

@ -302,7 +302,7 @@ export default {
listDataAll: [], listDataAll: [],
listData: [], listData: [],
multipleSelection: [], multipleSelection: [],
page: 1, page: +this.$route.query.page || 1,
pageSize: 10, pageSize: 10,
total: 0, total: 0,
peopleNum: 0, // peopleNum: 0, //
@ -501,6 +501,13 @@ export default {
this.multipleSelection = val; this.multipleSelection = val;
}, },
handleCurrentChange (val) { // handleCurrentChange (val) { //
this.$router.push({
path: 'course',
query: {
...this.$route.query,
page: this.val
}
})
this.page = val this.page = val
this.getData(); this.getData();
}, },
@ -699,7 +706,7 @@ export default {
echarts.init(document.querySelector(`#chart1`)).setOption(option) echarts.init(document.querySelector(`#chart1`)).setOption(option)
}, },
back () { back () {
location.href = this.$store.state.achievement.referrer this.$router.push(this.$store.state.achievement.referrer)
}, },
} }
}; };

@ -76,7 +76,7 @@
<div class="flex-between m-b-10"> <div class="flex-between m-b-10">
<div> <div>
<el-tabs v-model="curTab" <el-tabs v-model="curTab"
@tab-click="initData"> @tab-click="tabChange">
<el-tab-pane v-for="(item) in tabs" <el-tab-pane v-for="(item) in tabs"
:label="item.name" :label="item.name"
:name="item.id" :name="item.id"
@ -297,7 +297,7 @@ export default {
listDataAll: [], listDataAll: [],
listData: [], listData: [],
multipleSelection: [], multipleSelection: [],
page: 1, page: +this.$route.query.page || 1,
pageSize: 10, pageSize: 10,
total: 0, total: 0,
examCount: 0, examCount: 0,
@ -309,7 +309,7 @@ export default {
max: {}, max: {},
min: {}, min: {},
token: util.local.get(Setting.tokenKey), token: util.local.get(Setting.tokenKey),
curTab: '0', curTab: this.$route.query.curTab || '0',
tabs: [ tabs: [
{ {
id: '0', id: '0',
@ -318,7 +318,7 @@ export default {
], ],
activations: [], activations: [],
multipleSelectionActivation: [], multipleSelectionActivation: [],
pageActivation: 1, pageActivation: +this.$route.query.pageActivation || 1,
pageSizeActivation: 10, pageSizeActivation: 10,
totalActivation: 0, totalActivation: 0,
loading: false, loading: false,
@ -402,6 +402,16 @@ export default {
this.pageActivation = 1 this.pageActivation = 1
this.curTab == 0 ? this.getData() : this.getActivity() this.curTab == 0 ? this.getData() : this.getActivity()
}, },
tabChange () {
this.$router.push({
path: 'project',
query: {
...this.$route.query,
curTab: this.curTab
}
})
this.initData()
},
// //
show (row) { show (row) {
this.$store.commit('achievement/setRow', null) this.$store.commit('achievement/setRow', null)
@ -493,6 +503,13 @@ export default {
this.multipleSelection = val; this.multipleSelection = val;
}, },
handleCurrentChange (val) { // handleCurrentChange (val) { //
this.$router.push({
path: 'project',
query: {
...this.$route.query,
page: val
}
})
this.page = val; this.page = val;
this.getData(); this.getData();
}, },
@ -501,6 +518,13 @@ export default {
this.multipleSelectionActivation = val; this.multipleSelectionActivation = val;
}, },
handleCurrentActivationChange (val) { // handleCurrentActivationChange (val) { //
this.$router.push({
path: 'project',
query: {
...this.$route.query,
pageActivation: val
}
})
this.pageActivation = val; this.pageActivation = val;
this.getData(); this.getData();
}, },
@ -674,7 +698,7 @@ export default {
if (this.$route.query.fromCourse) { if (this.$route.query.fromCourse) {
this.$router.back() this.$router.back()
} else { } else {
location.href = this.$store.state.achievement.referrer this.$router.push(this.$store.state.achievement.referrer)
} }
}, },
} }

@ -4,32 +4,6 @@
<h6 class="p-title">筛选</h6> <h6 class="p-title">筛选</h6>
<div class="tool mul"> <div class="tool mul">
<ul class="filter"> <ul class="filter">
<!-- <li>
<label>课程</label>
<el-select v-model="mallId"
@change="initData">
<el-option label="不限"
value=""></el-option>
<el-option v-for="(item, i) in curs"
:key="i"
:label="item.curriculumName"
:value="item.mallId"
@change="curChange"></el-option>
</el-select>
</li>
<li>
<label>班级</label>
<el-select v-model="classId"
@change="classChange">
<el-option label="不限"
value=""></el-option>
<el-option v-for="item in classList"
:key="item.id"
:label="item.className"
:value="item.id">
</el-option>
</el-select>
</li> -->
<li> <li>
<el-input placeholder="请输入课程名称" <el-input placeholder="请输入课程名称"
prefix-icon="el-icon-search" prefix-icon="el-icon-search"
@ -102,7 +76,6 @@ export default {
classList: [], classList: [],
mallId: this.$route.query.mallId ? +this.$route.query.mallId : '', mallId: this.$route.query.mallId ? +this.$route.query.mallId : '',
curriculumList: [], curriculumList: [],
projectPermissions: this.$route.query.per ? +this.$route.query.per : 0,
mallIds: [], mallIds: [],
curs: [], curs: [],
keyword: this.$route.query.keyword || '', keyword: this.$route.query.keyword || '',
@ -134,7 +107,7 @@ export default {
} }
], ],
date: "", date: "",
page: this.$route.query.page ? +this.$route.query.page : 1, page: +this.$route.query.page || 1,
pageSize: 10, pageSize: 10,
total: 0, total: 0,
loading: false, loading: false,
@ -261,7 +234,7 @@ export default {
}, },
// //
entry (row) { entry (row) {
this.$store.commit('achievement/setReferrer', location.href) this.$store.commit('achievement/setReferrer', this.$route.fullPath)
this.$router.push(`course?id=${row.mallId}&curriculumName=${row.curriculumName}&cid=${row.cid}`) this.$router.push(`course?id=${row.mallId}&curriculumName=${row.curriculumName}&cid=${row.cid}`)
}, },
handleCurrentChange (val) { // handleCurrentChange (val) { //

@ -4,10 +4,10 @@
<h6 class="p-title">筛选</h6> <h6 class="p-title">筛选</h6>
<div class="tool mul"> <div class="tool mul">
<ul class="filter"> <ul class="filter">
<li v-if="projectPermissions"> <li v-if="form.permissions">
<label>时间</label> <label>时间</label>
<el-radio-group v-model="month" <el-radio-group v-model="form.month"
@change="initData"> @change="monthChange">
<el-radio v-for="(item,index) in dateList" <el-radio v-for="(item,index) in dateList"
:key="index" :key="index"
:label="item.id" :label="item.id"
@ -28,7 +28,7 @@
</li> </li>
<li> <li>
<label>实验项目分类</label> <label>实验项目分类</label>
<el-radio-group v-model="projectPermissions" <el-radio-group v-model="form.permissions"
@change="perChange"> @change="perChange">
<el-radio v-for="(item,index) in projectType" <el-radio v-for="(item,index) in projectType"
:key="index" :key="index"
@ -36,9 +36,9 @@
border>{{ item.name }}</el-radio> border>{{ item.name }}</el-radio>
</el-radio-group> </el-radio-group>
</li> </li>
<li v-show="projectPermissions === 1"> <li v-show="form.permissions === 1">
<label>班级</label> <label>班级</label>
<el-select v-model="classId" <el-select v-model="form.classId"
clearable clearable
@change="classChange"> @change="classChange">
<el-option v-for="item in classList" <el-option v-for="item in classList"
@ -50,8 +50,8 @@
</li> </li>
<li> <li>
<label>课程</label> <label>课程</label>
<el-select v-model="mallId" <el-select v-model="form.mallId"
@change="initData"> @change="mallIdChange">
<el-option v-for="(item, i) in curs" <el-option v-for="(item, i) in curs"
:key="i" :key="i"
:label="item.curriculumName" :label="item.curriculumName"
@ -62,7 +62,7 @@
<li> <li>
<el-input placeholder="请输入考核或项目名称" <el-input placeholder="请输入考核或项目名称"
prefix-icon="el-icon-search" prefix-icon="el-icon-search"
v-model="keyword" v-model="form.keyWord"
clearable></el-input> clearable></el-input>
</li> </li>
</ul> </ul>
@ -95,7 +95,7 @@
{{ scope.$index + (page - 1) * pageSize + 1 }} {{ scope.$index + (page - 1) * pageSize + 1 }}
</template> </template>
</el-table-column> </el-table-column>
<template v-if="projectPermissions == 1"> <template v-if="form.permissions == 1">
<el-table-column prop="className" <el-table-column prop="className"
label="实验班级" label="实验班级"
align="center" align="center"
@ -118,21 +118,21 @@
align="center" align="center"
width="100"> width="100">
<template slot-scope="scope"> <template slot-scope="scope">
{{ projectPermissions ? '考核' : '练习' }} {{ form.permissions ? '考核' : '练习' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="experimentalNumber" <el-table-column prop="experimentalNumber"
label="成绩报告数量" label="成绩报告数量"
align="center" align="center"
:width="projectPermissions ? 120 : 230"></el-table-column> :width="form.permissions ? 120 : 230"></el-table-column>
<el-table-column prop="createTime" <el-table-column prop="createTime"
label="创建时间" label="创建时间"
align="center" align="center"
:width="projectPermissions ? 160 : 230"> :width="form.permissions ? 160 : 230">
</el-table-column> </el-table-column>
<el-table-column label="操作" <el-table-column label="操作"
align="center" align="center"
:width="projectPermissions ? 150 : 230"> :width="form.permissions ? 150 : 230">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button v-auth="'练习成绩管理'" <el-button v-auth="'练习成绩管理'"
type="text" type="text"
@ -164,18 +164,20 @@ export default {
name: "achievement", name: "achievement",
data () { data () {
return { return {
classId: this.$route.query.class ? +this.$route.query.class : '', form: {
classId: this.$route.query.class ? +this.$route.query.class : '',
mallId: +this.$route.query.mallId || '',
permissions: this.$route.query.permissions ? +this.$route.query.permissions : 0,
month: +this.$route.query.month || '',
startTime: +this.$route.query.startTime || '',
endTime: +this.$route.query.endTime || '',
keyWord: this.$route.query.keyWord || '',
},
classList: [], classList: [],
mallId: this.$route.query.mallId ? +this.$route.query.mallId : '',
curriculumList: [], curriculumList: [],
projectPermissions: this.$route.query.per ? +this.$route.query.per : 0,
mallIds: [], mallIds: [],
curs: [], curs: [],
keyword: this.$route.query.keyword || '',
searchTimer: null, searchTimer: null,
startingtime: "",
endTime: "",
month: "",
listData: [], listData: [],
multipleSelection: [], multipleSelection: [],
dateList: [ dateList: [
@ -200,14 +202,14 @@ export default {
} }
], ],
date: "", date: "",
page: this.$route.query.page ? +this.$route.query.page : 1, page: +this.$route.query.page || 1,
pageSize: 10, pageSize: 10,
total: 0, total: 0,
loading: false, loading: false,
}; };
}, },
watch: { watch: {
month: function (val) { 'form.month': function (val) {
if (val) { if (val) {
let unit = 24 * 60 * 60 * 1000; let unit = 24 * 60 * 60 * 1000;
this.date = [util.formatDate("yyyy-MM-dd", new Date(new Date().getTime() - unit * 30 * val)), util.formatDate("yyyy-MM-dd", new Date(new Date().getTime() + unit))]; this.date = [util.formatDate("yyyy-MM-dd", new Date(new Date().getTime() - unit * 30 * val)), util.formatDate("yyyy-MM-dd", new Date(new Date().getTime() + unit))];
@ -217,24 +219,23 @@ export default {
}, },
date: function (val) { date: function (val) {
if (val) { if (val) {
this.startingtime = val[0]; this.form.startTime = val[0];
this.endTime = val[1]; this.form.endTime = val[1];
} else { } else {
this.startingtime = ""; this.form.startTime = ''
this.endTime = ""; this.form.endTime = ''
this.month = ''; this.form.month = '';
} }
this.initData(); this.initData();
}, },
keyword: function (val) { 'form.keyWord': function (val) {
clearTimeout(this.searchTimer); clearTimeout(this.searchTimer);
this.searchTimer = setTimeout(() => { this.searchTimer = setTimeout(() => {
this.$router.push({ this.$router.push({
path: 'list', path: 'list',
query: { query: {
...this.$route.query, ...this.$route.query,
keyword: val, keyWord: val,
page: 1
} }
}) })
this.initData(); this.initData();
@ -247,14 +248,14 @@ export default {
}, },
methods: { methods: {
pickerInput () { pickerInput () {
this.month = '6' this.form.month = '6'
}, },
// //
async getCourse () { async getCourse () {
const { data } = await this.$get(this.api.getSchoolEffectiveCourse) const { data } = await this.$get(this.api.getSchoolEffectiveCourse)
this.curs = data this.curs = data
this.mallId = this.mallId || data[0].mallId this.form.mallId = this.form.mallId || data[0].mallId
this.getData(); this.getData();
}, },
// //
@ -276,25 +277,18 @@ export default {
}, },
getData () { getData () {
this.loading = true this.loading = true
const per = this.projectPermissions const { mallId, permissions } = this.form
const { mallId } = this
const cur = this.curs.find(e => e.mallId == mallId) || {} const cur = this.curs.find(e => e.mallId == mallId) || {}
let data = { let data = {
classId: this.classId, ...this.form,
permissions: per,
curriculumId: cur.cid, curriculumId: cur.cid,
mallId, systemId: cur.systemId,
keyWord: this.keyword,
startTime: this.startingtime,
endTime: this.endTime,
month: this.month,
pageNum: this.page, pageNum: this.page,
pageSize: this.pageSize, pageSize: this.pageSize,
systemId: cur.systemId
}; };
this.$post(this.api.getAchievementInfo, data).then(res => { this.$post(this.api.getAchievementInfo, data).then(res => {
let list = [] let list = []
if (per == 0) { if (permissions == 0) {
list = res.page list = res.page
this.total = res.total this.total = res.total
} else { } else {
@ -303,7 +297,7 @@ export default {
} }
list.map(e => { list.map(e => {
// isAdmin1 isdel=1courseDel=1 (1. 2.3)isAdmin0isDel1 // isAdmin1 isdel=1courseDel=1 (1. 2.3)isAdmin0isDel1
e.canDel = per ? e.canDel = permissions ?
e.isDel : e.isDel :
(e.isAdmin === 0 && e.isDel === 1) || (e.isAdmin === 1 && e.isDel === 1 && e.courseDel === 1) (e.isAdmin === 0 && e.isDel === 1) || (e.isAdmin === 1 && e.isDel === 1 && e.courseDel === 1)
}) })
@ -315,16 +309,26 @@ export default {
this.loading = false this.loading = false
}); });
}, },
monthChange () {
this.$router.push({
path: 'list',
query: {
...this.$route.query,
month: val
}
})
this.initData()
},
// //
perChange (val) { perChange (val) {
this.$router.push({ this.$router.push({
path: 'list', path: 'list',
query: { query: {
...this.$route.query, ...this.$route.query,
per: val permissions: val
} }
}) })
this.getData() this.initData()
}, },
// //
classChange (val) { classChange (val) {
@ -332,45 +336,45 @@ export default {
path: 'list', path: 'list',
query: { query: {
...this.$route.query, ...this.$route.query,
class: val classId: val
} }
}) })
this.getData() this.initData()
}, },
// //
curriculumChange (val) { mallIdChange (val) {
this.$router.push({ this.$router.push({
path: 'list', path: 'list',
query: { query: {
...this.$route.query, ...this.$route.query,
curriculum: val mallId: val
} }
}) })
this.getData() this.initData()
}, },
initData () { initData () {
this.$refs.table.clearSelection(); this.$refs.table.clearSelection();
this.page = 1; this.page = 1;
this.getData(); this.getData();
}, },
disabledSelection (row, index) { // disabledSelection (row) { //
if (row.canDel) return true if (row.canDel) return true
return false return false
}, },
// //
entry (row) { entry (row) {
this.$store.commit('achievement/setReferrer', location.href) this.$store.commit('achievement/setReferrer', this.$route.fullPath)
this.$router.push(`project?id=${row.assessmentId || row.projectId}&projectName=${row.projectName}&permissions=${row.permissions || 0}&mallId=${this.mallId}&classId=${row.classId || ''}`) this.$router.push(`project?id=${row.assessmentId || row.projectId}&projectName=${row.projectName}&permissions=${row.permissions || 0}&mallId=${this.form.mallId}&classId=${row.classId || ''}`)
}, },
handleDelete (row) { // handleDelete (row) { //
this.$confirm("该项目下的所有成绩报告将会删除,是否继续?", "提示", { this.$confirm("该项目下的所有成绩报告将会删除,是否继续?", "提示", {
type: "warning" type: "warning"
}).then(() => { }).then(() => {
let url = ""; let url = "";
if (this.projectPermissions === 0) { if (this.form.permissions === 0) {
url = `${this.api.deleteReportById}?ids=&projectIds=${row.projectId}&projectPermissions=${this.projectPermissions}`; url = `${this.api.deleteReportById}?ids=&projectIds=${row.projectId}&projectPermissions=${this.form.permissions}`;
} else { } else {
url = `${this.api.deleteReportById}?ids=${row.assessmentId}&projectIds=${row.projectId}&projectPermissions=${this.projectPermissions}`; url = `${this.api.deleteReportById}?ids=${row.assessmentId}&projectIds=${row.projectId}&projectPermissions=${this.form.permissions}`;
} }
this.$get(url).then(res => { this.$get(url).then(res => {
util.successMsg("删除成功"); util.successMsg("删除成功");
@ -390,10 +394,10 @@ export default {
ids = this.multipleSelection.map(item => item.assessmentId); ids = this.multipleSelection.map(item => item.assessmentId);
let projectIds = []; let projectIds = [];
projectIds = this.multipleSelection.map(item => item.projectId); projectIds = this.multipleSelection.map(item => item.projectId);
if (this.projectPermissions === 0) { if (this.form.permissions === 0) {
url = `${this.api.deleteReportById}?ids=&projectIds=${projectIds.toString()}&projectPermissions=${this.projectPermissions}` url = `${this.api.deleteReportById}?ids=&projectIds=${projectIds.toString()}&projectPermissions=${this.form.permissions}`
} else { } else {
url = `${this.api.deleteReportById}?ids=${ids.toString()}&projectIds=${projectIds.toString()}&projectPermissions=${this.projectPermissions}` url = `${this.api.deleteReportById}?ids=${ids.toString()}&projectIds=${projectIds.toString()}&projectPermissions=${this.form.permissions}`
} }
this.$get(url).then(res => { this.$get(url).then(res => {
this.multipleSelection = []; this.multipleSelection = [];

@ -5,7 +5,13 @@
<div class="center-con"> <div class="center-con">
<div class="center-wrap"> <div class="center-wrap">
<breadcrumb ref="breadcrumb" <breadcrumb ref="breadcrumb"
:data="'全部项目/' + form.projectName"></breadcrumb> :data="'全部项目/' + form.projectName"
:query="{
whetherToSignUp: $route.query.whetherToSignUp,
filterSort: $route.query.filterSort,
keyword: $route.query.keyword,
page: $route.query.page,
}"></breadcrumb>
<div class="content"> <div class="content">
<div class="tool flex-between"> <div class="tool flex-between">
<el-tabs v-model="curType" <el-tabs v-model="curType"

@ -34,7 +34,7 @@
</dl> </dl>
</div> </div>
<el-button type="primary" <el-button type="primary"
@click="$router.push('manage')">管理项目</el-button> @click="toManage">管理项目</el-button>
</div> </div>
<div class="list"> <div class="list">
@ -137,8 +137,6 @@
</template> </template>
<script> <script>
import { mapState, mapMutations } from "vuex";
import { Loading } from "element-ui";
import Setting from "@/setting" import Setting from "@/setting"
import util from "@/libs/util" import util from "@/libs/util"
import Bus from '@/libs/bus' import Bus from '@/libs/bus'
@ -164,8 +162,8 @@ export default {
} }
], ],
form: { form: {
filterSort: 0, filterSort: +this.$route.query.filterSort || 0,
whetherToSignUp: '' whetherToSignUp: this.$route.query.whetherToSignUp ? +this.$route.query.whetherToSignUp : ''
}, },
sorts: [ sorts: [
{ {
@ -178,9 +176,9 @@ export default {
} }
], ],
sort: 1, sort: 1,
keyword: "", keyword: this.$route.query.keyword || '',
searchTimer: null, searchTimer: null,
page: 1, page: +this.$route.query.page || 1,
pageSize: 10, pageSize: 10,
totals: 0, totals: 0,
listData: [], listData: [],
@ -195,6 +193,13 @@ export default {
keyword: function (val) { keyword: function (val) {
clearTimeout(this.searchTimer); clearTimeout(this.searchTimer);
this.searchTimer = setTimeout(() => { this.searchTimer = setTimeout(() => {
this.$router.push({
path: 'list',
query: {
...this.$route.query,
keyword: val
}
})
this.initData(); this.initData();
}, 500); }, 500);
} }
@ -296,6 +301,13 @@ export default {
}).catch(res => { }) }).catch(res => { })
}, },
changeType (type) { changeType (type) {
this.$router.push({
path: 'list',
query: {
...this.$route.query,
whetherToSignUp: type
}
})
const { form } = this const { form } = this
form.competitionScope = 3 form.competitionScope = 3
form.provinceId = '' form.provinceId = ''
@ -306,13 +318,32 @@ export default {
}, },
// //
changeSort (type) { changeSort (type) {
this.$router.push({
path: 'list',
query: {
...this.$route.query,
filterSort: type
}
})
this.form.filterSort = type this.form.filterSort = type
this.initData() this.initData()
}, },
//
toManage () {
this.$store.commit('activity/setReferrer', this.$route.fullPath)
this.$router.push('manage')
},
toDetail (item) { toDetail (item) {
this.$router.push(`/activity/details?id=${item.id}`); this.$router.push(`/activity/details?id=${item.id}&whetherToSignUp=${this.form.whetherToSignUp}&filterSort=${this.form.filterSort}&keyword=${this.keyword}&page=${this.page}`);
}, },
handleCurrentChange (val) { handleCurrentChange (val) {
this.$router.push({
path: 'list',
query: {
...this.$route.query,
page: val
}
})
this.page = val; this.page = val;
this.getData(); this.getData();
}, },

@ -177,6 +177,7 @@ import quill from "@/components/quill";
import Setting from "@/setting"; import Setting from "@/setting";
import Upload from '@/components/upload'; import Upload from '@/components/upload';
import Oss from '@/components/upload/upload.js' import Oss from '@/components/upload/upload.js'
import qs from 'qs'
export default { export default {
data () { data () {
return { return {
@ -399,7 +400,9 @@ export default {
this.submiting = true this.submiting = true
if (form.id) { if (form.id) {
this.$post(this.api.updateActivity, form).then(res => { this.$post(this.api.updateActivity, form).then(res => {
this.backList() this.pass = true
this.updateTime = 0
this.$router.back()
util.successMsg("修改成功"); util.successMsg("修改成功");
}).catch(err => { }).catch(err => {
this.submiting = false this.submiting = false
@ -427,7 +430,8 @@ export default {
backList () { backList () {
this.pass = true this.pass = true
this.updateTime = 0 this.updateTime = 0
this.$router.back() const { params } = this.$store.state.activity
this.$router.push(`manage?${qs.stringify(params.form)}&page=${params.page}`)
}, },
back () { back () {
this.pass = true this.pass = true

@ -3,7 +3,7 @@
<el-card shadow="hover" <el-card shadow="hover"
class="m-b-20"> class="m-b-20">
<div class="flex-between"> <div class="flex-between">
<el-page-header @back="$router.push('/activity/list')" <el-page-header @back="back"
content="管理项目"></el-page-header> content="管理项目"></el-page-header>
</div> </div>
</el-card> </el-card>
@ -43,7 +43,7 @@
<label>搜索</label> <label>搜索</label>
<el-input placeholder="请输入项目名称/创建人" <el-input placeholder="请输入项目名称/创建人"
suffix-icon="el-icon-search" suffix-icon="el-icon-search"
v-model="keyword" v-model="form.keyword"
clearable></el-input> clearable></el-input>
</li> </li>
</ul> </ul>
@ -176,15 +176,11 @@
<script> <script>
import util from "@/libs/util"; import util from "@/libs/util";
import Setting from "@/setting";
import { mapMutations } from "vuex";
import { Loading } from 'element-ui'
import Bus from '@/libs/bus' import Bus from '@/libs/bus'
export default { export default {
data () { data () {
return { return {
timer: null, timer: null,
keyword: "",
activityData: [], activityData: [],
statuses: [ statuses: [
{ {
@ -215,11 +211,12 @@ export default {
} }
], ],
form: { form: {
month: "", keyword: this.$route.query.keyword || '',
publishStatus: "", month: this.$route.query.month ? +this.$route.query.month : '',
startTime: "", publishStatus: this.$route.query.publishStatus ? +this.$route.query.publishStatus : '',
endTime: "", startTime: this.$route.query.startTime || '',
founder: '' endTime: this.$route.query.endTime || '',
founder: this.$route.query.founder ? +this.$route.query.founder : ''
}, },
multipleSelection: [], multipleSelection: [],
dateList: [ dateList: [
@ -279,7 +276,7 @@ export default {
} }
this.initData(); this.initData();
}, },
keyword: function (val) { 'form.keyword': function (val) {
clearTimeout(this.searchTimer); clearTimeout(this.searchTimer);
this.searchTimer = setTimeout(() => { this.searchTimer = setTimeout(() => {
this.initData(); this.initData();
@ -298,9 +295,6 @@ export default {
}) })
}, },
methods: { methods: {
...mapMutations('activity', [
'setPage'
]),
getData () { getData () {
// const load = Loading.service() // const load = Loading.service()
const { form } = this const { form } = this
@ -308,7 +302,7 @@ export default {
pageNum: this.page, pageNum: this.page,
pageSize: this.pageSize, pageSize: this.pageSize,
endTime: form.endTime || null, endTime: form.endTime || null,
keyWords: this.keyword || null, keyWords: form.keyword || null,
platformSource: 1, // (0:1 2) platformSource: 1, // (0:1 2)
startTime: form.startTime || null, startTime: form.startTime || null,
publishStatus: form.publishStatus === '' ? null : form.publishStatus, publishStatus: form.publishStatus === '' ? null : form.publishStatus,
@ -328,10 +322,19 @@ export default {
this.page = 1; this.page = 1;
this.getData(); this.getData();
}, },
//
setCache () {
this.$store.commit('activity/setParams', {
form: this.form,
page: this.page,
})
},
add () { add () {
this.setCache()
this.$router.push("add"); this.$router.push("add");
}, },
manage (row) { manage (row) {
this.setCache()
this.$router.push(`manageDetail?id=${row.id}&name=${row.projectName}`) this.$router.push(`manageDetail?id=${row.id}&name=${row.projectName}`)
}, },
delData (row) { delData (row) {
@ -374,7 +377,6 @@ export default {
this.page = val; this.page = val;
this.$router.push(`list?page=${val}`) this.$router.push(`list?page=${val}`)
this.getData() this.getData()
this.setPage(val)
}, },
transferTime (date, type) { transferTime (date, type) {
if (date == "0000-00-00 00:00:00") return "---"; if (date == "0000-00-00 00:00:00") return "---";
@ -391,6 +393,9 @@ export default {
await this.$post(`${this.api.refreshPageNotification}?content=2`) await this.$post(`${this.api.refreshPageNotification}?content=2`)
}, },
back () {
this.$router.push(this.$store.state.activity.referrer)
},
} }
}; };
</script> </script>

@ -28,12 +28,11 @@
</template> </template>
<script> <script>
import Setting from "@/setting";
import MatchDetail from "../add"; import MatchDetail from "../add";
import MatchProgress from "./matchProgress"; import MatchProgress from "./matchProgress";
import notice from "./notice"; import notice from "./notice";
import MatchSignup from "./matchSignup"; import MatchSignup from "./matchSignup";
import { mapState } from "vuex"; import qs from 'qs'
export default { export default {
data () { data () {
return { return {
@ -53,14 +52,6 @@ export default {
notice, notice,
MatchSignup MatchSignup
}, },
computed: {
...mapState("user", [
'page'
]),
...mapState('auth', [
'btns'
])
},
beforeRouteLeave (to, from, next) { beforeRouteLeave (to, from, next) {
const detail = this.$refs.detail const detail = this.$refs.detail
if (detail && detail.updateTime) { if (detail && detail.updateTime) {
@ -108,7 +99,8 @@ export default {
}, },
// //
backPage () { backPage () {
this.$router.push(`/activity/manage?page=${this.$store.state.activity.page}`) const { params } = this.$store.state.activity
this.$router.push(`manage?${qs.stringify(params.form)}&page=${params.page}`)
}, },
// tab // tab
tabSwitch (i) { tabSwitch (i) {

@ -21,7 +21,7 @@
label="序号" label="序号"
align="center"> align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.$index + (pageNo - 1) * pageSize + 1 }} {{ scope.$index + (page - 1) * pageSize + 1 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="announcementTitle" <el-table-column prop="announcementTitle"
@ -61,7 +61,8 @@
layout="total, prev, pager, next" layout="total, prev, pager, next"
:total="totals" :total="totals"
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
:current-page="pageNo"> :current-page="page"
:page-size="pageSize">
</el-pagination> </el-pagination>
</div> </div>
</div> </div>
@ -70,9 +71,7 @@
<script> <script>
import util from "@/libs/util"; import util from "@/libs/util";
import Setting from "@/setting"; import Setting from "@/setting";
export default { export default {
name: "matchSignup",
data () { data () {
return { return {
token: util.local.get(Setting.tokenKey), token: util.local.get(Setting.tokenKey),
@ -80,7 +79,7 @@ export default {
keyword: "", keyword: "",
listData: [], listData: [],
multipleSelection: [], multipleSelection: [],
pageNo: 1, page: +this.$route.query.page || 1,
pageSize: 10, pageSize: 10,
totals: 0 totals: 0
}; };
@ -98,7 +97,7 @@ export default {
}, },
methods: { methods: {
getData () { getData () {
this.$post(`${this.api.listActivityAnnouncement}?pageNum=${this.pageNo}&pageSize=${this.pageSize}&competitionId=${this.id}`).then(({ data }) => { this.$post(`${this.api.listActivityAnnouncement}?pageNum=${this.page}&pageSize=${this.pageSize}&competitionId=${this.id}`).then(({ data }) => {
this.listData = data.records this.listData = data.records
this.totals = data.total this.totals = data.total
this.$refs.table.clearSelection() this.$refs.table.clearSelection()
@ -108,7 +107,14 @@ export default {
this.multipleSelection = val; this.multipleSelection = val;
}, },
handleCurrentChange (val) { handleCurrentChange (val) {
this.pageNo = val; this.$router.push({
path: 'manageDetail',
query: {
...this.$route.query,
page: val
}
})
this.page = val;
this.getData(); this.getData();
}, },
del (row) { del (row) {

@ -241,6 +241,7 @@
import util from "@/libs/util"; import util from "@/libs/util";
import { mapState, mapActions } from "vuex"; import { mapState, mapActions } from "vuex";
import StudentTree from "@/components/student-tree/src/tree"; import StudentTree from "@/components/student-tree/src/tree";
import qs from 'qs'
export default { export default {
components: { StudentTree }, components: { StudentTree },
data () { data () {
@ -533,7 +534,7 @@ export default {
this.$post(this.api.modifyAssessment, this.form).then(async res => { this.$post(this.api.modifyAssessment, this.form).then(async res => {
this.updateTime = 0 this.updateTime = 0
util.successMsg("修改成功"); util.successMsg("修改成功");
cb ? cb() : this.$router.back() cb ? cb() : this.backPage()
}).catch(err => { }).catch(err => {
this.submiting = false this.submiting = false
}); });
@ -541,7 +542,7 @@ export default {
this.$post(this.api.saveAssessment, this.form).then(res => { this.$post(this.api.saveAssessment, this.form).then(res => {
this.updateTime = 0 this.updateTime = 0
util.successMsg("创建成功"); util.successMsg("创建成功");
cb ? cb() : this.$router.back() cb ? cb() : this.backPage()
}).catch(err => { }).catch(err => {
this.submiting = false this.submiting = false
}); });
@ -620,7 +621,7 @@ export default {
}, },
// //
backPage () { backPage () {
this.$router.back() this.$router.push(this.$store.state.achievement.referrer)
}, },
goBack () { goBack () {
// //

@ -51,7 +51,7 @@
</li> </li>
<li> <li>
<label>课程</label> <label>课程</label>
<el-select v-model="mallId" <el-select v-model="form.mallId"
@change="initData"> @change="initData">
<el-option v-for="(item, i) in curs" <el-option v-for="(item, i) in curs"
:key="i" :key="i"
@ -73,7 +73,7 @@
<li> <li>
<el-input placeholder="请输入实验班级/项目名称/考核名称" <el-input placeholder="请输入实验班级/项目名称/考核名称"
prefix-icon="el-icon-search" prefix-icon="el-icon-search"
v-model.trim="keyWord" v-model.trim="form.keyWord"
clearable clearable
style="width: 300px"></el-input> style="width: 300px"></el-input>
</li> </li>
@ -109,7 +109,7 @@
label="序号" label="序号"
align="center"> align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.$index + (pageNum - 1) * pageSize + 1 }} {{ scope.$index + (page - 1) * pageSize + 1 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="className" <el-table-column prop="className"
@ -216,7 +216,7 @@
layout="total, prev, pager, next" layout="total, prev, pager, next"
:total="total" :total="total"
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
:current-page="pageNum"></el-pagination> :current-page="page"></el-pagination>
</div> </div>
</div> </div>
</template> </template>
@ -224,6 +224,7 @@
<script> <script>
import { mapState } from "vuex"; import { mapState } from "vuex";
import Util from "@/libs/util"; import Util from "@/libs/util";
import qs from 'qs'
export default { export default {
data () { data () {
return { return {
@ -274,7 +275,6 @@ export default {
date: [], date: [],
curriculumList: [], curriculumList: [],
curriculumId: "", curriculumId: "",
keyWord: "", //
searchTimer: null, searchTimer: null,
mallIds: [], mallIds: [],
curs: [ curs: [
@ -284,15 +284,15 @@ export default {
} }
], ],
form: { form: {
type: "", type: +this.$route.query.type || '',
status: "", status: +this.$route.query.status || '',
startTime: "", startTime: this.$route.query.startTime || '',
endTime: "", endTime: this.$route.query.endTime || '',
month: "", month: +this.$route.query.month || '',
mallId: +this.$route.query.mallId || '',
keyWord: this.$route.query.keyWord || '',
}, },
mallId: '', page: +this.$route.query.page || 1, //
pageNum: +this.$route.query.page || 1, //
pageSize: 10, // 10 pageSize: 10, // 10
total: 0, // total: 0, //
listData: [], // listData: [], //
@ -327,7 +327,7 @@ export default {
} }
this.initData(); this.initData();
}, },
keyWord: function (val) { 'form.keyWord': function (val) {
clearTimeout(this.searchTimer); clearTimeout(this.searchTimer);
this.searchTimer = setTimeout(() => { this.searchTimer = setTimeout(() => {
this.initData(); this.initData();
@ -388,11 +388,9 @@ export default {
// const cur = this.curs.find(e => e.mallId == mallIds[0]) // const cur = this.curs.find(e => e.mallId == mallIds[0])
let data = { let data = {
...this.form, ...this.form,
keyWord: this.keyWord, pageNum: this.page,
pageNum: this.pageNum,
pageSize: this.pageSize, pageSize: this.pageSize,
// cid: cur.cid, // cid: cur.cid,
mallId: this.mallId,
// systemId: mallIds[1] // systemId: mallIds[1]
}; };
this.$post(this.api.pageByCondition, data).then(res => { this.$post(this.api.pageByCondition, data).then(res => {
@ -429,7 +427,7 @@ export default {
}, },
initData () { initData () {
this.$refs.table.clearSelection(); this.$refs.table.clearSelection();
this.pageNum = 1 this.page = 1
this.getData(); this.getData();
}, },
@ -437,7 +435,7 @@ export default {
async getCourse () { async getCourse () {
const { data } = await this.$get(this.api.getSchoolEffectiveCourse) const { data } = await this.$get(this.api.getSchoolEffectiveCourse)
this.curs.push(...data) this.curs.push(...data)
this.pageNum = 1 this.page = 1
this.getData(1) this.getData(1)
}, },
// //
@ -447,20 +445,28 @@ export default {
// //
if (val.length === 1) this.mallIds = [id, this.curs.find(e => e.id == id).children[0].id] if (val.length === 1) this.mallIds = [id, this.curs.find(e => e.id == id).children[0].id]
} else { } else {
this.mallId = '' this.form.mallId = ''
this.cid = '' this.cid = ''
this.systemId = '' this.systemId = ''
} }
this.initData() this.initData()
}, },
//
setCache () {
this.$store.commit('achievement/setReferrer', `${this.$route.path}?${qs.stringify(this.form)}&page=${this.page}`)
},
add () { add () {
this.setCache()
this.$router.push("add"); this.$router.push("add");
}, },
edit (row) { edit (row) {
this.setCache()
this.$router.push(`add?id=${row.id}`); this.$router.push(`add?id=${row.id}`);
}, },
show (row) { show (row) {
this.setCache()
this.$router.push(`/achievement/project?id=${row.id}&projectName=${row.projectName}&permissions=1&classId=${row.classId}&mallId=${row.mallId}`) this.$router.push(`/achievement/project?id=${row.id}&projectName=${row.projectName}&permissions=1&classId=${row.classId}&mallId=${row.mallId}`)
}, },
start (row) { start (row) {
@ -520,8 +526,8 @@ export default {
this.getData(); this.getData();
}).catch(res => { }).catch(res => {
}); });
if (this.multipleSelection.length === this.listData.length && this.pageNum > 1) { if (this.multipleSelection.length === this.listData.length && this.page > 1) {
this.handleCurrentChange(this.pageNum - 1) this.handleCurrentChange(this.page - 1)
} }
}).catch(() => { }).catch(() => {
}); });
@ -533,8 +539,7 @@ export default {
this.multipleSelection = val; this.multipleSelection = val;
}, },
handleCurrentChange (val) { handleCurrentChange (val) {
this.pageNum = val this.page = val
this.$router.push(`list?page=${val}`)
this.getData(); this.getData();
}, },
transferTime (date) { transferTime (date) {

@ -9,7 +9,7 @@
<el-select v-model="categoryId" <el-select v-model="categoryId"
clearable clearable
placeholder="请选择课程分类" placeholder="请选择课程分类"
@change="initData"> @change="categoryChange">
<el-option label="不限" <el-option label="不限"
value=""></el-option> value=""></el-option>
<el-option v-for="(item,index) in classificationList" <el-option v-for="(item,index) in classificationList"
@ -126,7 +126,8 @@
layout="total, prev, pager, next" layout="total, prev, pager, next"
:total="total" :total="total"
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
:current-page="page"> :current-page="page"
:page-size="pageSize">
</el-pagination> </el-pagination>
</div> </div>
</div> </div>
@ -141,8 +142,8 @@ export default {
return { return {
regionName: ['本校内', '全平台可见', '指定院校区域'], regionName: ['本校内', '全平台可见', '指定院校区域'],
timer: null, timer: null,
keyword: "", keyword: this.$route.query.keyword || '',
categoryId: '', categoryId: +this.$route.query.categoryId || '',
list: [], list: [],
multipleSelection: [], multipleSelection: [],
classificationList: [], classificationList: [],
@ -155,6 +156,13 @@ export default {
keyword: function (val) { keyword: function (val) {
clearTimeout(this.searchTimer); clearTimeout(this.searchTimer);
this.searchTimer = setTimeout(() => { this.searchTimer = setTimeout(() => {
this.$router.push({
path: 'list',
query: {
...this.$route.query,
keyword: val
}
})
this.initData(); this.initData();
}, 500); }, 500);
} }
@ -167,7 +175,7 @@ export default {
}) })
}, },
methods: { methods: {
getList () { getData () {
this.$post(this.api.listTheoreticalCourse, { this.$post(this.api.listTheoreticalCourse, {
pageNum: this.page, pageNum: this.page,
pageSize: this.pageSize, pageSize: this.pageSize,
@ -198,13 +206,6 @@ export default {
data && this.getList() data && this.getList()
}).catch(res => { }) }).catch(res => { })
}, },
getData () {
this.getList()
// if (!Setting.isDev) {
// clearInterval(this.timer)
// this.timer = setInterval(this.getRedis, 1000)
// }
},
initData () { initData () {
this.page = 1; this.page = 1;
this.getData(); this.getData();
@ -218,6 +219,16 @@ export default {
this.classificationList = page.records this.classificationList = page.records
}).catch(res => { }) }).catch(res => { })
}, },
categoryChange (val) {
this.$router.push({
path: 'list',
query: {
...this.$route.query,
categoryId: val
}
})
this.initData()
},
preview (row) { preview (row) {
this.$router.push(`/course/preview?id=${row.id}`); this.$router.push(`/course/preview?id=${row.id}`);
}, },
@ -271,8 +282,14 @@ export default {
} }
}, },
handleCurrentChange (val) { handleCurrentChange (val) {
this.$router.push({
path: 'list',
query: {
...this.$route.query,
page: val
}
})
this.page = val; this.page = val;
this.$router.push(`list?page=${val}`)
this.getData(); this.getData();
}, },
switchOff (val, row) { switchOff (val, row) {

@ -73,7 +73,8 @@ export default {
page: 1, page: 1,
type: index, type: index,
categoryId: '', categoryId: '',
isSystem: 0 isSystem: 0,
keyword: ''
} }
}) })
}, },
@ -89,7 +90,7 @@ export default {
}).catch(res => { }) }).catch(res => { })
}, },
back () { back () {
this.$router.push('list') this.$router.push(this.$store.state.expSystem.referrer)
} }
} }
}; };

@ -127,7 +127,7 @@ export default {
systemId: this.$route.query.systemId, systemId: this.$route.query.systemId,
isTopLevel: true, // isTopLevel: true, //
listData: [], listData: [],
keyword: '', keyword: this.$route.query.keyword || '',
page: +this.$route.query.page || 1, page: +this.$route.query.page || 1,
pageSize: 10, pageSize: 10,
total: 0, total: 0,
@ -146,6 +146,13 @@ export default {
keyword: function (val) { keyword: function (val) {
clearTimeout(this.searchTimer); clearTimeout(this.searchTimer);
this.searchTimer = setTimeout(() => { this.searchTimer = setTimeout(() => {
this.$router.push({
path: 'backstage',
query: {
...this.$route.query,
keyword: val
}
})
this.initData() this.initData()
}, 500) }, 500)
} }

@ -136,7 +136,7 @@ export default {
systemId: this.$route.query.systemId, systemId: this.$route.query.systemId,
isTopLevel: true, // isTopLevel: true, //
listData: [], listData: [],
keyword: "", keyword: this.$route.query.keyword || '',
page: +this.$route.query.page || 1, page: +this.$route.query.page || 1,
pageSize: 10, pageSize: 10,
total: 0, total: 0,
@ -151,6 +151,13 @@ export default {
keyword: function (val) { keyword: function (val) {
clearTimeout(this.searchTimer); clearTimeout(this.searchTimer);
this.searchTimer = setTimeout(() => { this.searchTimer = setTimeout(() => {
this.$router.push({
path: 'backstage',
query: {
...this.$route.query,
keyword: val
}
})
this.initData() this.initData()
}, 500) }, 500)
} }

@ -10,7 +10,7 @@
<el-select v-model="systemType" <el-select v-model="systemType"
clearable clearable
placeholder="请选择系统类型" placeholder="请选择系统类型"
@change="initData"> @change="systemChange">
<el-option v-for="(item,index) in systemTypeList" <el-option v-for="(item,index) in systemTypeList"
:key="index" :key="index"
:label="item.label" :label="item.label"
@ -20,7 +20,7 @@
<li> <li>
<el-input placeholder="请输入系统名称" <el-input placeholder="请输入系统名称"
prefix-icon="el-icon-search" prefix-icon="el-icon-search"
v-model.trim="systemSearch" v-model.trim="keyword"
clearable></el-input> clearable></el-input>
</li> </li>
</ul> </ul>
@ -65,7 +65,7 @@
</el-table> </el-table>
<div class="pagination"> <div class="pagination">
<el-pagination background <el-pagination background
:current-page="pageNo" :current-page="page"
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
layout="total, prev, pager, next" layout="total, prev, pager, next"
:total="totals"> :total="totals">
@ -84,8 +84,8 @@ export default {
return { return {
isPro: Setting.isPro, isPro: Setting.isPro,
token: util.local.get(Setting.tokenKey), token: util.local.get(Setting.tokenKey),
systemType: "", systemType: this.$route.query.systemType ? +this.$route.query.systemType : '',
systemSearch: "", keyword: this.$route.query.keyword || '',
searchTimer: null, searchTimer: null,
systemData: [], systemData: [],
totals: 0, totals: 0,
@ -111,15 +111,22 @@ export default {
0: '运行中', 0: '运行中',
1: '默认' 1: '默认'
}, },
pageNo: +this.$route.query.page || 1, page: +this.$route.query.page || 1,
pageSize: 10, pageSize: 10,
loading: false, loading: false,
}; };
}, },
watch: { watch: {
systemSearch: function (val) { keyword: function (val) {
clearTimeout(this.searchTimer); clearTimeout(this.searchTimer);
this.searchTimer = setTimeout(() => { this.searchTimer = setTimeout(() => {
this.$router.push({
path: 'list',
query: {
...this.$route.query,
keyword: val
}
})
this.initData(); this.initData();
}, 500); }, 500);
} }
@ -136,8 +143,8 @@ export default {
this.loading = true this.loading = true
let data = { let data = {
type: this.systemType, type: this.systemType,
systemName: this.systemSearch, systemName: this.keyword,
pageNum: this.pageNo, pageNum: this.page,
pageSize: this.pageSize, pageSize: this.pageSize,
}; };
this.$post(this.api.getSystemByCustomers, data).then(({ data }) => { this.$post(this.api.getSystemByCustomers, data).then(({ data }) => {
@ -149,15 +156,29 @@ export default {
}); });
}, },
handleCurrentChange (val) { handleCurrentChange (val) {
this.pageNo = val; this.$router.push({
this.$router.push(`list?page=${val}`) path: 'list',
query: {
...this.$route.query,
page: val
}
})
this.page = val;
this.getData(); this.getData();
}, },
edit (row) { systemChange (val) {
this.$router.push('configure'); this.$router.push({
path: 'list',
query: {
...this.$route.query,
systemType: val
}
})
this.initData();
}, },
// //
toBackstage (row) { toBackstage (row) {
this.$store.commit('expSystem/setReferrer', this.$route.fullPath)
if (row.systemId == 19) { if (row.systemId == 19) {
location.href = `${Setting.sandPath}/#/config?token=${this.token}&referrer=${encodeURIComponent(location.href)}` location.href = `${Setting.sandPath}/#/config?token=${this.token}&referrer=${encodeURIComponent(location.href)}`
} else { } else {

@ -1,212 +1,262 @@
<template> <template>
<div class="page"> <div class="page">
<!-- <div class="tabs">--> <!-- <div class="tabs">-->
<!-- <a class="item" v-for="(item,index) in tabs" :key="index" :class="{active: index == activeName}" @click="tabChange(index)">{{item}}</a>--> <!-- <a class="item" v-for="(item,index) in tabs" :key="index" :class="{active: index == activeName}" @click="tabChange(index)">{{item}}</a>-->
<!-- </div>--> <!-- </div>-->
<div class="btn-wrap"> <div class="btn-wrap">
<el-button v-auth="'内容管理:保存排序'" class="action-btn" type="primary" @click="sortSubmit">保存排序</el-button> <el-button v-auth="'内容管理:保存排序'"
<el-button v-auth="'内容管理:批量删除'" class="action-btn" type="primary" @click="delAllData">批量删除</el-button> class="action-btn"
<el-button v-auth="'内容管理:新增文章'" class="action-btn" type="info" @click="addArticle">新增文章</el-button> type="primary"
</div> @click="sortSubmit">保存排序</el-button>
<div class="page-content" style="padding-top: 24px"> <el-button v-auth="'内容管理:批量删除'"
<el-table ref="table" :data="list" class="table" stripe header-align="center" @selection-change="handleSelectionChange" row-key="id"> class="action-btn"
<el-table-column type="selection" width="80" align="center" :reserve-selection="true"></el-table-column> type="primary"
<el-table-column type="index" width="60" label="序号" align="center"> @click="delAllData">批量删除</el-button>
<template slot-scope="scope"> <el-button v-auth="'内容管理:新增文章'"
{{ scope.$index + (pageNo - 1) * pageSize + 1 }} class="action-btn"
</template> type="info"
</el-table-column> @click="addArticle">新增文章</el-button>
<el-table-column prop="title" label="标题" show-overflow-tooltip align="center">
</el-table-column>
<el-table-column prop="title" label="栏目" show-overflow-tooltip align="center">
{{ columnName }}
</el-table-column>
<el-table-column prop="name" label="排序值" width="80" align="center">
<template slot-scope="scope">
<el-input class="sort-input" width="120" min="1" v-model.number="scope.row.sort" type="number"></el-input>
<span>{{ scope.row.sort }}</span>
</template>
</el-table-column>
<el-table-column prop="date" label="添加日期" align="center">
<template slot-scope="scope">
{{ transferDate(scope.row.date) }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="170">
<template slot-scope="scope">
<el-button v-auth="'内容管理:编辑'" type="text" @click="editArticle(scope)">编辑</el-button>
<el-divider v-auth="'内容管理:编辑'" direction="vertical"></el-divider>
<el-button v-auth="'内容管理:删除'" type="text" @click="delData(scope.row)">删除</el-button>
</template>
</el-table-column>
<el-table-column prop="name" label="文章发布状态" width="120" align="center">
<template slot-scope="scope">
<el-switch
v-auth="'内容管理:禁用'"
class="off"
v-model="scope.row.status"
:active-value="0"
:inactive-value="1"
style="margin: 0 5px"
:active-text="scope.row.status ? '关' : '开'"
@change="switchOff($event,scope.row,scope.$index)"
></el-switch>
<span>{{ scope.row.status ? "禁用" : "启用" }}</span>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination background layout="total, prev, pager, next" :total="totals" @current-change="handleCurrentChange" :current-page="pageNo">
</el-pagination>
</div>
</div>
</div> </div>
<div class="page-content"
style="padding-top: 24px">
<el-table ref="table"
:data="list"
class="table"
stripe
header-align="center"
@selection-change="handleSelectionChange"
row-key="id">
<el-table-column type="selection"
width="80"
align="center"
:reserve-selection="true"></el-table-column>
<el-table-column type="index"
width="60"
label="序号"
align="center">
<template slot-scope="scope">
{{ scope.$index + (pageNo - 1) * pageSize + 1 }}
</template>
</el-table-column>
<el-table-column prop="title"
label="标题"
show-overflow-tooltip
align="center">
</el-table-column>
<el-table-column prop="title"
label="栏目"
show-overflow-tooltip
align="center">
{{ columnName }}
</el-table-column>
<el-table-column prop="name"
label="排序值"
width="80"
align="center">
<template slot-scope="scope">
<el-input class="sort-input"
width="120"
min="1"
v-model.number="scope.row.sort"
type="number"></el-input>
<span>{{ scope.row.sort }}</span>
</template>
</el-table-column>
<el-table-column prop="date"
label="添加日期"
align="center">
<template slot-scope="scope">
{{ transferDate(scope.row.date) }}
</template>
</el-table-column>
<el-table-column label="操作"
align="center"
width="170">
<template slot-scope="scope">
<el-button v-auth="'内容管理:编辑'"
type="text"
@click="editArticle(scope)">编辑</el-button>
<el-divider v-auth="'内容管理:编辑'"
direction="vertical"></el-divider>
<el-button v-auth="'内容管理:删除'"
type="text"
@click="delData(scope.row)">删除</el-button>
</template>
</el-table-column>
<el-table-column prop="name"
label="文章发布状态"
width="120"
align="center">
<template slot-scope="scope">
<el-switch v-auth="'内容管理:禁用'"
class="off"
v-model="scope.row.status"
:active-value="0"
:inactive-value="1"
style="margin: 0 5px"
:active-text="scope.row.status ? '关' : '开'"
@change="switchOff($event,scope.row,scope.$index)"></el-switch>
<span>{{ scope.row.status ? "禁用" : "启用" }}</span>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination background
layout="total, prev, pager, next"
:total="totals"
@current-change="handleCurrentChange"
:current-page="pageNo"
:page-size="pageSize">
</el-pagination>
</div>
</div>
</div>
</template> </template>
<script> <script>
import util from "@/libs/util"; import util from "@/libs/util";
export default { export default {
data() { data () {
return { return {
activeName: "first", activeName: "first",
tabs: { tabs: {
first: "栏目内容管理" first: "栏目内容管理"
}, },
columns: this.$parent.menuList, columns: this.$parent.menuList,
columnName: '', columnName: '',
list: [], list: [],
multipleSelection: [], multipleSelection: [],
pageNo: +this.$route.query.page || 1, pageNo: +this.$route.query.page || 1,
pageSize: 10, pageSize: 10,
totals: 0, totals: 0,
originList: [] originList: []
}; };
},
props: {
columnId: ""
},
watch: {
columnId () {
this.getColumnName(this.$parent.menuList)
this.getData();
}
},
mounted () {
this.getColumnName(this.$parent.menuList)
this.getData();
},
methods: {
getData (id) {
let data = {
columnId: this.columnId
};
this.$get(`${this.api.queryArticleByCondition}/${this.pageNo}/${this.pageSize}`, data).then(({ articleList, total }) => {
this.list = articleList;
this.totals = total;
this.originList = JSON.parse(JSON.stringify(articleList))
if (!this.list.length && this.totals) {
this.pageNo--;
this.getData();
}
}).catch(res => {
});
}, },
props: { handleSelectionChange (val) {
columnId: "" this.multipleSelection = val;
}, },
watch: { handleCurrentChange (val) {
columnId() { this.pageNo = val;
this.getColumnName(this.$parent.menuList) this.$router.push(`list?page=${val}`)
this.getData(); this.getData();
},
//
getColumnName (data) {
data.map(e => {
if (e.id == this.columnId) {
this.columnName = e.name
} else {
this.getColumnName(e.children)
} }
})
}, },
mounted() { addArticle () {
this.getColumnName(this.$parent.menuList) this.$router.push(`/information/addarticle?columnId=${this.columnId}&sort=${this.list.length + 1}`);
this.getData(); },
editArticle (scope) {
this.$router.push(`/information/addarticle?columnId=${this.columnId}&id=${scope.row.id}&sort=${scope.$index + 1}`);
}, },
methods: { delData (row) {
getData(id) { this.$confirm("此删除操作不可逆,是否确认删除选中项?", "提示", {
let data = { type: "warning"
columnId: this.columnId })
}; .then(() => {
this.$get(`${this.api.queryArticleByCondition}/${this.pageNo}/${this.pageSize}`, data).then(({ articleList, total }) => { this.$del(`${this.api.deleteArticles}?articleIds=${row.id}`).then(res => {
this.list = articleList; util.successMsg("删除成功");
this.totals = total; this.getData();
this.originList = JSON.parse(JSON.stringify(articleList)) }).catch(res => {
if (!this.list.length && this.totals) { });
this.pageNo--; })
this.getData(); .catch(() => {
} });
},
transferDate (date) {
return date.replace(" 00:00:00", "");
},
delAllData () {
if (this.multipleSelection.length != "") {
let newArr = this.multipleSelection;
let delList = newArr.map(item => {
return item.id;
});
let title = newArr[0].title;
if (title.length > 14) {
title = title.substr(0, 14) + "……";
}
this.$confirm(`此批量删除操作不可逆,是否确认删除${title}${newArr.length}个选中项?`, "提示", {
type: "warning"
})
.then(() => {
this.$del(`${this.api.deleteArticles}?articleIds=${delList.join(",")}`).then(res => {
this.$refs.table.clearSelection();
util.successMsg("删除成功");
this.getData();
}).catch(res => { }).catch(res => {
}); });
}, if (this.multipleSelection.length === this.list.length && this.pageNo > 1) {
handleSelectionChange(val) { this.handleCurrentChange(this.pageNo - 1)
this.multipleSelection = val;
},
handleCurrentChange(val) {
this.pageNo = val;
this.$router.push(`list?page=${val}`)
this.getData();
},
//
getColumnName(data) {
data.map(e => {
if (e.id == this.columnId) {
this.columnName = e.name
} else {
this.getColumnName(e.children)
} }
}) })
}, .catch(() => {
addArticle() { });
this.$router.push(`/information/addarticle?columnId=${this.columnId}&sort=${this.list.length + 1}`); } else {
}, util.errorMsg("请先选择数据 !");
editArticle(scope) { }
this.$router.push(`/information/addarticle?columnId=${this.columnId}&id=${scope.row.id}&sort=${scope.$index + 1}`); },
}, switchOff (val, row, index) {
delData(row) { this.$put(`${this.api.enableArticle}/${row.id}/${val}`)
this.$confirm("此删除操作不可逆,是否确认删除选中项?", "提示", { .then(res => {
type: "warning" val == 1 ? util.errorMsg("该文章已隐藏,对学生端用户不可见") : util.successMsg("该文章已发布,对学生端用户可见");
}) })
.then(() => { .catch(err => {
this.$del(`${this.api.deleteArticles}?articleIds=${row.id}`).then(res => { });
util.successMsg("删除成功"); },
this.getData(); sortSubmit () {
}).catch(res => { if (this.list.length) {
}); if (this.list.find(n => n.sort < 1)) return util.errorMsg("排序值最小为1");
}) let data = { articleList: this.list };
.catch(() => { this.$post(this.api.articleSort, data).then(res => {
}); util.successMsg("保存成功");
}, this.getData();
transferDate(date) { })
return date.replace(" 00:00:00", ""); .catch(err => {
}, });
delAllData() { } else {
if (this.multipleSelection.length != "") { util.errorMsg("数据为空");
let newArr = this.multipleSelection; }
let delList = newArr.map(item => {
return item.id;
});
let title = newArr[0].title;
if (title.length > 14) {
title = title.substr(0, 14) + "……";
}
this.$confirm(`此批量删除操作不可逆,是否确认删除${title}${newArr.length}个选中项?`, "提示", {
type: "warning"
})
.then(() => {
this.$del(`${this.api.deleteArticles}?articleIds=${delList.join(",")}`).then(res => {
this.$refs.table.clearSelection();
util.successMsg("删除成功");
this.getData();
}).catch(res => {
});
if(this.multipleSelection.length === this.list.length && this.pageNo>1) {
this.handleCurrentChange(this.pageNo - 1)
}
})
.catch(() => {
});
} else {
util.errorMsg("请先选择数据 !");
}
},
switchOff(val, row, index) {
this.$put(`${this.api.enableArticle}/${row.id}/${val}`)
.then(res => {
val == 1 ? util.errorMsg("该文章已隐藏,对学生端用户不可见") : util.successMsg("该文章已发布,对学生端用户可见");
})
.catch(err => {
});
},
sortSubmit() {
if (this.list.length) {
if (this.list.find(n => n.sort < 1)) return util.errorMsg("排序值最小为1");
let data = { articleList: this.list };
this.$post(this.api.articleSort, data).then(res => {
util.successMsg("保存成功");
this.getData();
})
.catch(err => {
});
} else {
util.errorMsg("数据为空");
}
}
} }
}
}; };
</script> </script>

@ -52,7 +52,6 @@ export default {
}).then(res => { }).then(res => {
this.menuList = res.columnTree this.menuList = res.columnTree
const storeId = this.$store.state.info.columnId const storeId = this.$store.state.info.columnId
console.log("🚀 ~ file: index.vue ~ line 46 ~ getMenuData ~ storeId", storeId)
if (this.menuList.length) { if (this.menuList.length) {
this.getId(this.menuList) this.getId(this.menuList)
this.columnId = this.menuList[0].id this.columnId = this.menuList[0].id

@ -118,6 +118,7 @@ import step2 from './step2'
import step3 from './step3' import step3 from './step3'
import step4 from './step4' import step4 from './step4'
import { Loading } from 'element-ui' import { Loading } from 'element-ui'
import qs from 'qs'
export default { export default {
name: "add", name: "add",
data () { data () {
@ -289,7 +290,8 @@ export default {
} }
}, },
backPage () { backPage () {
this.$router.push(`/match?page=${this.$store.state.match.page}`) const { params } = this.$store.state.match
this.$router.push(`/match?${qs.stringify(params.form)}&page=${params.page}`)
} }
} }
}; };

@ -36,7 +36,7 @@
<label>搜索</label> <label>搜索</label>
<el-input placeholder="请输入竞赛名称/创建人" <el-input placeholder="请输入竞赛名称/创建人"
suffix-icon="el-icon-search" suffix-icon="el-icon-search"
v-model="keyword" v-model="form.keyword"
clearable></el-input> clearable></el-input>
</li> </li>
</ul> </ul>
@ -217,15 +217,12 @@
<script> <script>
import util from "@/libs/util"; import util from "@/libs/util";
import Setting from "@/setting";
import { mapMutations } from "vuex";
import Bus from '@/libs/bus' import Bus from '@/libs/bus'
export default { export default {
name: "match", name: "match",
data () { data () {
return { return {
timer: null, timer: null,
keyword: "",
matchData: [], matchData: [],
statuses: [ statuses: [
{ {
@ -242,10 +239,11 @@ export default {
} }
], ],
form: { form: {
month: "", keyword: this.$route.query.keyword || '',
publishStatus: "", month: this.$route.query.month ? +this.$route.query.month : '',
startTime: "", publishStatus: this.$route.query.publishStatus ? +this.$route.query.publishStatus : '',
endTime: "", startTime: this.$route.query.startTime || '',
endTime: this.$route.query.endTime || '',
}, },
multipleSelection: [], multipleSelection: [],
dateList: [ dateList: [
@ -266,7 +264,7 @@ export default {
name: "近六个月" name: "近六个月"
} }
], ],
date: [], date: this.$route.query.startTime ? [this.$route.query.startTime, this.$route.query.endTime] : [],
page: +this.$route.query.page || 1, page: +this.$route.query.page || 1,
pageSize: 10, pageSize: 10,
total: 0, total: 0,
@ -306,7 +304,7 @@ export default {
} }
this.initData(); this.initData();
}, },
keyword: function (val) { 'form.keyword': function (val) {
clearTimeout(this.searchTimer); clearTimeout(this.searchTimer);
this.searchTimer = setTimeout(() => { this.searchTimer = setTimeout(() => {
this.initData(); this.initData();
@ -314,7 +312,12 @@ export default {
} }
}, },
mounted () { mounted () {
this.setPage(1) const { query } = this.$route
if (query.page) {
this.$store.commit('match/setParams', null)
this.$router.push('list').catch(() => { })
}
// websocket // websocket
Bus.$on('matchSocket', () => { Bus.$on('matchSocket', () => {
this.getData() this.getData()
@ -325,9 +328,6 @@ export default {
}) })
}, },
methods: { methods: {
...mapMutations('match', [
'setPage'
]),
getData () { getData () {
this.loading = true this.loading = true
const { form } = this const { form } = this
@ -336,7 +336,7 @@ export default {
pageSize: this.pageSize, pageSize: this.pageSize,
competitionScope: 0, // (0: 1: 2.) competitionScope: 0, // (0: 1: 2.)
endTime: form.endTime || null, endTime: form.endTime || null,
keyWord: this.keyword || null, keyWord: form.keyword || null,
platformSource: 1, // (01) platformSource: 1, // (01)
startTime: form.startTime || null, startTime: form.startTime || null,
publishStatus: form.publishStatus === '' ? null : form.publishStatus publishStatus: form.publishStatus === '' ? null : form.publishStatus
@ -385,13 +385,15 @@ export default {
this.page = 1; this.page = 1;
this.getData(); this.getData();
}, },
// redis //
getRedis () { setCache () {
this.$post(this.api.getRedisCacheCompetition).then(({ data }) => { this.$store.commit('match/setParams', {
data && this.getList() form: this.form,
}).catch(res => { }) page: this.page,
})
}, },
add () { add () {
this.setCache()
this.$router.push("/match/add"); this.$router.push("/match/add");
}, },
// //
@ -429,6 +431,7 @@ export default {
}).catch(err => { }) }).catch(err => { })
}, },
manage (row) { manage (row) {
this.setCache()
this.$router.push(`/match/manage?id=${row.id}&name=${row.competitionName}`) this.$router.push(`/match/manage?id=${row.id}&name=${row.competitionName}`)
}, },
@ -476,7 +479,6 @@ export default {
this.page = val; this.page = val;
this.$router.push(`list?page=${val}`) this.$router.push(`list?page=${val}`)
this.getData() this.getData()
this.setPage(val)
}, },
transferTime (date, type) { transferTime (date, type) {
if (date == "0000-00-00 00:00:00") return "---"; if (date == "0000-00-00 00:00:00") return "---";

@ -47,6 +47,7 @@ import MatchProgress from "./matchProgress";
import notice from "./notice"; import notice from "./notice";
import MatchSignup from "./matchSignup"; import MatchSignup from "./matchSignup";
import { mapState } from "vuex"; import { mapState } from "vuex";
import qs from 'qs'
export default { export default {
name: "matchManage", name: "matchManage",
data () { data () {
@ -158,7 +159,8 @@ export default {
// //
backPage () { backPage () {
this.pass = 1 this.pass = 1
this.$router.push(`/match?page=${this.$store.state.match.page}`) const { params } = this.$store.state.match
this.$router.push(`/match?${qs.stringify(params.form)}&page=${params.page}`)
}, },
// tab // tab
tabSwitch (i) { tabSwitch (i) {

@ -118,9 +118,11 @@ export default {
}, },
// //
toRank (row, i) { toRank (row, i) {
this.$store.commit('match/setReferrer', this.$route.fullPath)
this.$router.push(`rank?id=${this.id}&stageId=${row.stageId}&index=${i}&method=${row.method}&competitionType=${row.competitionType}&rule=${row.rule}`) this.$router.push(`rank?id=${this.id}&stageId=${row.stageId}&index=${i}&method=${row.method}&competitionType=${row.competitionType}&rule=${row.rule}`)
}, },
toArch (row, i) { toArch (row, i) {
this.$store.commit('match/setReferrer', this.$route.fullPath)
const cur = this.form.competitionStage[i] const cur = this.form.competitionStage[i]
const showFile = !!(cur.method === 2 && cur.competitionStageContentSetting && cur.competitionStageContentSetting.whetherToUploadFiles) const showFile = !!(cur.method === 2 && cur.competitionStageContentSetting && cur.competitionStageContentSetting.whetherToUploadFiles)
this.$router.push(`archList?id=${this.id}&stageId=${row.stageId}&method=${row.method}&competitionType=${row.competitionType}&showFile=${showFile}`) this.$router.push(`archList?id=${this.id}&stageId=${row.stageId}&method=${row.method}&competitionType=${row.competitionType}&showFile=${showFile}`)

@ -3,7 +3,7 @@
<el-card shadow="hover" <el-card shadow="hover"
class="m-b-20 head-card"> class="m-b-20 head-card">
<div class="flex-between m-b-20"> <div class="flex-between m-b-20">
<el-page-header @back="$router.back()" <el-page-header @back="back"
content="成绩管理"></el-page-header> content="成绩管理"></el-page-header>
</div> </div>
@ -306,11 +306,11 @@ export default {
competitionType: +this.$route.query.competitionType, competitionType: +this.$route.query.competitionType,
showFile: this.$route.query.showFile === 'true', showFile: this.$route.query.showFile === 'true',
isCompress: util.isCompress, isCompress: util.isCompress,
keyword: "", keyword: this.$route.query.keyword || '',
searchTimer: null, searchTimer: null,
list: [], list: [],
multipleSelection: [], multipleSelection: [],
page: 1, page: +this.$route.query.page || 1,
pageSize: 10, pageSize: 10,
total: 0, total: 0,
@ -340,6 +340,13 @@ export default {
keyword: function (val) { keyword: function (val) {
clearTimeout(this.searchTimer); clearTimeout(this.searchTimer);
this.searchTimer = setTimeout(() => { this.searchTimer = setTimeout(() => {
this.$router.push({
path: 'archList',
query: {
...this.$route.query,
keyword: val
}
})
this.initData(); this.initData();
}, 500); }, 500);
} }
@ -450,14 +457,13 @@ export default {
this.$post(this.api.batchDeleteContestGrade, { this.$post(this.api.batchDeleteContestGrade, {
ids: [this.method == 2 ? row.scoreId : row.reportId], ids: [this.method == 2 ? row.scoreId : row.reportId],
competitionId: this.id, competitionId: this.id,
stageId: row.stageId stageId: this.stageId
}).then(res => { }).then(res => {
util.successMsg("删除成功"); util.successMsg("删除成功");
this.getData(); this.getData();
}).catch(res => { }).catch(res => {
}); });
}).catch(() => { }).catch(() => { });
});
}, },
delAllData () { // delAllData () { //
const list = this.multipleSelection const list = this.multipleSelection
@ -487,6 +493,13 @@ export default {
this.multipleSelection = val; this.multipleSelection = val;
}, },
handleCurrentChange (val) { // handleCurrentChange (val) { //
this.$router.push({
path: 'manage',
query: {
...this.$route.query,
page: val
}
})
this.page = val; this.page = val;
this.getData(); this.getData();
}, },
@ -626,6 +639,9 @@ export default {
} }
x.send() x.send()
}, },
back () {
this.$router.push(this.$store.state.match.referrer)
}
} }
}; };
</script> </script>

@ -4,7 +4,7 @@
class="m-b-20 head-card"> class="m-b-20 head-card">
<div class="flex-between m-b-20"> <div class="flex-between m-b-20">
<el-page-header v-if="grades.length" <el-page-header v-if="grades.length"
@back="$router.back()" @back="back"
:content="grades[index].stageName + '/排名'"></el-page-header> :content="grades[index].stageName + '/排名'"></el-page-header>
</div> </div>
@ -286,7 +286,7 @@ export default {
competitionType: +this.$route.query.competitionType, competitionType: +this.$route.query.competitionType,
rule: +this.$route.query.rule, rule: +this.$route.query.rule,
searchTimer: null, searchTimer: null,
keyword: '', keyword: this.$route.query.keyword || '',
teamCalculationMethods: [ teamCalculationMethods: [
{ {
id: 0, id: 0,
@ -307,7 +307,7 @@ export default {
active: '', active: '',
grades: [], grades: [],
list: [], list: [],
page: 1, page: +this.$route.query.page || 1,
pageSize: 10, pageSize: 10,
total: 0, total: 0,
type: 0, type: 0,
@ -354,6 +354,13 @@ export default {
keyword: function (val) { keyword: function (val) {
clearTimeout(this.searchTimer); clearTimeout(this.searchTimer);
this.searchTimer = setTimeout(() => { this.searchTimer = setTimeout(() => {
this.$router.push({
path: 'rank',
query: {
...this.$route.query,
keyword: val
}
})
this.getRank(); this.getRank();
}, 500); }, 500);
} }
@ -407,7 +414,7 @@ export default {
keyword: this.keyword keyword: this.keyword
}).then(({ page, publishStatus, total }) => { }).then(({ page, publishStatus, total }) => {
this.published = publishStatus this.published = publishStatus
this.list = page this.list = page || []
this.total = total this.total = total
this.getPublishTime() this.getPublishTime()
this.loading = false this.loading = false
@ -454,8 +461,7 @@ export default {
this.getRank() this.getRank()
}, },
initData () { initData () {
this.page = 1 this.handleCurrentChange(1)
this.getData()
}, },
// tab // tab
tabChange (i) { tabChange (i) {
@ -551,6 +557,13 @@ export default {
this.multipleSelection = val; this.multipleSelection = val;
}, },
handleCurrentChange (val) { // handleCurrentChange (val) { //
this.$router.push({
path: 'rank',
query: {
...this.$route.query,
page: val
}
})
this.page = val; this.page = val;
this.getData(); this.getData();
}, },
@ -771,6 +784,9 @@ export default {
this.getRank() this.getRank()
this.importVisible = false this.importVisible = false
}, },
back () {
this.$router.push(this.$store.state.match.referrer)
}
} }
}; };
</script> </script>

@ -16,7 +16,7 @@
<li v-if="info.releaseType"> <li v-if="info.releaseType">
<label>参赛人员状态</label> <label>参赛人员状态</label>
<el-select v-model="isDisable" <el-select v-model="isDisable"
@change="initData"> @change="disableChange">
<el-option v-for="(item, i) in statusList" <el-option v-for="(item, i) in statusList"
:key="i" :key="i"
:label="item.name" :label="item.name"
@ -346,7 +346,7 @@ export default {
info: { info: {
completeCompetitionSetup: {} completeCompetitionSetup: {}
}, },
isDisable: '', isDisable: this.$route.query.isDisable ? +this.$route.query.isDisable : '',
statusList: [ statusList: [
{ {
id: '', id: '',
@ -361,10 +361,10 @@ export default {
name: '未禁用' name: '未禁用'
} }
], ],
keyword: "", keyword: this.$route.query.keyword || '',
listData: [], listData: [],
multipleSelection: [], multipleSelection: [],
page: 1, page: +this.$route.query.page || 1,
pageSize: 10, pageSize: 10,
total: 0, total: 0,
schoolOrder: '', schoolOrder: '',
@ -437,6 +437,13 @@ export default {
keyword: function (val) { keyword: function (val) {
clearTimeout(this.searchTimer); clearTimeout(this.searchTimer);
this.searchTimer = setTimeout(() => { this.searchTimer = setTimeout(() => {
this.$router.push({
path: 'manage',
query: {
...this.$route.query,
keyword: val
}
})
this.initData(); this.initData();
}, 500); }, 500);
} }
@ -496,6 +503,13 @@ export default {
this.multipleSelection = val; this.multipleSelection = val;
}, },
handleCurrentChange (val) { handleCurrentChange (val) {
this.$router.push({
path: 'manage',
query: {
...this.$route.query,
page: val
}
})
this.page = val; this.page = val;
this.getData(); this.getData();
}, },
@ -509,6 +523,16 @@ export default {
if (column.prop === 'teamName') this.teamOrder = column.order ? column.order === 'ascending' ? 2 : 1 : '' if (column.prop === 'teamName') this.teamOrder = column.order ? column.order === 'ascending' ? 2 : 1 : ''
this.getData() this.getData()
}, },
disableChange (val) {
this.$router.push({
path: 'manage',
query: {
...this.$route.query,
isDisable: val
}
})
this.initData()
},
// //
autoAllocation () { autoAllocation () {

@ -65,7 +65,8 @@
layout="total, prev, pager, next" layout="total, prev, pager, next"
:total="totals" :total="totals"
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
:current-page="pageNo"> :current-page="pageNo"
:page-size="pageSize">
</el-pagination> </el-pagination>
</div> </div>
</div> </div>
@ -76,7 +77,6 @@ import util from "@/libs/util";
import Setting from "@/setting"; import Setting from "@/setting";
export default { export default {
name: "matchSignup",
data () { data () {
return { return {
token: util.local.get(Setting.tokenKey), token: util.local.get(Setting.tokenKey),
@ -84,8 +84,8 @@ export default {
keyword: "", keyword: "",
listData: [], listData: [],
multipleSelection: [], multipleSelection: [],
pageNo: 1, pageNo: +this.$route.query.page || 1,
pageSize: 10, pageSize: 1,
totals: 0 totals: 0
}; };
}, },
@ -112,6 +112,13 @@ export default {
this.multipleSelection = val; this.multipleSelection = val;
}, },
handleCurrentChange (val) { handleCurrentChange (val) {
this.$router.push({
path: 'manage',
query: {
...this.$route.query,
page: val
}
})
this.pageNo = val; this.pageNo = val;
this.getData(); this.getData();
}, },

@ -194,10 +194,8 @@
</template> </template>
<script> <script>
import Setting from "@/setting";
export default { export default {
data () { data () {
const that = this
return { return {
carouselHeight: '533px', carouselHeight: '533px',
banners: [], banners: [],
@ -280,6 +278,18 @@ export default {
} }
}, },
mounted () { mounted () {
const { params } = this.$store.state.product
if (params) {
this.form = params.form
this.page = params.page
this.categoryId = params.categoryId
this.professionalCategoryId = params.professionalCategoryId
this.professionalId = params.professionalId
this.curTab = params.curTab
this.$store.commit('product/setParams', null)
console.log("🚀 ~ mounted ~ this.form:", params)
}
this.carouselHeight = parseInt(window.innerWidth / 3.6) + 'px' this.carouselHeight = parseInt(window.innerWidth / 3.6) + 'px'
this.getBanner() this.getBanner()
this.getSubject() this.getSubject()
@ -426,6 +436,14 @@ export default {
}, },
// //
toDetail (id) { toDetail (id) {
this.$store.commit('product/setParams', {
form: this.form,
page: this.page,
categoryId: this.categoryId,
professionalCategoryId: this.categoryId ? this.professionalCategoryId : '',
professionalId: this.categoryId ? this.professionalId : '',
curTab: this.curTab
})
this.$router.push(`show?id=${id}`); this.$router.push(`show?id=${id}`);
} }
} }

@ -112,8 +112,7 @@
:key="j" :key="j"
@click="toPreview(i, j)"> @click="toPreview(i, j)">
<div class="sectionName" <div class="sectionName"
:title="section.name" :title="section.name">
:class="{active: curLink === `${item.name}${section.name}`}">
<div class="val"> <div class="val">
<img v-if="section.fileType === 'pptx'" <img v-if="section.fileType === 'pptx'"
src="@/assets/img/exts/ppt.png" src="@/assets/img/exts/ppt.png"
@ -203,8 +202,6 @@
</template> </template>
<script> <script>
import Util from "@/libs/util"
import Setting from "@/setting"
export default { export default {
data () { data () {
return { return {
@ -270,6 +267,10 @@ export default {
return false return false
}, },
}, },
beforeRouteLeave (to, from, next) {
to.path !== '/product/list' && this.$store.commit('product/setParams', null)
next()
},
mounted () { mounted () {
this.getData() this.getData()
this.getHot() this.getHot()

@ -306,6 +306,7 @@ import quill from "@/components/quill";
import Sortable from "sortablejs"; import Sortable from "sortablejs";
import { UTable, UTableColumn } from 'umy-ui' import { UTable, UTableColumn } from 'umy-ui'
import Decimal from 'decimal.js' import Decimal from 'decimal.js'
import qs from 'qs'
export default { export default {
components: { components: {
quill, quill,
@ -405,7 +406,6 @@ export default {
}, },
// , // ,
beforeRouteLeave (to, from, next) { beforeRouteLeave (to, from, next) {
console.log(44, this.updateTime)
if (this.updateTime) { if (this.updateTime) {
if (!this.backType) { if (!this.backType) {
this.$confirm(`您所更改的内容未更新,是否更新?`, '提示', { this.$confirm(`您所更改的内容未更新,是否更新?`, '提示', {
@ -619,13 +619,12 @@ export default {
this.$post(this.api[params.projectManage.state ? 'updateProjectManage' : 'editProjectDraft'], params).then(res => { this.$post(this.api[params.projectManage.state ? 'updateProjectManage' : 'editProjectDraft'], params).then(res => {
util.successMsg("更新实验项目成功"); util.successMsg("更新实验项目成功");
this.updateTime = 0 this.updateTime = 0
this.next ? this.next() : this.$router.back(); this.next ? this.next() : this.backPage();
}).catch(err => { }).catch(err => {
this.submiting = false this.submiting = false
}); });
}, },
addProject (params) { // addProject (params) { //
console.log("🚀 ~ file: index.vue ~ line 448 ~ addProject ~ params", params)
this.$post(this.api[params.projectManage.state ? 'addProjectManage' : 'saveProjectDraft'], params).then(res => { this.$post(this.api[params.projectManage.state ? 'addProjectManage' : 'saveProjectDraft'], params).then(res => {
util.successMsg("添加实验项目成功"); util.successMsg("添加实验项目成功");
this.updateTime = 0 this.updateTime = 0
@ -874,12 +873,16 @@ export default {
}).then(() => { }).then(() => {
this.save(this.projectManage.state) this.save(this.projectManage.state)
}).catch(() => { }).catch(() => {
this.$router.back() this.backPage()
}) })
} else { } else {
this.$router.back() this.backPage()
} }
} },
backPage () {
const { params } = this.$store.state.project
this.$router.push(`/project?${qs.stringify(params.form)}&page=${params.page}`)
},
} }
}; };
</script> </script>

@ -12,7 +12,7 @@
<ul class="filter"> <ul class="filter">
<li> <li>
<label>创建人</label> <label>创建人</label>
<el-select v-model="queryData.founder" <el-select v-model="form.founder"
placeholder="请选择创建人" placeholder="请选择创建人"
@change="founderChange"> @change="founderChange">
<el-option v-for="(item,index) in founderList" <el-option v-for="(item,index) in founderList"
@ -23,7 +23,7 @@
</li> </li>
<li> <li>
<label>状态</label> <label>状态</label>
<el-select v-model="queryData.state" <el-select v-model="form.state"
clearable clearable
placeholder="请选择状态" placeholder="请选择状态"
@change="initData"> @change="initData">
@ -35,7 +35,7 @@
</li> </li>
<li> <li>
<label>用途</label> <label>用途</label>
<el-select v-model="queryData.permissions" <el-select v-model="form.permissions"
placeholder="请选择" placeholder="请选择"
@change="initData"> @change="initData">
<el-option v-for="item in permissionsList" <el-option v-for="item in permissionsList"
@ -56,7 +56,7 @@
<li> <li>
<el-input placeholder="请输入项目名称" <el-input placeholder="请输入项目名称"
prefix-icon="el-icon-search" prefix-icon="el-icon-search"
v-model="keyword" v-model="form.projectName"
clearable></el-input> clearable></el-input>
</li> </li>
</ul> </ul>
@ -216,22 +216,22 @@ export default {
return { return {
showBack: Boolean(this.$route.query.show), showBack: Boolean(this.$route.query.show),
lc: [11, 12, 19], lc: [11, 12, 19],
cid: [], cid: [this.$route.query.mallId ? +this.$route.query.mallId : '', this.$route.query.cid ? +this.$route.query.cid : ''],
curs: [], curs: [],
systemId: "",
systemList: [], systemList: [],
systemListAll: [], systemListAll: [],
curriculumId: '', curriculumId: '',
curriculumList: [], curriculumList: [],
queryData: { form: {
projectName: this.$route.query.projectName || '',
platformId: 1, // :1 :3 platformId: 1, // :1 :3
founder: +this.$route.query.founder || 2, // (0: 1: 2:) founder: +this.$route.query.founder || 2, // (0: 1: 2:)
state: "", // (0:稿 1:) state: this.$route.query.state ? +this.$route.query.state : '', // (0:稿 1:)
permissions: "", // (0: 1: 2:) permissions: this.$route.query.permissions ? +this.$route.query.permissions : '', // (0: 1: 2:)
cid: '', cid: this.$route.query.cid ? +this.$route.query.cid : '',
mallId: '' mallId: this.$route.query.mallId ? +this.$route.query.mallId : '',
systemId: this.$route.query.systemId ? +this.$route.query.systemId : '',
}, },
keyword: "",
status: "", status: "",
listData: [], listData: [],
total: 0, total: 0,
@ -312,46 +312,37 @@ export default {
...mapState("project", [ ...mapState("project", [
"lastSystemId", "lastSystemId",
"assFields", "assFields",
"queryDataStatus",
]) ])
}, },
watch: { watch: {
keyword: function (val) { 'form.projectName': function (val) {
clearTimeout(this.searchTimer); clearTimeout(this.searchTimer);
this.searchTimer = setTimeout(() => { this.searchTimer = setTimeout(() => {
this.initData(); this.initData();
}, 500); }, 500);
}, },
queryData: {
handler: function (newVal) {
this.setQueryStatus({ ...newVal })
},
deep: true
}
}, },
mounted () { mounted () {
const { query } = this.$route
if (query.page) {
this.$store.commit('project/setParams', null)
this.$router.push('list').catch(() => { })
}
this.getSystemData() this.getSystemData()
this.getData() this.getData()
if (this.queryDataStatus.platformId) {
this.queryData = this.queryDataStatus
}
}, },
methods: { methods: {
...mapActions("project", [ ...mapActions("project", [
"setSystemId" "setSystemId"
]), ]),
...mapMutations({
setQueryStatus: "project/SET_QUERYDATASTATUS"
}),
getData () { getData () {
this.setSystemId(this.systemId); this.setSystemId(this.form.systemId);
if (this.isFirst) this.page = +this.$route.query.page || 1 if (this.isFirst) this.page = +this.$route.query.page || 1
let data = { let data = {
...this.queryData, ...this.form,
projectName: this.keyword,
pageNum: this.page, pageNum: this.page,
pageSize: this.pageSize, pageSize: this.pageSize,
systemId: this.systemId,
}; };
this.$post(this.api.queryProjectManage, data).then(res => { this.$post(this.api.queryProjectManage, data).then(res => {
this.isFirst = false this.isFirst = false
@ -371,7 +362,7 @@ export default {
getschoolCourse () { getschoolCourse () {
this.$get(this.api.getSchoolEffectiveCourse).then(({ data }) => { this.$get(this.api.getSchoolEffectiveCourse).then(({ data }) => {
this.curriculumList = data this.curriculumList = data
const { mallId } = this.queryData const { mallId } = this.form
if (data.length) { if (data.length) {
this.cid = [mallId || data[0].mallId] this.cid = [mallId || data[0].mallId]
const all = this.systemListAll const all = this.systemListAll
@ -407,22 +398,24 @@ export default {
}, },
handleCurrentChange (val) { // handleCurrentChange (val) { //
this.page = val; this.page = val;
// this.$router.push({
// path: '/project/list',
// query: {
// ...this.$route.query,
// page: val
// }
// })
this.getData(); this.getData();
}, },
//
setCache () {
this.$store.commit('project/setParams', {
form: this.form,
page: this.page,
})
},
add () { // add () { //
this.setSystemId(this.systemId); this.setCache()
this.$router.push(`/project/add?founder=${this.queryData.founder}`); this.setSystemId(this.form.systemId);
this.$router.push(`/project/add?founder=${this.form.founder}`);
}, },
edit (row, show) { // edit (row, show) { //
this.setCache()
this.setSystemId(row.systemId); this.setSystemId(row.systemId);
this.$router.push(`/project/add?projectId=${row.projectId}&founder=${this.queryData.founder}${show ? `&show=1` : ''}`); this.$router.push(`/project/add?projectId=${row.projectId}&founder=${this.form.founder}${show ? `&show=1` : ''}`);
}, },
handleSelectionChange (val) { // handleSelectionChange (val) { //
this.multipleSelection = val; this.multipleSelection = val;
@ -442,7 +435,7 @@ export default {
this.$confirm("确定要删除吗?", "提示", { this.$confirm("确定要删除吗?", "提示", {
type: "warning" type: "warning"
}).then(() => { }).then(() => {
this.$post(`${this.api.deleteProjectManage}?projectIds=${ids}&platformId=${this.queryData.platformId}`).then(res => { this.$post(`${this.api.deleteProjectManage}?projectIds=${ids}&platformId=${this.form.platformId}`).then(res => {
util.successMsg("删除成功"); util.successMsg("删除成功");
this.$refs.table.clearSelection() this.$refs.table.clearSelection()
this.getData(); this.getData();
@ -463,7 +456,7 @@ export default {
}, },
// //
switchOff (row) { switchOff (row) {
this.$get(`${this.api.updateIsOpen}?isOpen=${row.ccupationlabOpen}&projectId=${row.projectId}&platformId=${this.queryData.platformId}`).then(res => { this.$get(`${this.api.updateIsOpen}?isOpen=${row.ccupationlabOpen}&projectId=${row.projectId}&platformId=${this.form.platformId}`).then(res => {
util.successMsg("更新启用状态成功"); util.successMsg("更新启用状态成功");
this.getData(); this.getData();
}).catch(err => { }).catch(err => {
@ -477,9 +470,9 @@ export default {
// //
this.cid = [mallId, this.curs.find(e => e.id === mallId).children[0].id] this.cid = [mallId, this.curs.find(e => e.id === mallId).children[0].id]
} }
this.queryData.mallId = mallId this.form.mallId = mallId
this.queryData.cid = this.curs.find(e => e.id === mallId).cid this.form.cid = this.curs.find(e => e.id === mallId).cid
this.systemId = this.cid[1] this.form.systemId = this.cid[1]
this.initData() this.initData()
}, },
copyData (projectId) { // id copyData (projectId) { // id
@ -494,10 +487,10 @@ export default {
} }
}) })
this.copyCurs = curs this.copyCurs = curs
this.copyMallId = [this.queryData.mallId, this.systemId] this.copyMallId = [this.form.mallId, this.form.systemId]
this.copyForm = { this.copyForm = {
projectName: res.projectManage.projectName, projectName: res.projectManage.projectName,
mallId: this.queryData.mallId mallId: this.form.mallId
} }
this.curRow = { this.curRow = {
projectManage: JSON.parse(JSON.stringify(res.projectManage)), projectManage: JSON.parse(JSON.stringify(res.projectManage)),

@ -63,7 +63,7 @@ export default {
data () { data () {
return { return {
isSq: Setting.isSq, isSq: Setting.isSq,
keyword: "", keyword: this.$route.query.keyword || '',
active: 0, active: 0,
tabs: [ tabs: [
{ {
@ -92,12 +92,10 @@ export default {
}).catch(err => { }) : }).catch(err => { }) :
this.$get(this.api.schoolCourse).then(res => { this.$get(this.api.schoolCourse).then(res => {
this.curriculumList = res.data; this.curriculumList = res.data;
}).catch(err => { }).catch(err => { });
console.log(err);
});
}, },
goPreview (item) { goPreview (item) {
this.$router.push(`/station/preview?courseId=${item.cid}&curriculumName=${item.goodsName}&mallId=${item.mallId || ''}`); this.$router.push(`/station/preview?courseId=${item.cid}&curriculumName=${item.goodsName}&mallId=${item.mallId || ''}&keyword=${this.keyword}`);
}, },
// tab // tab
tabChange (item) { tabChange (item) {

@ -562,7 +562,7 @@ export default {
goBack () { goBack () {
this.fromAdmin ? this.fromAdmin ?
this.$router.back() : this.$router.back() :
this.$router.push('/station') this.$router.push(`/station?keyword=${this.$route.query.keyword || ''}`)
}, },
init () { init () {
this.insertScript(); this.insertScript();

@ -30,7 +30,7 @@ if (isPro) {
sandPath = `http://${location.hostname}:9520` sandPath = `http://${location.hostname}:9520`
uploadURL = `http://121.37.12.51/` uploadURL = `http://121.37.12.51/`
host = "http://121.37.12.51/"; // 中台测试服 host = "http://121.37.12.51/"; // 中台测试服
// host = 'https://www.occupationlab.com/' // 正式服 host = 'https://www.occupationlab.com/' // 正式服
host = "http://192.168.31.51:9000/"; host = "http://192.168.31.51:9000/";
host = localStorage.getItem('localIp') == 1 ? 'http://192.168.31.51:9000/' : 'http://192.168.31.217:9000/' host = localStorage.getItem('localIp') == 1 ? 'http://192.168.31.51:9000/' : 'http://192.168.31.217:9000/'
} else if (isSq) { } else if (isSq) {

@ -1,5 +1,5 @@
/** /**
* 赛事相关 * 成绩相关
* */ * */
export default { export default {
namespaced: true, namespaced: true,

@ -4,12 +4,16 @@
export default { export default {
namespaced: true, namespaced: true,
state: { state: {
page: 1, params: null,
referrer: '',
cache: null cache: null
}, },
mutations: { mutations: {
setPage: (state, page) => { setParams: (state, val) => {
state.page = page state.params = val
},
setReferrer: (state, val) => {
state.referrer = val
}, },
setCache: (state, cache) => { setCache: (state, cache) => {
state.cache = cache state.cache = cache

@ -0,0 +1,17 @@
/**
* 考核相关
* */
export default {
namespaced: true,
state: {
params: null
},
mutations: {
setParams: (state, val) => {
state.params = val
}
},
actions: {
}
};

@ -0,0 +1,25 @@
/**
* 赛事相关
* */
export default {
namespaced: true,
state: {
params: null,
referrer: '',
cache: null
},
mutations: {
setParams: (state, val) => {
state.params = val
},
setReferrer: (state, val) => {
state.referrer = val
},
setCache: (state, cache) => {
state.cache = cache
}
},
actions: {
}
};

@ -4,12 +4,16 @@
export default { export default {
namespaced: true, namespaced: true,
state: { state: {
page: 1, params: null,
cache: null cache: null,
referrer: '',
}, },
mutations: { mutations: {
setPage: (state, page) => { setParams: (state, val) => {
state.page = page state.params = val
},
setReferrer: (state, val) => {
state.referrer = val
}, },
setCache: (state, cache) => { setCache: (state, cache) => {
state.cache = cache state.cache = cache

@ -0,0 +1,17 @@
/**
* 产品相关
* */
export default {
namespaced: true,
state: {
params: null
},
mutations: {
setParams: (state, val) => {
state.params = val
}
},
actions: {
}
};

@ -4,12 +4,16 @@
export default { export default {
namespaced: true, namespaced: true,
state: { state: {
params: null,
lastSystemId: "", lastSystemId: "",
projectFields: {}, projectFields: {},
assFields: {}, assFields: {},
queryDataStatus: {} queryDataStatus: null
}, },
mutations: { mutations: {
setParams: (state, val) => {
state.params = val
},
SET_SYSTEM_ID: (state, systemId) => { SET_SYSTEM_ID: (state, systemId) => {
state.lastSystemId = systemId; state.lastSystemId = systemId;
}, },
@ -19,9 +23,6 @@ export default {
SET_ASS: (state, assFields) => { SET_ASS: (state, assFields) => {
state.assFields = assFields; state.assFields = assFields;
}, },
SET_QUERYDATASTATUS: (state, newStatus) => {
state.queryDataStatus = newStatus
}
}, },
actions: { actions: {
setSystemId({ state, commit }, systemId) { setSystemId({ state, commit }, systemId) {

Loading…
Cancel
Save