From 7d038719a5ac94fc4122ae5edfed3dba09666388 Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Mon, 22 Apr 2024 17:39:16 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"Revert=20"=E5=85=A8=E7=AB=99=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E7=AD=9B=E9=80=89=E5=8A=9F=E8=83=BD=E7=BC=93=E5=AD=98?= =?UTF-8?q?""?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 7d969302d8df7c73fe00669f973099e873aec55c. --- public/index.html | 2 +- src/pages/achievement/info/course.vue | 11 +- src/pages/achievement/info/project.vue | 34 +- src/pages/achievement/list/course.vue | 31 +- src/pages/achievement/list/project.vue | 126 ++--- src/pages/activity/details/index.vue | 8 +- src/pages/activity/list/index.vue | 47 +- src/pages/activity/manage/add/index.vue | 8 +- src/pages/activity/manage/list/index.vue | 39 +- src/pages/activity/manage/manage/index.vue | 14 +- src/pages/activity/manage/manage/notice.vue | 20 +- src/pages/assessment/add/index.vue | 7 +- src/pages/assessment/list/index.vue | 53 ++- .../course/list/courseManagement/index.vue | 43 +- src/pages/expSystem/backstage/index.vue | 5 +- src/pages/expSystem/backstage/model.vue | 9 +- src/pages/expSystem/backstage/sourceModel.vue | 9 +- src/pages/expSystem/list/index.vue | 47 +- .../information/contentManage/contentList.vue | 432 ++++++++++-------- src/pages/information/contentManage/index.vue | 1 - src/pages/match/add/index.vue | 4 +- src/pages/match/list/index.vue | 44 +- src/pages/match/manage/index.vue | 4 +- src/pages/match/manage/matchArch.vue | 2 + src/pages/match/manage/matchArchList.vue | 28 +- src/pages/match/manage/matchRank.vue | 28 +- src/pages/match/manage/matchSignup.vue | 32 +- src/pages/match/manage/notice.vue | 15 +- src/pages/product/list/index.vue | 22 +- src/pages/product/show/index.vue | 9 +- src/pages/project/add/index.vue | 15 +- src/pages/project/list/index.vue | 89 ++-- src/pages/station/list/index.vue | 8 +- src/pages/station/preview/index.vue | 2 +- src/setting.js | 2 +- src/store/modules/achievement.js | 2 +- src/store/modules/activity.js | 10 +- src/store/modules/assessment.js | 17 + src/store/modules/expSystem.js | 25 + src/store/modules/match.js | 12 +- src/store/modules/product.js | 17 + src/store/modules/project.js | 9 +- 42 files changed, 827 insertions(+), 515 deletions(-) create mode 100644 src/store/modules/assessment.js create mode 100644 src/store/modules/expSystem.js create mode 100644 src/store/modules/product.js diff --git a/public/index.html b/public/index.html index 7b9845e..2a0608a 100644 --- a/public/index.html +++ b/public/index.html @@ -10,7 +10,7 @@ var _hmt = _hmt || []; (function() { 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]; s.parentNode.insertBefore(hm, s); })(); diff --git a/src/pages/achievement/info/course.vue b/src/pages/achievement/info/course.vue index 3c7bcda..9239b4e 100644 --- a/src/pages/achievement/info/course.vue +++ b/src/pages/achievement/info/course.vue @@ -302,7 +302,7 @@ export default { listDataAll: [], listData: [], multipleSelection: [], - page: 1, + page: +this.$route.query.page || 1, pageSize: 10, total: 0, peopleNum: 0, // 总人数 @@ -501,6 +501,13 @@ export default { this.multipleSelection = val; }, handleCurrentChange (val) { // 切换分页 + this.$router.push({ + path: 'course', + query: { + ...this.$route.query, + page: this.val + } + }) this.page = val this.getData(); }, @@ -699,7 +706,7 @@ export default { echarts.init(document.querySelector(`#chart1`)).setOption(option) }, back () { - location.href = this.$store.state.achievement.referrer + this.$router.push(this.$store.state.achievement.referrer) }, } }; diff --git a/src/pages/achievement/info/project.vue b/src/pages/achievement/info/project.vue index add97b0..2e23a81 100644 --- a/src/pages/achievement/info/project.vue +++ b/src/pages/achievement/info/project.vue @@ -76,7 +76,7 @@
+ @tab-click="tabChange"> 筛选
    -
  • 筛选
      -
    • +
    • - +
    • - {{ item.name }}
    • -
    • +
    • -
    • - +
    @@ -95,7 +95,7 @@ {{ scope.$index + (page - 1) * pageSize + 1 }} - 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) {