dev_202412
yujialong 1 month ago
parent ad9235ba24
commit 61067a7b25
  1. 1
      src/api/index.js
  2. 2
      src/layouts/header/index.vue
  3. 1
      src/pages/account/login/index.vue
  4. 34
      src/pages/ass/list/index.vue
  5. 2
      src/pages/match/details/index.vue
  6. 2
      src/pages/match/list/index.vue
  7. 2
      src/pages/record/list/ass.vue
  8. 11
      src/pages/record/list/index.vue
  9. 2
      src/pages/record/list/practice.vue
  10. 2
      src/pages/station/preview/index.vue
  11. 2
      src/pages/touristMatch/list/index.vue
  12. 2
      src/plugins/requests/index.js
  13. 42
      src/router/permission.js
  14. 2
      src/store/modules/user.js

@ -113,6 +113,7 @@ export default {
editExperimentalData: 'occupationlab/occupationlab/experimentalReport/editExperimentalData',
getSystemIdBySchool: `occupationlab/occupationlab/projectManage/getSystemIdBySchool`,
getSchoolEffectiveCourse: `nakadai/nakadai/curriculum/getSchoolEffectiveCourse`,
getAllActiveCoursesForStudents: `nakadai/nakadai/curriculum/getAllActiveCoursesForStudents`,
// 考核列表
pageStuAssessment: `occupationlab/occupationlab/assessment/pageStuAssessment`, // 学生端——学生考核列表

@ -80,7 +80,7 @@ export default {
isDev: Setting.isDev,
isZj: location.host === '10.60.32.76', //
isSq: Setting.isSq,
token: Util.session.get(Setting.tokenKey), // token
token: Util.local.get(Setting.tokenKey), // token
serverToken: Util.local.get('oc_server_token'), // token
cName: Util.cookies.get('customerName'),
isIndex: Setting.whiteList.find(e => e === this.$route.path), //

@ -393,6 +393,7 @@ export default {
},
//
setLogin () {
Util.local.set(Setting.tokenKey, this.token)
Util.session.set(Setting.tokenKey, this.token)
this.getOss()
Util.cookies.remove('serverLogin')

@ -22,10 +22,10 @@
<ul class="filter">
<li>
<label>课程名称</label>
<el-select size="small" v-model="form.mallId" @change="initData">
<el-select size="small" v-model="form.curriculumId" clearable @change="initData">
<el-option label="不限" value=""></el-option>
<el-option v-for="(item, index) in courseList" :key="index" :label="item.goodsName"
:value="item.mallId"></el-option>
<el-option v-for="(item, index) in courseList" :key="index" :label="item.curriculumName"
:value="item.cid"></el-option>
</el-select>
</li>
<li>
@ -115,6 +115,7 @@ import Setting from "@/setting";
import Util from "@/libs/util";
import Bus from '@/libs/bus'
import qs from 'qs'
import Cookies from 'js-cookie'
export default {
name: "ass",
data () {
@ -146,6 +147,7 @@ export default {
startTime: this.$route.query.startTime || '',
endTime: this.$route.query.endTime || '',
status: this.$route.query.status ? +this.$route.query.status : '',
curriculumId: +this.$route.query.curriculumId || '',
mallId: +this.$route.query.mallId || '',
classId: +this.$route.query.classId || ''
},
@ -269,13 +271,15 @@ export default {
}, 1000);
},
getData () {
this.listLoading = true;
let data = {
this.listLoading = true
const cid = this.form.curriculumId
const cur = this.courseList.find(e => e.cid === cid)
this.$post(this.api.pageStuAssessment, {
...this.form,
mallId: cur ? cur.mallId || '' : '',
pageNum: this.page,
pageSize: this.pageSize
};
this.$post(this.api.pageStuAssessment, data).then(res => {
}).then(res => {
this.listData = res.list;
this.totals = res.total;
this.listData.forEach(i => {
@ -310,13 +314,12 @@ export default {
});
},
initData () {
this.page = 1;
this.getData();
this.page = 1
this.getData()
},
getCourseData () {
this.$get(this.api.getPythonSysByStuAccountId).then(res => {
this.courseList = res.list;
}).catch(err => { });
async getCourseData () {
const res = await this.$get(this.api.getAllActiveCoursesForStudents)
this.courseList = res.data
},
getClassData () {
this.$post(this.api.myClassByStudent).then(({ data }) => {
@ -386,8 +389,8 @@ export default {
const classId = this.classId
const classItem = this.classList.find(e => e.id == classId)
const row = this.curRow
const { curriculumId, paperId, mallId } = row
let { curriculumId, paperId, mallId } = row
if (!mallId) mallId = ''
//
if (paperId) {
window.open(this.$router.resolve(`/theoryExam?paperId=${paperId}&assessmentId=${this.assessmentId}&classId=${classId}&cid=${this.cid}&mallId=${mallId}&curriculumName=${row.sysName}`).href, 'theory')
@ -419,6 +422,7 @@ export default {
window.open(`http://${Setting.zcPath}?systemId=${this.systemId}&courseId=${this.cid}&projectId=${this.projectId}&token=${token}&userId=${this.userId}&assessmentId=${this.assessmentId}&classId=${classId}&mallId=${mallId}${Setting.isTest ? '&beta=1' : ''}`);
} else if (curriculumId == 19) {
//
Cookies.set('sand-projectId', this.projectId)
href = `${Setting.sandPath}/#/?curriculumName=${row.sysName}&token=${token}&cid=${this.cid}&mallId=${mallId}&systemId=${this.systemId}&projectId=${this.projectId}&assessmentId=${this.assessmentId}&classId=${classId}&startTime=${row.startTime}&stopTime=${row.stopTime}&userId=${this.userId}&account=${this.account}&referrer=${encodeURIComponent(location.href)}`
} else {
if (process.env.NODE_ENV === 'development') {

@ -621,6 +621,7 @@ import OSS from 'ali-oss'
import OssConfig from '@/components/upload/config.js'
import Oss from '@/components/upload/upload.js'
import _ from 'lodash'
import Cookies from 'js-cookie'
export default {
name: 'matchdetail',
data () {
@ -1810,6 +1811,7 @@ export default {
window.open(`http://${Setting.zcPath}?systemId=${systemId}&courseId=${cid}&projectId=${projectId}&token=${token}&userId=${this.userId}&classId=1&competitionId=${competitionId}&stageId=${stageId}&teamId=${teamId}&startTime=${startTime}&endTime=${endTime}&mallId=${mallId}${Setting.isTest ? '&beta=1' : ''}`);
} else if (systemId == 19) {
//
Cookies.set('sand-projectId', projectId)
location.href = `${Setting.sandPath}/#/?curriculumName=${systemName}&token=${token}&cid=${cid}&mallId=${mallId}&systemId=${systemId}&projectId=${projectId}&assessmentId=&classId=&startTime=&stopTime=${endTime}&competitionId=${competitionId}&stageId=${stageId}&teamId=${teamId}&resultAnnouncementTime=${isNaN(resultAnnouncementTime) ? '' : resultAnnouncementTime}&userId=${this.userId}&account=${this.account}&referrer=${encodeURIComponent(location.href)}`
} else {
// python

@ -335,6 +335,7 @@ import OSS from 'ali-oss'
import OssConfig from '@/components/upload/config.js'
import Oss from '@/components/upload/upload.js'
import qs from 'qs'
import Cookies from 'js-cookie'
export default {
name: "match",
data () {
@ -1130,6 +1131,7 @@ export default {
window.open(`http://${Setting.zcPath}?systemId=${systemId}&courseId=${cid}&projectId=${projectId}&token=${token}&userId=${this.userId}&classId=1&competitionId=${competitionId}&stageId=${stageId}&teamId=${teamId}&startTime=${startTime}&endTime=${endTime}&mallId=${mallId}${Setting.isTest ? '&beta=1' : ''}`);
} else if (systemId == 19) {
//
Cookies.set('sand-projectId', projectId)
location.href = `${Setting.sandPath}/#/?curriculumName=${systemName}&token=${token}&cid=${cid}&mallId=${mallId}&systemId=${systemId}&projectId=${projectId}&assessmentId=&classId=&startTime=&stopTime=${endTime}&competitionId=${competitionId}&stageId=${stageId}&teamId=${teamId}&resultAnnouncementTime=${isNaN(resultAnnouncementTime) ? '' : resultAnnouncementTime}&userId=${this.userId}&account=${this.account}&referrer=${encodeURIComponent(location.href)}`
} else {
// python

@ -40,7 +40,7 @@ export default {
};
},
watch: {
mallId: function (val) {
curriculumId: function (val) {
if (this.$route.query.page) {
this.getData()
this.$router.push('list').catch(() => { })

@ -43,9 +43,9 @@
</div>
<li style="margin-right: 0">
<label>课程选择</label>
<el-select v-model="mallId" @change="curChange">
<el-select v-model="curriculumId" @change="curChange">
<el-option v-for="(item, i) in curs" :key="i" :label="item.curriculumName"
:value="item.mallId"></el-option>
:value="item.cid"></el-option>
</el-select>
<el-button style="margin-left: 20px;" type="primary" @click="exportData">导出数据</el-button>
</li>
@ -112,17 +112,18 @@ export default {
methods: {
//
async getCourse () {
const { data } = await this.$get(this.api.getSchoolEffectiveCourse)
const { data } = await this.$get(this.api.getAllActiveCoursesForStudents)
if (data.length) {
this.curs = data
const { mallId, curriculumId } = this.$route.query
this.mallId = mallId ? +mallId : data[0].mallId
this.mallId = curriculumId ? mallId || '' : data[0].mallId || ''
this.curriculumId = curriculumId ? +curriculumId : data[0].cid
}
},
//
curChange (id) {
this.curriculumId = this.curs.find(e => e.mallId == id).cid
const cur = this.curs.find(e => e.cid == id)
this.mallId = cur.mallId || ''
},
getData () { //

@ -34,7 +34,7 @@ export default {
};
},
watch: {
mallId: function (val) {
curriculumId: function (val) {
if (this.$route.query.page) {
this.getData()
this.$router.push('list').catch(() => { })

@ -309,6 +309,7 @@ import breadcrumb from '@/components/breadcrumb'
import pdfDia from '@/components/pdf'
import Editor from '@tinymce/tinymce-vue'
import editorConfig from '@/components/editor'
import Cookies from 'js-cookie'
export default {
components: { pdf, breadcrumb, pdfDia, quill, Editor },
data () {
@ -950,6 +951,7 @@ export default {
window.open(`http://${Setting.zcPath}?systemId=${systemId}&courseId=${this.courseId}&projectId=${this.curProject}&token=${token}&userId=${this.userId}&classId=1&mallId=${this.mallId}${Setting.isTest ? '&beta=1' : ''}`);
} else if (systemId == 19) {
//
Cookies.set('sand-projectId', this.curProject)
location.href = `${Setting.sandPath}/#/?curriculumName=${this.curriculumName}&token=${token}&cid=${this.courseId}&mallId=${this.mallId}&systemId=${this.systemIds}&projectId=${this.curProject}&assessmentId=&classId=&stopTime=&referrer=${encodeURIComponent(location.href)}`
} else {
// python

@ -267,6 +267,7 @@ import { mapState, mapMutations } from "vuex";
import { Loading } from "element-ui";
import Setting from "@/setting"
import Util from "@/libs/util"
import Cookies from 'js-cookie'
export default {
name: "match",
@ -850,6 +851,7 @@ export default {
window.open(`http://120.78.139.126:8879?systemId=${systemId}&courseId=${cid}&projectId=${projectId}&token=${token}&userId=${this.userId}&classId=1&competitionId=${competitionId}&stageId=${stageId}&teamId=${teamId}`);
} else if (systemId == 19) {
//
Cookies.set('sand-projectId', projectId)
location.href = `${Setting.sandPath}/#/?curriculumName=${systemName}&token=${token}&cid=${cid}&mallId=${mallId}&systemId=${systemId}&projectId=${projectId}&assessmentId=&classId=&startTime=&stopTime=${endTime}&competitionId=${competitionId}&stageId=${stageId}&teamId=${teamId}&resultAnnouncementTime=${isNaN(resultAnnouncementTime) ? '' : resultAnnouncementTime}&userId=${this.userId}&account=${this.account}&referrer=${encodeURIComponent(location.href)}`
} else {
// python

@ -40,6 +40,7 @@ service.interceptors.response.use(
if (!logouted) {
Util.local.remove(Setting.storeKey)
Util.local.remove(Setting.tokenKey)
Util.session.remove(Setting.tokenKey)
Util.errorMsg(res.msg.includes('顶') ? '您的账号已在其他设备登录,您已被迫下线!' : '登录过期,请重新登录!')
setTimeout(() => {
router.replace({
@ -74,6 +75,7 @@ service.interceptors.response.use(
if (!logouted) {
Util.local.remove(Setting.storeKey)
Util.local.remove(Setting.tokenKey)
Util.session.remove(Setting.tokenKey)
Util.errorMsg("登录过期,请重新登录")
setTimeout(() => {
router.replace({

@ -1,27 +1,35 @@
import router from "./index";
import Setting from "@/setting";
import util from "@/libs/util";
import Setting from '@/setting'
import Util from '@/libs/util'
const whiteList = Setting.whiteList // 白名单
router.beforeEach((to, from, next) => {
const officalTag = from.query.q && !to.query.q ? ((to.fullPath.includes('?') ? '&' : '?') + `q=${Date.now()}`) : '' // 安财赛事专用标识
document.title = to.path === '/screenShow' || to.path === '/screenShowPro' ? '安徽省绿色食品全产业链数据可视化看板' : Setting.titleSuffix + '-' + to.meta.title
const role = util.session.get(Setting.tokenKey);
if (!role && !whiteList.includes(to.path)) {
const localToken = Util.local.get(Setting.tokenKey)
const sessionToken = Util.session.get(Setting.tokenKey)
if (!localToken && sessionToken && !whiteList.includes(to.path)) {
// sessionStorage里有token,localStorage里没有,则直接退出登录
Util.session.remove(Setting.tokenKey)
next('/login' + officalTag)
} else if (role && to.path === '/login') {
next('/station' + officalTag)
} else {
if (to.query.q || !from.query.q) {
next()
} else if (from.query.q) {
next({
path: to.path,
query: {
...to.query,
q: Date.now()
}
})
if (!sessionToken && !whiteList.includes(to.path)) {
next('/login' + officalTag)
} else if (sessionToken && to.path === '/login') {
next('/station' + officalTag)
} else {
if (to.query.q || !from.query.q) {
next()
} else if (from.query.q) {
next({
path: to.path,
query: {
...to.query,
q: Date.now()
}
})
}
}
}
});
})

@ -88,10 +88,12 @@ export default {
return new Promise((resolve, reject) => {
post(api.logout).then(() => {
util.local.remove(Setting.storeKey)
util.local.remove(Setting.tokenKey)
util.session.remove(Setting.tokenKey)
util.local.remove('oc_server_token')
util.local.remove('oc_server_store')
util.cookies.remove('customerName')
window.opener && window.opener.location.reload()
location.reload()
resolve()
}).catch(error => {

Loading…
Cancel
Save