去掉定时器等

dev_2022-06-14
yujialong 3 years ago
parent dd68df3faa
commit 64dd3eac9b
  1. 86
      src/api/index.js
  2. 16
      src/layouts/navbar/index.vue
  3. 20
      src/libs/util.js
  4. 11
      src/pages/account/login/index.vue
  5. 6
      src/pages/index/list/index.vue
  6. 18
      src/pages/match/details/index.vue
  7. 8
      src/pages/match/list/index.vue
  8. 2
      src/pages/match/noticeDetail/index.vue
  9. 5
      src/pages/station/preview/index.vue
  10. 47
      src/pages/touristMatch/list/index.vue
  11. 25
      src/setting.js
  12. 6
      src/store/modules/match.js

@ -1,24 +1,24 @@
import Setting from "@/setting"; import Setting from "@/setting";
const host = Setting.apiBaseURL; const host = Setting.apiBaseURL;
const uploadURL = "http://121.37.12.51:9000/"; const uploadURL = location.origin + '/'
export default { export default {
logins: `users/users/user/login`, logins: `users/users/user/login`,
verification: `${host}users/users/user/captcha`,// 验证码图片 verification: `${host}users/users/user/captcha`,// 验证码图片
logoDetail: `occupationlab/sys/logo/detail`, //查看系统设置信息 logoDetail: `occupationlab/occupationlab/sys/logo/detail`, //查看系统设置信息
isClient: `${host}users/users/user/isClient`, isClient: `${host}users/users/user/isClient`,
sendPhoneVerificationCode: `users/users/user/sendPhoneVerificationCode`, sendPhoneVerificationCode: `users/users/user/sendPhoneVerificationCode`,
getToken: `users/users/user/getToken`, getToken: `users/users/user/getToken`,
getOtherAccountByPhone: `users/users/user/getOtherAccountByPhone`, getOtherAccountByPhone: `users/users/user/getOtherAccountByPhone`,
unbindAccounts: `users/users/user/unbindAccounts`, unbindAccounts: `users/users/user/unbindAccounts`,
platformLogList: `nakadai/log/platformLogList`, platformLogList: `nakadai/nakadai/log/platformLogList`,
logNotification: `nakadai/log/logNotification`, logNotification: `nakadai/nakadai/log/logNotification`,
//实验台 //实验台
curriculumDetail: `nakadai/nakadai/curriculum/curriculumDetail`, // 课程详情 curriculumDetail: `nakadai/nakadai/curriculum/curriculumDetail`, // 课程详情
curriculumChapter: `nakadai/curriculum/chapter/queryChaptersAndSubsections`, // 根据课程id查询章节小节,树状结构 curriculumChapter: `nakadai/nakadai/curriculum/chapter/queryChaptersAndSubsections`, // 根据课程id查询章节小节,树状结构
curriculumGetSubsection: `nakadai/curriculum/subsection/getSubsection`, // 根据小节id获取预览文件地址 curriculumGetSubsection: `nakadai/nakadai/curriculum/subsection/getSubsection`, // 根据小节id获取预览文件地址
// 能力测评 // 能力测评
canExperiment: `occupationlab/occupationlab/evaluationrecord/can_experiment`, // 查询是否能够开启实验 canExperiment: `occupationlab/occupationlab/evaluationrecord/can_experiment`, // 查询是否能够开启实验
@ -34,52 +34,52 @@ export default {
// 实验记录 // 实验记录
schoolCourse: `nakadai/nakadai/curriculum/schoolCourse`, // 获取学校购买订单后的课程 schoolCourse: `nakadai/nakadai/curriculum/schoolCourse`, // 获取学校购买订单后的课程
experimentOverview: `occupationlab/achievement/experimentOverview`, //实验概览 experimentOverview: `occupationlab/occupationlab/achievement/experimentOverview`, //实验概览
queryAssessmentByStudent: `occupationlab/achievement/queryAssessmentByStudent`, //学生端考核成绩 queryAssessmentByStudent: `occupationlab/occupationlab/achievement/queryAssessmentByStudent`, //学生端考核成绩
queryPracticeByStudent: `occupationlab/achievement/queryPracticeByStudent`, //学生端练习成绩 queryPracticeByStudent: `occupationlab/occupationlab/achievement/queryPracticeByStudent`, //学生端练习成绩
exportAssessmentByStudent: `occupationlab/achievement/exportAssessmentByStudent`, // 批量导出考核成绩 exportAssessmentByStudent: `occupationlab/occupationlab/achievement/exportAssessmentByStudent`, // 批量导出考核成绩
exportPracticeByStudent: `${host}occupationlab/achievement/exportPracticeByStudent`, // 批量导出练习成绩 exportPracticeByStudent: `${host}occupationlab/occupationlab/achievement/exportPracticeByStudent`, // 批量导出练习成绩
practiceByStudentDetail: `occupationlab/achievement/practiceByStudentDetail`, // 学生端练习实验情况 practiceByStudentDetail: `occupationlab/occupationlab/achievement/practiceByStudentDetail`, // 学生端练习实验情况
exportPracticeByStudentDetail: `${host}occupationlab/achievement/exportPracticeByStudentDetail`, // 导出学生端练习实验情况 exportPracticeByStudentDetail: `${host}occupationlab/occupationlab/achievement/exportPracticeByStudentDetail`, // 导出学生端练习实验情况
reportDetail: `occupationlab/achievement/reportDetail`, // 成绩报告详情 reportDetail: `occupationlab/occupationlab/achievement/reportDetail`, // 成绩报告详情
updateReport: `occupationlab/achievement/updateReport`, // 更新成绩报告 updateReport: `occupationlab/occupationlab/achievement/updateReport`, // 更新成绩报告
schoolCourseByAchievement: `nakadai/nakadai/curriculum/schoolCourseByAchievement`, // 获取学校购买订单后的课程 schoolCourseByAchievement: `nakadai/nakadai/curriculum/schoolCourseByAchievement`, // 获取学校购买订单后的课程
exportLabReport: `occupationlab/achievement/exportLabReport`, exportLabReport: `occupationlab/occupationlab/achievement/exportLabReport`,
exportBankExperimentReport: `occupationlab/achievement/exportBankExperimentReport`, exportBankExperimentReport: `occupationlab/occupationlab/achievement/exportBankExperimentReport`,
queryBcJudgmentPointByBcId: 'judgment/bcJudgmentPoint/queryBcJudgmentPointByBcId', queryBcJudgmentPointByBcId: 'judgment/judgment/bcJudgmentPoint/queryBcJudgmentPointByBcId',
editExperimentalData: 'occupationlab/experimentalReport/editExperimentalData', editExperimentalData: 'occupationlab/occupationlab/experimentalReport/editExperimentalData',
// 考核列表 // 考核列表
pageStuAssessment: `occupationlab/assessment/pageStuAssessment`, // 学生端——学生考核列表 pageStuAssessment: `occupationlab/occupationlab/assessment/pageStuAssessment`, // 学生端——学生考核列表
getPythonSysByStuAccountId: `occupationlab/assessment/getPythonSysByStuAccountId`, // 学生端——课程名称 getPythonSysByStuAccountId: `occupationlab/occupationlab/assessment/getPythonSysByStuAccountId`, // 学生端——课程名称
myClassByStudent: `occupationlab/achievement/myClassByStudent`, // 学生端:我的班级 myClassByStudent: `occupationlab/occupationlab/achievement/myClassByStudent`, // 学生端:我的班级
getStudentInfoByAccountId: `occupationlab/architecture/getStudentInfoByAccountId`, // 查看学生信息 getStudentInfoByAccountId: `occupationlab/occupationlab/architecture/getStudentInfoByAccountId`, // 查看学生信息
enterExam: `occupationlab/assessment/enterExam`, // 学生端——进入考试 enterExam: `occupationlab/occupationlab/assessment/enterExam`, // 学生端——进入考试
collectPaper: `occupationlab/assessment/collectPaper`, // 自动结束考试 collectPaper: `occupationlab/occupationlab/assessment/collectPaper`, // 自动结束考试
// 课程学习 // 课程学习
queryGlClassification: `occupationlab/management/edu/courseClassification/queryGlClassification`, // 查询课程分类 queryGlClassification: `occupationlab/occupationlab/management/edu/courseClassification/queryGlClassification`, // 查询课程分类
queryCourseByCondition: `occupationlab/management/edu/course/queryCourseByCondition`, // 课程列表分页条件查询 queryCourseByCondition: `occupationlab/occupationlab/management/edu/course/queryCourseByCondition`, // 课程列表分页条件查询
getCourseById: `occupationlab/management/edu/course/getCourse`, // 根据id查询课程 getCourseById: `occupationlab/occupationlab/management/edu/course/getCourse`, // 根据id查询课程
queryChaptersAndSubsections: `occupationlab/management/edu/courseChapter/queryChaptersAndSubsections`, // 根据课程id查询章节小节,树状结构 queryChaptersAndSubsections: `occupationlab/occupationlab/management/edu/courseChapter/queryChaptersAndSubsections`, // 根据课程id查询章节小节,树状结构
getSubsection: `occupationlab/management/edu/courseSubsection/getSubsection`, // 根据小节id获取预览文件地址 getSubsection: `occupationlab/occupationlab/management/edu/courseSubsection/getSubsection`, // 根据小节id获取预览文件地址
// 资讯 // 资讯
queryAllColumns: `occupationlab/enterprise/information/column/queryAllColumns`, // 栏目树 queryAllColumns: `occupationlab/occupationlab/enterprise/information/column/queryAllColumns`, // 栏目树
queryArticleByCondition: `occupationlab/enterprise/information/article/queryArticleByCondition`, // 文章列表分页条件查询 queryArticleByCondition: `occupationlab/occupationlab/enterprise/information/article/queryArticleByCondition`, // 文章列表分页条件查询
getArticle: `occupationlab/enterprise/information/article/getArticle`, // 根据id查询文章 getArticle: `occupationlab/occupationlab/enterprise/information/article/getArticle`, // 根据id查询文章
firstLevelColumn: `occupationlab/enterprise/information/column/firstLevelColumn`, firstLevelColumn: `occupationlab/occupationlab/enterprise/information/column/firstLevelColumn`,
secondaryColumnsByFirst: `occupationlab/enterprise/information/column/secondaryColumnsByFirst`, secondaryColumnsByFirst: `occupationlab/occupationlab/enterprise/information/column/secondaryColumnsByFirst`,
// 线上赛事 // 线上赛事
contestPageConditionQueryByOccupationlabStu: `occupationlab/enterprise/match/contest/contestPageConditionQueryByOccupationlabStu`, contestPageConditionQueryByOccupationlabStu: `occupationlab/occupationlab/enterprise/match/contest/contestPageConditionQueryByOccupationlabStu`,
contestPageConditionQueryByOccupationlab: `occupationlab/enterprise/match/contest/onlineCompetitionByStudent`, contestPageConditionQueryByOccupationlab: `occupationlab/occupationlab/enterprise/match/contest/onlineCompetitionByStudent`,
listOfRegisteredEvents: `occupationlab/enterprise/match/contest/listOfRegisteredEvents`, listOfRegisteredEvents: `occupationlab/occupationlab/enterprise/match/contest/listOfRegisteredEvents`,
addApplicant: `occupationlab/enterprise/match/applicant/addApplicant`, // 添加报名人员 addApplicant: `occupationlab/occupationlab/enterprise/match/applicant/addApplicant`, // 添加报名人员
getContestProgress: `occupationlab/enterprise/match/contest-progress/getContestProgress`, // 根据赛事id查询竞赛进展 getContestProgress: `occupationlab/occupationlab/enterprise/match/contest-progress/getContestProgress`, // 根据赛事id查询竞赛进展
getContest: `occupationlab/enterprise/match/contest/getContest`, // 根据id查询赛事 getContest: `occupationlab/occupationlab/enterprise/match/contest/getContest`, // 根据id查询赛事
queryAnnouncementByContestId: `occupationlab/contest/announcement/queryAnnouncementByContestId`, queryAnnouncementByContestId: `occupationlab/occupationlab/contest/announcement/queryAnnouncementByContestId`,
queryAnnouncementDetails: `occupationlab/contest/announcement/queryAnnouncementDetails`, queryAnnouncementDetails: `occupationlab/occupationlab/contest/announcement/queryAnnouncementDetails`,
// 阿里云文件/视频管理 // 阿里云文件/视频管理
fileDeletion: `${uploadURL}oss/manage/fileDeletion`, // 删除OSS文件 fileDeletion: `${uploadURL}oss/manage/fileDeletion`, // 删除OSS文件

@ -56,6 +56,10 @@ export default {
index: "/index/list", index: "/index/list",
title: "首页" title: "首页"
}, },
{
index: "/touristMatch/list",
title: "大赛资讯"
},
{ {
index: 'data', index: 'data',
title: "数据科研" title: "数据科研"
@ -72,14 +76,10 @@ export default {
index: "/log/list", index: "/log/list",
title: "更新日志" title: "更新日志"
}, },
{ // {
index: "/touristMatch/list", // index: "trial",
title: "大赛资讯" // title: ""
}, // }
{
index: "trial",
title: "试用申请"
}
], ],
menus: [], menus: [],
columns: [], // columns: [], //

@ -7,6 +7,13 @@ import api from "@/api";
import Setting from "@/setting"; import Setting from "@/setting";
let logout = false; let logout = false;
// 文件后缀集合
const exts = {
video: 'mp4,3gp,mov,m4v,avi,dat,mkv,flv,vob,rmvb,rm,qlv',
audio: 'mp3,aac,ape,flac,wav,wma,amr,mid',
img: 'jpg,jpeg,png,gif,svg,psd',
doc: 'doc,docx,txt,xls,xlsx,csv,xml,ppt,pptx'
}
const util = { const util = {
cookies, cookies,
local: _local, local: _local,
@ -66,24 +73,29 @@ const util = {
}, },
// 传入文件后缀判断是否是视频 // 传入文件后缀判断是否是视频
isVideo(ext) { isVideo(ext) {
if ("mp4,3gp,mov,m4v,avi,dat,mkv,flv,vob,rmvb,rm,qlv".includes(ext)) return true; if (exts.video.includes(ext)) return true;
return false; return false;
}, },
// 传入文件后缀判断是否是音频 // 传入文件后缀判断是否是音频
isAudio(ext) { isAudio(ext) {
if ("mp3,aac,ape,flac,wav,wma,amr,mid".includes(ext)) return true; if (exts.audio.includes(ext)) return true;
return false; return false;
}, },
// 传入文件后缀判断是否是图片 // 传入文件后缀判断是否是图片
isImg(ext) { isImg(ext) {
if ("jpg,jpeg,png,gif,svg,psd".includes(ext)) return true; if (exts.img.includes(ext)) return true;
return false; return false;
}, },
// 传入文件后缀判断是否是pdf以外的文档 // 传入文件后缀判断是否是pdf以外的文档
isDoc(ext) { isDoc(ext) {
if (!util.isVideo(ext) && !util.isAudio(ext) && !util.isImg(ext) && ext != "pdf") return true; if (exts.doc.includes(ext)) return true;
return false; return false;
}, },
// 判断是否能够预览
canPreview(ext) {
if (!util.isVideo(ext) && !util.isAudio(ext) && !util.isImg(ext) && !util.isDoc(ext)) return false
return true
},
// 循环去除html标签 // 循环去除html标签
removeHtmlTag(list, attr) { removeHtmlTag(list, attr) {
list.map(n => { list.map(n => {

@ -71,7 +71,7 @@
</el-form-item> </el-form-item>
</template> </template>
<div class="bottom"> <div class="bottom">
<el-link :underline="false" type="primary" @click="toTrial">申请试用</el-link> <!-- <el-link :underline="false" type="primary" @click="toTrial">申请试用</el-link> -->
<el-checkbox v-show="!form.distinguish" v-model="setDefault">设置为默认学校</el-checkbox> <el-checkbox v-show="!form.distinguish" v-model="setDefault">设置为默认学校</el-checkbox>
</div> </div>
<el-button class="submit" type="primary" @click="submit">登录</el-button> <el-button class="submit" type="primary" @click="submit">登录</el-button>
@ -241,18 +241,12 @@ export default {
}, },
// //
getSchool() { getSchool() {
// const schoolList = util.local.get('schoolList')
// if (schoolList && schoolList.length) {
// this.setSchool(schoolList)
// } else {
this.$get(this.api.querySchool, { this.$get(this.api.querySchool, {
provinceId: '', provinceId: '',
cityId: '' cityId: ''
}).then(({ list }) => { }).then(({ list }) => {
this.setSchool(list) this.setSchool(list)
// util.local.set('schoolList', list)
}).catch(res => {}) }).catch(res => {})
// }
}, },
getVerImg() { // getVerImg() { //
this.form.random = Math.floor(Math.random() * 999999999); this.form.random = Math.floor(Math.random() * 999999999);
@ -623,7 +617,8 @@ export default {
} }
.bottom { .bottom {
display: flex; display: flex;
justify-content: space-between; // justify-content: space-between;
justify-content: flex-end;
} }
.el-select { .el-select {
width: 100%; width: 100%;

@ -210,7 +210,7 @@
<img class="icon" src="@/assets/img/index/sug.png" alt=""> <img class="icon" src="@/assets/img/index/sug.png" alt="">
</div> </div>
<div class="text"> <div class="text">
<p class="title" @click="toTrial">咨询建议与反馈</p> <p class="title" @click="toQues">咨询建议与反馈</p>
<p class="des">您的每一条建议声音我们都认真对待</p> <p class="des">您的每一条建议声音我们都认真对待</p>
</div> </div>
</div> </div>
@ -246,8 +246,8 @@ export default {
document.documentElement.scrollTop = 0 document.documentElement.scrollTop = 0
document.body.scrollTop = 0 document.body.scrollTop = 0
}, },
// //
toTrial() { toQues() {
window.open('https://www.wjx.cn/vm/wB0RcMm.aspx') window.open('https://www.wjx.cn/vm/wB0RcMm.aspx')
}, },
} }

@ -27,7 +27,8 @@
<h6 class="p-title">附件下载</h6> <h6 class="p-title">附件下载</h6>
<ul class="files"> <ul class="files">
<li v-for="(item, i) in form.contestAnnexList" :key="i"> <li v-for="(item, i) in form.contestAnnexList" :key="i">
<el-link class="m-r-10" type="primary" @click="preview(item)">{{ item.fileName }}</el-link> <el-link v-if="item.canPreview" class="m-r-10" type="primary" @click="preview(item)">{{ item.fileName }}</el-link>
<span v-else class="fileName">{{ item.fileName }}</span>
<el-link type="primary" :underline="false" @click="download(item)">下载</el-link> <el-link type="primary" :underline="false" @click="download(item)">下载</el-link>
</li> </li>
</ul> </ul>
@ -199,6 +200,13 @@ export default {
methods: { methods: {
getData() { // getData() { //
this.$post(`${this.api.getContest}?contestId=${this.id}`).then(({ contest }) => { this.$post(`${this.api.getContest}?contestId=${this.id}`).then(({ contest }) => {
const list = contest.contestAnnexList
if (list) {
list.map(e => {
const { filePath } = e
e.canPreview = util.canPreview(filePath.substr(filePath.lastIndexOf('.') + 1))
})
}
this.form = contest this.form = contest
this.$refs.breadcrumb.update('全部赛事/' + contest.name) this.$refs.breadcrumb.update('全部赛事/' + contest.name)
}).catch(err => {}) }).catch(err => {})
@ -220,7 +228,7 @@ export default {
preview(item) { preview(item) {
const { filePath } = item const { filePath } = item
const suffix = filePath.substr(filePath.lastIndexOf('.') + 1) const suffix = filePath.substr(filePath.lastIndexOf('.') + 1)
window.open((util.isDoc(suffix) || suffix === 'pdf' ? 'https://view.officeapps.live.com/op/view.aspx?src=' : '') + item.filePath) window.open((util.isDoc(suffix) ? 'https://view.officeapps.live.com/op/view.aspx?src=' : '') + item.filePath)
}, },
// //
download(item) { download(item) {
@ -340,7 +348,7 @@ export default {
} }
.texts{ .texts{
margin: 20px 0 50px; margin: 20px 0 50px;
font-size: 16px; font-size: 14px;
line-height: 1.6; line-height: 1.6;
text-indent: 2em; text-indent: 2em;
overflow: hidden; overflow: hidden;
@ -513,6 +521,10 @@ export default {
align-items: center; align-items: center;
margin: 10px 0; margin: 10px 0;
} }
.fileName {
margin-right: 10px;
font-size: 12px;
}
} }
.notice-list { .notice-list {
text-align: left; text-align: left;

@ -297,10 +297,10 @@ export default {
getData() { getData() {
this.loadIns = Loading.service() this.loadIns = Loading.service()
this.getList() this.getList()
if (!Setting.isDev) { // if (!Setting.isDev) {
clearInterval(this.timer) // clearInterval(this.timer)
this.timer = setInterval(this.getList, 1000) // this.timer = setInterval(this.getList, 1000)
} // }
}, },
initData() { initData() {
this.page = 1 this.page = 1

@ -151,7 +151,7 @@ export default {
.content{ .content{
margin-bottom: 20px; margin-bottom: 20px;
line-height: 1.8; line-height: 1.8;
font-size: 16px; font-size: 14px;
text-indent: 2em; text-indent: 2em;
/deep/img{ /deep/img{
display: block; display: block;

@ -301,9 +301,12 @@ export default {
util.cookies.set("courseId", this.courseId); util.cookies.set("courseId", this.courseId);
util.cookies.set("curriculumName", escape(this.curriculumName)); util.cookies.set("curriculumName", escape(this.curriculumName));
util.cookies.set("systemId", id); util.cookies.set("systemId", id);
// 8pythoncookiesystemId
location.href = process.env.NODE_ENV === 'development' ? location.href = process.env.NODE_ENV === 'development' ?
`http://${location.hostname}:8080/#/` : `http://${location.hostname}:8080/#/` :
`${location.origin}/pyTrials` // 8pythoncookiesystemId Setting.isPro ?
'https://www.occupationlab.com/pyTrials' :
`${location.origin}/pyTrials`
} }
} }
} }

@ -54,7 +54,7 @@
<div class="list"> <div class="list">
<template v-if="listData.length"> <template v-if="listData.length">
<ul> <ul>
<li v-for="(item,index) in listData" :key="index" @click="toDetail(item)"> <li v-for="(item,index) in listData" :key="index" :id="item.id" @click="toDetail(item)">
<div class="left"> <div class="left">
<div class="cover"> <div class="cover">
<img :src="item.coverUrl || 'https://huoran.oss-cn-shenzhen.aliyuncs.com/20220623/png/1539857403162943488.png'" alt=""> <img :src="item.coverUrl || 'https://huoran.oss-cn-shenzhen.aliyuncs.com/20220623/png/1539857403162943488.png'" alt="">
@ -128,7 +128,7 @@
</template> </template>
<script> <script>
import { mapMutations } from "vuex"; import { mapState, mapMutations } from "vuex";
import { Loading } from "element-ui"; import { Loading } from "element-ui";
import Setting from "@/setting" import Setting from "@/setting"
import util from "@/libs/util" import util from "@/libs/util"
@ -162,11 +162,11 @@ export default {
provinceId: '', provinceId: '',
cityId: '', cityId: '',
sequence: 1, sequence: 1,
competitionScope: '', // (0: 1: 2.) competitionScope: '不限', // (0: 1: 2.)
}, },
scopes: [ scopes: [
{ {
id: '', id: '不限',
name: '不限' name: '不限'
}, },
{ {
@ -202,6 +202,11 @@ export default {
timerList: [], timerList: [],
}; };
}, },
computed: {
...mapState('match', [
'toMatch'
])
},
watch: { watch: {
keyword: function(val) { keyword: function(val) {
clearTimeout(this.searchTimer); clearTimeout(this.searchTimer);
@ -227,20 +232,19 @@ export default {
const data = { const data = {
pageNum: this.page, pageNum: this.page,
pageSize: this.pageSize, pageSize: this.pageSize,
competitionScope: scope,
platformSource: 1, // (01) platformSource: 1, // (01)
cityId: scope === 2 ? (form.cityId || null) : null, // id cityId: scope === 2 ? (form.cityId || null) : null, // id
provinceId: scope === 2 ? (form.provinceId || null) : null, provinceId: scope === 2 ? (form.provinceId || null) : null,
sequence: form.sequence || null, sequence: form.sequence || null,
keyWord: this.keyword keyWord: this.keyword
} }
if (scope) data.competitionScope = scope
this.$post(this.api.contestPageConditionQueryByOccupationlabStu, data).then(({ data }) => { this.$post(this.api.contestPageConditionQueryByOccupationlabStu, data).then(({ data }) => {
this.listData = data.records const { records } = data
this.totals = data.total
const second = 1000; const second = 1000;
const minute = second * 60; const minute = second * 60;
const hour = minute * 60; const hour = minute * 60;
this.listData.forEach((n, k) => { records.forEach((n, k) => {
// //
let now = new Date().getTime(); let now = new Date().getTime();
let signUpStartTime = new Date(this.core.dateCompatible(n.signUpStartTime)).getTime(); // let signUpStartTime = new Date(this.core.dateCompatible(n.signUpStartTime)).getTime(); //
@ -282,7 +286,17 @@ export default {
} else { } else {
n.ranges = n.range n.ranges = n.range
} }
}); })
this.listData = records
this.totals = data.total
// toMatchidscrollIntoView
if (this.toMatch) {
this.$nextTick(() => {
document.getElementById(this.toMatch).scrollIntoView()
this.SET_SOURCE('')
})
}
this.loadIns.close() this.loadIns.close()
}).catch(res => { }).catch(res => {
this.loadIns.close() this.loadIns.close()
@ -291,10 +305,10 @@ export default {
getData() { getData() {
this.loadIns = Loading.service() this.loadIns = Loading.service()
this.getList() this.getList()
if (!Setting.isDev) { // if (!Setting.isDev) {
clearInterval(this.timer) // clearInterval(this.timer)
this.timer = setInterval(this.getList, 1000) // this.timer = setInterval(this.getList, 1000)
} // }
}, },
initData() { initData() {
this.page = 1 this.page = 1
@ -341,7 +355,10 @@ export default {
this.getData(); this.getData();
}, },
signup(item) { signup(item) {
// this.SET_SOURCE(item.id)
this.$router.push('/login')
return
// status=2
if (item.status == 2) { if (item.status == 2) {
if (util.local.get(Setting.tokenKey)) { if (util.local.get(Setting.tokenKey)) {
this.$post(this.api.addApplicant, { this.$post(this.api.addApplicant, {
@ -354,7 +371,7 @@ export default {
this.$confirm('请先登录,是否直接前往登录?', "提示", { this.$confirm('请先登录,是否直接前往登录?', "提示", {
type: 'success' type: 'success'
}).then(() => { }).then(() => {
this.SET_SOURCE() this.SET_SOURCE(item.id)
this.$router.push('/login') this.$router.push('/login')
}).catch(() => {}) }).catch(() => {})
} }

@ -5,33 +5,23 @@ const url = location.host;
const isDev = process.env.NODE_ENV === "development"; // 开发环境 const isDev = process.env.NODE_ENV === "development"; // 开发环境
const isHh = url.includes("10.196.131.73"); //是否河海版本 const isHh = url.includes("10.196.131.73"); //是否河海版本
const isCH = url.includes("124.71.12.62"); //是否巢湖版本 const isCH = url.includes("124.71.12.62"); //是否巢湖版本
const isBeta = url.includes("120.78.198.231"); //是否职站测试
const isPro = url.includes("occupationlab.com"); //是否职站生产 const isPro = url.includes("occupationlab.com"); //是否职站生产
const isTest = url.includes('121.37.12.51'); //是否中台测试服 const isTest = url.includes('121.37.12.51'); //是否中台测试服
let systemPath = `${location.origin}/banksystem` let systemPath = `${location.origin}/banksystem`
let host = `${location.origin}:9000/` let host = `${location.origin}/`
let title = '职站' let uploadURL = `https://121.37.12.51/`
let title = (isHh || isCH) ? '学生端' : '职站'
if (isHh) { if (isPro) {
// 河海
host = "http://10.196.131.73/";
title = "学生端";
} else if (isCH) {
// 巢湖
host = "http://124.71.12.62/";
title = "学生端";
} else if (isBeta) {
// 职站测试
host = "http://120.78.198.231/";
} else if (isPro) {
// 职站生产 // 职站生产
uploadURL = `https://www.huorantech.cn/`
systemPath = `https://www.huorantech.cn/banksystem` systemPath = `https://www.huorantech.cn/banksystem`
} else if (isDev) { } else if (isDev) {
// 本地 // 本地
systemPath = `http://${location.hostname}:8093/#/` systemPath = `http://${location.hostname}:8093/#/`
host = "http://121.37.12.51:9000/"; // 中台测试服 host = "http://121.37.12.51/"; // 中台测试服
// host = "http://192.168.31.151:9000/"; // 榕 host = "http://192.168.31.151:9000/"; // 榕
// host = "http://192.168.31.137:9000/"; // 赓 // host = "http://192.168.31.137:9000/"; // 赓
} }
@ -44,6 +34,7 @@ const Setting = {
routerMode: "hash", // 路由模式,可选值为 history 或 hash routerMode: "hash", // 路由模式,可选值为 history 或 hash
showProgressBar: true, // 页面切换时,是否显示模拟的进度条 showProgressBar: true, // 页面切换时,是否显示模拟的进度条
apiBaseURL: host, // 接口请求地址 apiBaseURL: host, // 接口请求地址
uploadURL, // 阿里云oss域名
systemPath, // 子系统地址前缀 systemPath, // 子系统地址前缀
autoLogoutTime: 3600000, // 长时间未操作,自动退出登录时间 autoLogoutTime: 3600000, // 长时间未操作,自动退出登录时间
modalDuration: 3, // 接口请求返回错误时,弹窗的持续时间,单位:秒 modalDuration: 3, // 接口请求返回错误时,弹窗的持续时间,单位:秒

@ -4,11 +4,11 @@
export default { export default {
namespaced: true, namespaced: true,
state: { state: {
toMatch: false toMatch: ''
}, },
mutations: { mutations: {
SET_SOURCE: state => { SET_SOURCE: (state, id) => {
state.toMatch = true state.toMatch = id
} }
}, },
actions: { actions: {

Loading…
Cancel
Save