+ :data="'全部项目/' + form.projectName"
+ :query="{
+ whetherToSignUp: $route.query.whetherToSignUp,
+ filterSort: $route.query.filterSort,
+ keyword: $route.query.keyword,
+ page: $route.query.page,
+ }">
管理项目
+ @click="toManage">管理项目
@@ -137,8 +137,6 @@
diff --git a/src/pages/activity/manage/manage/index.vue b/src/pages/activity/manage/manage/index.vue
index 8d4b72c..ee66765 100644
--- a/src/pages/activity/manage/manage/index.vue
+++ b/src/pages/activity/manage/manage/index.vue
@@ -28,12 +28,11 @@
diff --git a/src/pages/information/contentManage/index.vue b/src/pages/information/contentManage/index.vue
index bcda3b1..027ed8e 100644
--- a/src/pages/information/contentManage/index.vue
+++ b/src/pages/information/contentManage/index.vue
@@ -52,7 +52,6 @@ export default {
}).then(res => {
this.menuList = res.columnTree
const storeId = this.$store.state.info.columnId
- console.log("🚀 ~ file: index.vue ~ line 46 ~ getMenuData ~ storeId", storeId)
if (this.menuList.length) {
this.getId(this.menuList)
this.columnId = this.menuList[0].id
diff --git a/src/pages/match/add/index.vue b/src/pages/match/add/index.vue
index 657295f..6bfda41 100644
--- a/src/pages/match/add/index.vue
+++ b/src/pages/match/add/index.vue
@@ -118,6 +118,7 @@ import step2 from './step2'
import step3 from './step3'
import step4 from './step4'
import { Loading } from 'element-ui'
+import qs from 'qs'
export default {
name: "add",
data () {
@@ -289,7 +290,8 @@ export default {
}
},
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}`)
}
}
};
diff --git a/src/pages/match/list/index.vue b/src/pages/match/list/index.vue
index 5ac48c2..5180033 100644
--- a/src/pages/match/list/index.vue
+++ b/src/pages/match/list/index.vue
@@ -36,7 +36,7 @@
@@ -217,15 +217,12 @@
diff --git a/src/pages/match/manage/matchRank.vue b/src/pages/match/manage/matchRank.vue
index 34e1d7f..addc292 100644
--- a/src/pages/match/manage/matchRank.vue
+++ b/src/pages/match/manage/matchRank.vue
@@ -4,7 +4,7 @@
class="m-b-20 head-card">
@@ -286,7 +286,7 @@ export default {
competitionType: +this.$route.query.competitionType,
rule: +this.$route.query.rule,
searchTimer: null,
- keyword: '',
+ keyword: this.$route.query.keyword || '',
teamCalculationMethods: [
{
id: 0,
@@ -307,7 +307,7 @@ export default {
active: '',
grades: [],
list: [],
- page: 1,
+ page: +this.$route.query.page || 1,
pageSize: 10,
total: 0,
type: 0,
@@ -354,6 +354,13 @@ export default {
keyword: function (val) {
clearTimeout(this.searchTimer);
this.searchTimer = setTimeout(() => {
+ this.$router.push({
+ path: 'rank',
+ query: {
+ ...this.$route.query,
+ keyword: val
+ }
+ })
this.getRank();
}, 500);
}
@@ -407,7 +414,7 @@ export default {
keyword: this.keyword
}).then(({ page, publishStatus, total }) => {
this.published = publishStatus
- this.list = page
+ this.list = page || []
this.total = total
this.getPublishTime()
this.loading = false
@@ -454,8 +461,7 @@ export default {
this.getRank()
},
initData () {
- this.page = 1
- this.getData()
+ this.handleCurrentChange(1)
},
// tab回调
tabChange (i) {
@@ -551,6 +557,13 @@ export default {
this.multipleSelection = val;
},
handleCurrentChange (val) { // 切换分页
+ this.$router.push({
+ path: 'rank',
+ query: {
+ ...this.$route.query,
+ page: val
+ }
+ })
this.page = val;
this.getData();
},
@@ -771,6 +784,9 @@ export default {
this.getRank()
this.importVisible = false
},
+ back () {
+ this.$router.push(this.$store.state.match.referrer)
+ }
}
};
diff --git a/src/pages/match/manage/matchSignup.vue b/src/pages/match/manage/matchSignup.vue
index 77f37b3..ba9dda0 100644
--- a/src/pages/match/manage/matchSignup.vue
+++ b/src/pages/match/manage/matchSignup.vue
@@ -16,7 +16,7 @@
+ @change="disableChange">
{
+ this.$router.push({
+ path: 'manage',
+ query: {
+ ...this.$route.query,
+ keyword: val
+ }
+ })
this.initData();
}, 500);
}
@@ -496,6 +503,13 @@ export default {
this.multipleSelection = val;
},
handleCurrentChange (val) {
+ this.$router.push({
+ path: 'manage',
+ query: {
+ ...this.$route.query,
+ page: val
+ }
+ })
this.page = val;
this.getData();
},
@@ -509,6 +523,16 @@ export default {
if (column.prop === 'teamName') this.teamOrder = column.order ? column.order === 'ascending' ? 2 : 1 : ''
this.getData()
},
+ disableChange (val) {
+ this.$router.push({
+ path: 'manage',
+ query: {
+ ...this.$route.query,
+ isDisable: val
+ }
+ })
+ this.initData()
+ },
// 自动分配
autoAllocation () {
diff --git a/src/pages/match/manage/notice.vue b/src/pages/match/manage/notice.vue
index 6d79de0..3ee0107 100644
--- a/src/pages/match/manage/notice.vue
+++ b/src/pages/match/manage/notice.vue
@@ -65,7 +65,8 @@
layout="total, prev, pager, next"
:total="totals"
@current-change="handleCurrentChange"
- :current-page="pageNo">
+ :current-page="pageNo"
+ :page-size="pageSize">
@@ -76,7 +77,6 @@ import util from "@/libs/util";
import Setting from "@/setting";
export default {
- name: "matchSignup",
data () {
return {
token: util.local.get(Setting.tokenKey),
@@ -84,8 +84,8 @@ export default {
keyword: "",
listData: [],
multipleSelection: [],
- pageNo: 1,
- pageSize: 10,
+ pageNo: +this.$route.query.page || 1,
+ pageSize: 1,
totals: 0
};
},
@@ -112,6 +112,13 @@ export default {
this.multipleSelection = val;
},
handleCurrentChange (val) {
+ this.$router.push({
+ path: 'manage',
+ query: {
+ ...this.$route.query,
+ page: val
+ }
+ })
this.pageNo = val;
this.getData();
},
diff --git a/src/pages/product/list/index.vue b/src/pages/product/list/index.vue
index 7e33333..5b08879 100644
--- a/src/pages/product/list/index.vue
+++ b/src/pages/product/list/index.vue
@@ -194,10 +194,8 @@
diff --git a/src/pages/project/list/index.vue b/src/pages/project/list/index.vue
index bac9c62..7842a5d 100644
--- a/src/pages/project/list/index.vue
+++ b/src/pages/project/list/index.vue
@@ -12,7 +12,7 @@
-
-
-
-
@@ -35,7 +35,7 @@
-
-
@@ -216,22 +216,22 @@ export default {
return {
showBack: Boolean(this.$route.query.show),
lc: [11, 12, 19],
- cid: [],
+ cid: [this.$route.query.mallId ? +this.$route.query.mallId : '', this.$route.query.cid ? +this.$route.query.cid : ''],
curs: [],
- systemId: "",
systemList: [],
systemListAll: [],
curriculumId: '',
curriculumList: [],
- queryData: {
+ form: {
+ projectName: this.$route.query.projectName || '',
platformId: 1, // 平台:职站:1 中台:3
founder: +this.$route.query.founder || 2, // 创建人角色(0:系统 1:老师 2:全部)
- state: "", // 状态(0:草稿箱 1:已发布)
- permissions: "", // 项目用途(0:练习 1:考核 2:竞赛)
- cid: '',
- mallId: ''
+ state: this.$route.query.state ? +this.$route.query.state : '', // 状态(0:草稿箱 1:已发布)
+ permissions: this.$route.query.permissions ? +this.$route.query.permissions : '', // 项目用途(0:练习 1:考核 2:竞赛)
+ cid: this.$route.query.cid ? +this.$route.query.cid : '',
+ mallId: this.$route.query.mallId ? +this.$route.query.mallId : '',
+ systemId: this.$route.query.systemId ? +this.$route.query.systemId : '',
},
- keyword: "",
status: "",
listData: [],
total: 0,
@@ -312,46 +312,37 @@ export default {
...mapState("project", [
"lastSystemId",
"assFields",
- "queryDataStatus",
])
},
watch: {
- keyword: function (val) {
+ 'form.projectName': function (val) {
clearTimeout(this.searchTimer);
this.searchTimer = setTimeout(() => {
this.initData();
}, 500);
},
- queryData: {
- handler: function (newVal) {
- this.setQueryStatus({ ...newVal })
- },
- deep: true
- }
},
mounted () {
+ const { query } = this.$route
+ if (query.page) {
+ this.$store.commit('project/setParams', null)
+ this.$router.push('list').catch(() => { })
+ }
+
this.getSystemData()
this.getData()
- if (this.queryDataStatus.platformId) {
- this.queryData = this.queryDataStatus
- }
},
methods: {
...mapActions("project", [
"setSystemId"
]),
- ...mapMutations({
- setQueryStatus: "project/SET_QUERYDATASTATUS"
- }),
getData () {
- this.setSystemId(this.systemId);
+ this.setSystemId(this.form.systemId);
if (this.isFirst) this.page = +this.$route.query.page || 1
let data = {
- ...this.queryData,
- projectName: this.keyword,
+ ...this.form,
pageNum: this.page,
pageSize: this.pageSize,
- systemId: this.systemId,
};
this.$post(this.api.queryProjectManage, data).then(res => {
this.isFirst = false
@@ -371,7 +362,7 @@ export default {
getschoolCourse () {
this.$get(this.api.getSchoolEffectiveCourse).then(({ data }) => {
this.curriculumList = data
- const { mallId } = this.queryData
+ const { mallId } = this.form
if (data.length) {
this.cid = [mallId || data[0].mallId]
const all = this.systemListAll
@@ -407,22 +398,24 @@ export default {
},
handleCurrentChange (val) { // 切换页码
this.page = val;
- // this.$router.push({
- // path: '/project/list',
- // query: {
- // ...this.$route.query,
- // page: val
- // }
- // })
this.getData();
},
+ // 缓存参数及分页
+ setCache () {
+ this.$store.commit('project/setParams', {
+ form: this.form,
+ page: this.page,
+ })
+ },
add () { // 新增项目
- this.setSystemId(this.systemId);
- this.$router.push(`/project/add?founder=${this.queryData.founder}`);
+ this.setCache()
+ this.setSystemId(this.form.systemId);
+ this.$router.push(`/project/add?founder=${this.form.founder}`);
},
edit (row, show) { // 编辑
+ this.setCache()
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) { // 处理多选
this.multipleSelection = val;
@@ -442,7 +435,7 @@ export default {
this.$confirm("确定要删除吗?", "提示", {
type: "warning"
}).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("删除成功");
this.$refs.table.clearSelection()
this.getData();
@@ -463,7 +456,7 @@ export default {
},
// 项目禁用
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("更新启用状态成功");
this.getData();
}).catch(err => {
@@ -477,9 +470,9 @@ export default {
// 如果选择的是课程,则默认选中下面第一个系统
this.cid = [mallId, this.curs.find(e => e.id === mallId).children[0].id]
}
- this.queryData.mallId = mallId
- this.queryData.cid = this.curs.find(e => e.id === mallId).cid
- this.systemId = this.cid[1]
+ this.form.mallId = mallId
+ this.form.cid = this.curs.find(e => e.id === mallId).cid
+ this.form.systemId = this.cid[1]
this.initData()
},
copyData (projectId) { // 复制,根据项目id查询详情
@@ -494,10 +487,10 @@ export default {
}
})
this.copyCurs = curs
- this.copyMallId = [this.queryData.mallId, this.systemId]
+ this.copyMallId = [this.form.mallId, this.form.systemId]
this.copyForm = {
projectName: res.projectManage.projectName,
- mallId: this.queryData.mallId
+ mallId: this.form.mallId
}
this.curRow = {
projectManage: JSON.parse(JSON.stringify(res.projectManage)),
diff --git a/src/pages/station/list/index.vue b/src/pages/station/list/index.vue
index add214a..87dc58c 100644
--- a/src/pages/station/list/index.vue
+++ b/src/pages/station/list/index.vue
@@ -63,7 +63,7 @@ export default {
data () {
return {
isSq: Setting.isSq,
- keyword: "",
+ keyword: this.$route.query.keyword || '',
active: 0,
tabs: [
{
@@ -92,12 +92,10 @@ export default {
}).catch(err => { }) :
this.$get(this.api.schoolCourse).then(res => {
this.curriculumList = res.data;
- }).catch(err => {
- console.log(err);
- });
+ }).catch(err => { });
},
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切换
tabChange (item) {
diff --git a/src/pages/station/preview/index.vue b/src/pages/station/preview/index.vue
index 497e00e..cce8abe 100644
--- a/src/pages/station/preview/index.vue
+++ b/src/pages/station/preview/index.vue
@@ -562,7 +562,7 @@ export default {
goBack () {
this.fromAdmin ?
this.$router.back() :
- this.$router.push('/station')
+ this.$router.push(`/station?keyword=${this.$route.query.keyword || ''}`)
},
init () {
this.insertScript();
diff --git a/src/setting.js b/src/setting.js
index 9f67ee8..fade122 100644
--- a/src/setting.js
+++ b/src/setting.js
@@ -30,7 +30,7 @@ if (isPro) {
sandPath = `http://${location.hostname}:9520`
uploadURL = `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 = localStorage.getItem('localIp') == 1 ? 'http://192.168.31.51:9000/' : 'http://192.168.31.217:9000/'
} else if (isSq) {
diff --git a/src/store/modules/achievement.js b/src/store/modules/achievement.js
index b0c309d..0907470 100644
--- a/src/store/modules/achievement.js
+++ b/src/store/modules/achievement.js
@@ -1,5 +1,5 @@
/**
- * 赛事相关
+ * 成绩相关
* */
export default {
namespaced: true,
diff --git a/src/store/modules/activity.js b/src/store/modules/activity.js
index 80d87ff..834c429 100644
--- a/src/store/modules/activity.js
+++ b/src/store/modules/activity.js
@@ -4,12 +4,16 @@
export default {
namespaced: true,
state: {
- page: 1,
+ params: null,
+ referrer: '',
cache: null
},
mutations: {
- setPage: (state, page) => {
- state.page = page
+ setParams: (state, val) => {
+ state.params = val
+ },
+ setReferrer: (state, val) => {
+ state.referrer = val
},
setCache: (state, cache) => {
state.cache = cache
diff --git a/src/store/modules/assessment.js b/src/store/modules/assessment.js
new file mode 100644
index 0000000..cf9a70b
--- /dev/null
+++ b/src/store/modules/assessment.js
@@ -0,0 +1,17 @@
+/**
+ * 考核相关
+ * */
+export default {
+ namespaced: true,
+ state: {
+ params: null
+ },
+ mutations: {
+ setParams: (state, val) => {
+ state.params = val
+ }
+ },
+ actions: {
+
+ }
+};
\ No newline at end of file
diff --git a/src/store/modules/expSystem.js b/src/store/modules/expSystem.js
new file mode 100644
index 0000000..834c429
--- /dev/null
+++ b/src/store/modules/expSystem.js
@@ -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: {
+
+ }
+};
\ No newline at end of file
diff --git a/src/store/modules/match.js b/src/store/modules/match.js
index 80d87ff..b216890 100644
--- a/src/store/modules/match.js
+++ b/src/store/modules/match.js
@@ -4,12 +4,16 @@
export default {
namespaced: true,
state: {
- page: 1,
- cache: null
+ params: null,
+ cache: null,
+ referrer: '',
},
mutations: {
- setPage: (state, page) => {
- state.page = page
+ setParams: (state, val) => {
+ state.params = val
+ },
+ setReferrer: (state, val) => {
+ state.referrer = val
},
setCache: (state, cache) => {
state.cache = cache
diff --git a/src/store/modules/product.js b/src/store/modules/product.js
new file mode 100644
index 0000000..85ad0a2
--- /dev/null
+++ b/src/store/modules/product.js
@@ -0,0 +1,17 @@
+/**
+ * 产品相关
+ * */
+export default {
+ namespaced: true,
+ state: {
+ params: null
+ },
+ mutations: {
+ setParams: (state, val) => {
+ state.params = val
+ }
+ },
+ actions: {
+
+ }
+};
\ No newline at end of file
diff --git a/src/store/modules/project.js b/src/store/modules/project.js
index b3d7bd6..5ec433e 100644
--- a/src/store/modules/project.js
+++ b/src/store/modules/project.js
@@ -4,12 +4,16 @@
export default {
namespaced: true,
state: {
+ params: null,
lastSystemId: "",
projectFields: {},
assFields: {},
- queryDataStatus: {}
+ queryDataStatus: null
},
mutations: {
+ setParams: (state, val) => {
+ state.params = val
+ },
SET_SYSTEM_ID: (state, systemId) => {
state.lastSystemId = systemId;
},
@@ -19,9 +23,6 @@ export default {
SET_ASS: (state, assFields) => {
state.assFields = assFields;
},
- SET_QUERYDATASTATUS: (state, newStatus) => {
- state.queryDataStatus = newStatus
- }
},
actions: {
setSystemId({ state, commit }, systemId) {