实验台等

master
yujialong 4 months ago
parent 2fec0e532b
commit f7f57d84dd
  1. 47
      src/App.vue
  2. 2
      src/api/index.js
  3. 161
      src/layouts/header/index.vue
  4. 30
      src/pages/product/show/index.vue
  5. 413
      src/pages/station/list/index.vue
  6. 59
      src/pages/station/preview/index.vue
  7. 6
      src/setting.js

@ -1,7 +1,12 @@
<template> <template>
<div id="app"> <div id="app">
<router-view></router-view> <el-radio-group v-if="Setting.isDev" v-model="ip" @change="ipChange">
</div> <el-radio :label="0">刘榕ip</el-radio>
<el-radio :label="1">陈赓ip</el-radio>
<el-radio :label="2">测试服ip</el-radio>
</el-radio-group>
<router-view></router-view>
</div>
</template> </template>
<script> <script>
@ -9,18 +14,30 @@ import Setting from "@/setting";
import util from "@/libs/util"; import util from "@/libs/util";
export default { export default {
name: "App", name: "App",
created() { data () {
//localStorage return {
if (util.local.get(Setting.storeKey)) { Setting,
this.$store.replaceState(Object.assign({}, this.$store.state, util.local.get(Setting.storeKey))); ip: localStorage.getItem('ip') ? +localStorage.getItem('ip') : 0,
} };
},
//vuexlocalStorage created () {
window.addEventListener("beforeunload", () => { //localStorage
sessionStorage.removeItem('handelPermission') if (util.local.get(Setting.storeKey)) {
util.local.get(Setting.tokenKey) && util.local.set(Setting.storeKey, this.$store.state); this.$store.replaceState(Object.assign({}, this.$store.state, util.local.get(Setting.storeKey)));
});
} }
//vuexlocalStorage
window.addEventListener("beforeunload", () => {
sessionStorage.removeItem('handelPermission')
util.local.get(Setting.tokenKey) && util.local.set(Setting.storeKey, this.$store.state);
});
},
methods: {
ipChange (val) {
localStorage.setItem('ip', val)
location.reload()
},
}
}; };
</script> </script>

@ -34,6 +34,8 @@ export default {
updateLearningProgress: 'nakadai/nakadai/curriculum/learning/progressprogress/update', updateLearningProgress: 'nakadai/nakadai/curriculum/learning/progressprogress/update',
maximumPracticeScoreList: 'occupationlab/occupationlab/achievement/maximumPracticeScoreList', maximumPracticeScoreList: 'occupationlab/occupationlab/achievement/maximumPracticeScoreList',
getSandTableLastCache: `product/product/bank/operation/getSandTableLastCache`, getSandTableLastCache: `product/product/bank/operation/getSandTableLastCache`,
getSchoolCourseAuthority: `nakadai/nakadai/curriculum/getSchoolCourseAuthority`,
requestRenewalNotice: `nakadai/nakadai/curriculum/requestRenewalNotice`,
// 课程笔记 // 课程笔记
addNote: `nakadai/curriculumNotes/addNote`, addNote: `nakadai/curriculumNotes/addNote`,
curriculumNoteList: `nakadai/curriculumNotes/curriculumNoteList`, curriculumNoteList: `nakadai/curriculumNotes/curriculumNoteList`,

@ -1,82 +1,46 @@
<template> <template>
<div class="header"> <div class="header">
<div style="line-height: 60px"> <div style="line-height: 60px">
<img v-if="Setting.isSq" <img v-if="Setting.isSq" class="logo" style="max-height: 100%" src="/images/1.png" alt="">
class="logo" <img v-else class="logo" :src="logoUrl" />
style="max-height: 100%"
src="/images/1.png"
alt="">
<img v-else
class="logo"
:src="logoUrl" />
<span class="title">{{ title }}</span> <span class="title">{{ title }}</span>
</div> </div>
<el-radio-group v-if="Setting.isDev"
v-model="ip"
@change="ipChange">
<el-radio :label="0">刘榕ip</el-radio>
<el-radio :label="1">陈赓ip</el-radio>
</el-radio-group>
<div class="action"> <div class="action">
<el-popover placement="top" <el-popover placement="top" :disabled="!notices.length">
:disabled="!notices.length"> <p v-for="(item, i) in notices" :key="i" class="p-v-5 cursor-pointer" @click="toComment(item)">{{
<p v-for="(item, i) in notices" item.commentUsername }} 回复了你的评论</p>
:key="i" <el-badge class="msg" :is-dot="!!notices.length" slot="reference">消息</el-badge>
class="p-v-5 cursor-pointer"
@click="toComment(item)">{{ item.commentUsername }} 回复了你的评论</p>
<el-badge class="msg"
:is-dot="!!notices.length"
slot="reference">消息</el-badge>
</el-popover> </el-popover>
<el-dropdown class="user-wrap" <el-dropdown class="user-wrap" @command="userCommand">
@command="userCommand">
<div class="user"> <div class="user">
<el-avatar :size="40" <el-avatar :size="40" :src="avatar"></el-avatar>
:src="avatar"></el-avatar>
<span class="m-l-10">{{ customerName || userName }}</span> <span class="m-l-10">{{ customerName || userName }}</span>
</div> </div>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item v-if="!customerName" <el-dropdown-item v-if="!customerName" command="person">个人中心</el-dropdown-item>
command="person">个人中心</el-dropdown-item> <el-dropdown-item v-else command="resetPw">修改密码</el-dropdown-item>
<el-dropdown-item v-else
command="resetPw">修改密码</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
<el-divider direction="vertical"></el-divider> <el-divider direction="vertical"></el-divider>
<el-button type="text" <el-button type="text" class="ml20" @click="logout">退出</el-button>
class="ml20"
@click="logout">退出</el-button>
</div> </div>
<el-dialog title="修改密码" <el-dialog title="修改密码" :visible.sync="passwordVisible" :close-on-click-modal="false" :append-to-body="true"
:visible.sync="passwordVisible" @close="resetPassword" width="30%">
:close-on-click-modal="false" <el-form ref="passwordForm" label-width="82px">
:append-to-body="true"
@close="resetPassword"
width="30%">
<el-form ref="passwordForm"
label-width="82px">
<el-form-item label="原密码"> <el-form-item label="原密码">
<el-input type="password" <el-input type="password" v-model="passwordForm.password" placeholder="请输入原密码"></el-input>
v-model="passwordForm.password"
placeholder="请输入原密码"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="新密码"> <el-form-item label="新密码">
<el-input type="password" <el-input type="password" v-model="passwordForm.newPassword" placeholder="请输入新密码"></el-input>
v-model="passwordForm.newPassword"
placeholder="请输入新密码"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="确认新密码"> <el-form-item label="确认新密码">
<el-input type="password" <el-input type="password" v-model="passwordForm.reNewPassword" placeholder="请确认新密码"
v-model="passwordForm.reNewPassword" @keyup.enter.native="submitPassword"></el-input>
placeholder="请确认新密码"
@keyup.enter.native="submitPassword"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" <span slot="footer" class="dialog-footer">
class="dialog-footer">
<el-button @click="passwordVisible = false"> </el-button> <el-button @click="passwordVisible = false"> </el-button>
<el-button type="primary" <el-button type="primary" @click="submitPassword"> </el-button>
@click="submitPassword"> </el-button>
</span> </span>
</el-dialog> </el-dialog>
</div> </div>
@ -250,56 +214,57 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.header { .header {
position: relative; position: relative;
height: 60px; height: 60px;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
font-size: 16px; font-size: 16px;
color: #333; color: #333;
background-color: #fff; background-color: #fff;
.logo { .logo {
max-height: 50px; max-height: 50px;
margin: 0 40px; margin: 0 20px 0 40px;
} }
.title { .title {
font-size: 18px; font-size: 18px;
font-weight: bold; font-weight: bold;
} }
.action { .action {
display: flex; display: flex;
padding-right: 50px; padding-right: 50px;
align-items: center; align-items: center;
.user { .user {
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
cursor: pointer; cursor: pointer;
span {
font-size: 12px;
}
}
.el-button--text { span {
margin-left: 20px; font-size: 12px;
color: #333; }
} }
.el-divider { .el-button--text {
width: 2px; margin-left: 20px;
height: 15px; color: #333;
margin-left: 20px;
background-color: #333;
}
} }
.msg { .el-divider {
margin-right: 30px; width: 2px;
font-size: 12px; height: 15px;
cursor: pointer; margin-left: 20px;
background-color: #333;
} }
}
.msg {
margin-right: 30px;
font-size: 12px;
cursor: pointer;
}
} }
</style> </style>

@ -52,7 +52,9 @@
<div class="text">{{ form.goodsRes.typeName }}</div> <div class="text">{{ form.goodsRes.typeName }}</div>
</div> </div>
</div> </div>
<button v-if="!form.goodsRes.logoOfOurSchool" class="btn" @click="toTrail">试用体验</button>
<button v-if="!overdue" class="btn" @click="toRenew">续费</button>
<button v-else-if="!form.goodsRes.logoOfOurSchool" class="btn" @click="toTrail">试用体验</button>
<button v-else-if="isCourse || withLink" class="btn entry" @click="toStation">进入{{ isDataforward ? '系统' : '实验' <button v-else-if="isCourse || withLink" class="btn entry" @click="toStation">进入{{ isDataforward ? '系统' : '实验'
}}</button> }}</button>
<button v-else-if="isValueModule" class="btn entry" @click="toSystem">进入系统</button> <button v-else-if="isValueModule" class="btn entry" @click="toSystem">进入系统</button>
@ -148,7 +150,8 @@ export default {
chapterList: [], chapterList: [],
hots: [], hots: [],
linkVisible: false, linkVisible: false,
height: '' height: '',
overdue: 0, //
}; };
}, },
computed: { computed: {
@ -196,6 +199,7 @@ export default {
next() next()
}, },
mounted () { mounted () {
this.getStatus()
this.getData() this.getData()
this.getHot() this.getHot()
}, },
@ -225,6 +229,15 @@ export default {
this.chapterList = res.chapterList this.chapterList = res.chapterList
} }
}, },
//
getStatus () {
this.$get(this.api.whetherToRenewTheFee, {
mallId: this.id
}).then(({ isRenew }) => {
// 10
this.overdue = isRenew
}).catch(res => { })
},
// tab // tab
tabChange ({ id }) { tabChange ({ id }) {
this.curTab = id this.curTab = id
@ -253,6 +266,19 @@ export default {
this.getChapter() this.getChapter()
}).catch(res => { }) }).catch(res => { })
}, },
//
async toRenew () {
try {
await this.$confirm(`<p style="margin-bottom: 10px;">确认提交续期申请吗?</p><p style="font-size: 12px;">提交后,我们将立即处理您的续期请求。请耐心等待,我们会尽快完成续期流程。</p>`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'success',
closeOnClickModal: false,
dangerouslyUseHTMLString: true,
})
await this.$post(`${this.api.requestRenewalNotice}?mallId=${this.id}`)
} catch (e) { }
},
// //
toTrail () { toTrail () {
window.open('https://www.wjx.top/vm/wFCPCFp.aspx') window.open('https://www.wjx.top/vm/wFCPCFp.aspx')

@ -3,104 +3,135 @@
<div class="wrap"> <div class="wrap">
<div class="search"> <div class="search">
<h6>创新实验智能教学</h6> <h6>创新实验智能教学</h6>
<div class="input" <div class="input" v-auth="'搜索'">
v-auth="'搜索'"> <img src="@/assets/img/search.png" alt="">
<img src="@/assets/img/search.png" <input type="text" placeholder="请输入关键词" v-model="keyword">
alt="">
<input type="text"
placeholder="请输入关键词"
v-model="keyword">
</div> </div>
</div> </div>
<div class="station"> <div class="station">
<div class="inner"> <div class="inner">
<div class="tab"> <div class="tab">
<a class="item" <a class="item" v-for="(item, i) in tabs" :key="i" :class="{ active: item.classificationId === active }"
v-for="(item, i) in tabs" @click="tabChange(item)">{{ item.classificationName }}</a>
:key="i"
:class="{active: item.id == active}"
@click="tabChange(item)">{{ item.name }}</a>
</div> </div>
<div class="curs"> <div class="curs">
<template v-if="curriculumList.length"> <template v-if="products.length">
<template v-for="(item,i) in curriculumList"> <div v-for="(item, i) in products" class="item" :title="item.goodsName" @click="toProduct(item)" :key="i">
<div class="item" <div v-if="isZj || isSq" class="cover" :style="{ backgroundImage: 'url(/images/' + i + '.png)' }"></div>
:title="item.goodsName" <div v-else class="cover" :style="{ backgroundImage: 'url(' + item.coverUrl + ')' }"></div>
@click="goPreview(item)" <div class="bottom">
:key="i" <p class="text"><span>{{ item.goodsName || item.curriculumName }}</span></p>
v-if="!keyword || item.goodsName.includes(keyword)"> <a>{{ item.isInEffect ? '进入实验' : '续费' }}</a>
<div v-if="isSq"
class="cover"
:style="{backgroundImage: 'url(/images/' + i + '.png)'}"></div>
<div v-else
class="cover"
:style="{backgroundImage: 'url(' + item.coverUrl + ')'}"></div>
<div class="bottom">
<p class="text"><span>{{ item.goodsName || item.curriculumName }}</span></p>
<a>进入实验</a>
</div>
</div> </div>
</template> </div>
</template> </template>
<div class="empty flex-1" <div class="empty flex-1" v-else>
v-else>
<div> <div>
<img src="@/assets/img/none.png" <img src="@/assets/img/none.png" alt="">
alt="">
<p>暂无数据</p> <p>暂无数据</p>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<!-- 选择链接 -->
<el-dialog title="请选择链接" :visible.sync="linkVisible" width="420px" center :close-on-click-modal="false">
<div class="buy">
<div v-for="(link, i) in links" :key="i" class="link-line">
{{ link.urlName }}
<a class="url" :href="link.url" target="_blank">{{ link.url }}</a>
</div>
</div>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
import Setting from "@/setting"; import Setting from '@/setting'
export default { export default {
name: "backstage",
data () { data () {
return { return {
isZj: location.host === '10.60.32.76', //
isSq: Setting.isSq, isSq: Setting.isSq,
keyword: this.$route.query.keyword || '', keyword: this.$route.query.keyword || '',
active: +this.$route.query.active || 0, active: +this.$route.query.active || '',
tabs: [ searchTimer: null,
{ tabs: [],
id: 0, products: [],
name: '实验课程'
}, linkVisible: false,
{ links: [],
id: 1,
name: '最近使用'
}
],
curriculumList: []
} }
}, },
watch: {
keyword: function () {
clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(this.getList, 500)
},
},
mounted () { mounted () {
this.getschoolCourse(); this.getTab()
}, },
methods: { methods: {
getschoolCourse () { // // tab
this.active ? async getTab () {
this.$post(this.api.recentUse, { const { data } = await this.$get(this.api.getSchoolCourseAuthority)
this.tabs = [
{
classificationId: '',
classificationName: '全部',
},
...data,
{
classificationId: 0,
classificationName: '最近使用',
},
]
this.getList()
},
//
async getList () {
// 使
if (this.active === 0) {
const { page } = await this.$post(this.api.recentUse, {
pageNum: 1, pageNum: 1,
pageSize: 100 pageSize: 100,
}).then(({ page }) => { goodsName: this.keyword,
this.curriculumList = page.records })
}).catch(err => { }) : this.curriculumList = page.records
this.$get(this.api.schoolCourse).then(res => { } else {
this.curriculumList = res.data; const { data } = await this.$get(this.api.schoolCourse, {
}).catch(err => { }); authority: this.active,
goodsName: this.keyword,
})
this.products = data
}
}, },
goPreview (item) { toProduct (item) {
this.$router.push(`/station/preview?courseId=${item.cid}&curriculumName=${item.goodsName}&mallId=${item.mallId || ''}&keyword=${this.keyword}&active=${this.active}`); //
if (item.isInEffect) {
const links = item.nonAssociatedLinks
//
if (links && links.length) {
if (links.length === 1) {
window.open(links[0].url)
} else {
this.linkVisible = true
this.links = item.nonAssociatedLinks
}
} else {
this.$router.push(`/station/preview?courseId=${item.cid}&curriculumName=${item.goodsName}&mallId=${item.mallId || ''}&keyword=${this.keyword}&active=${this.active}`)
}
} else {
//
this.$router.push(`/product/show?id=${item.mallId}`)
}
}, },
// tab // tab
tabChange (item) { tabChange (item) {
this.active = item.id this.active = item.classificationId
this.getschoolCourse() this.getList()
}, },
} }
}; };
@ -108,137 +139,157 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.wrap { .wrap {
margin: -24px; margin: -24px;
} }
.search { .search {
position: relative;
padding: 100px 0 130px;
text-align: center;
background: url(../../../assets/img/station-bg.png) 0 0/100% 100% no-repeat;
h6 {
margin-bottom: 25px;
font-size: 26px;
color: #fff;
}
.input {
position: relative; position: relative;
padding: 100px 0 130px; width: 700px;
text-align: center; margin: 0 auto;
background: url(../../../assets/img/station-bg.png) 0 0/100% 100% no-repeat; }
h6 {
margin-bottom: 25px; img {
font-size: 26px; position: absolute;
color: #fff; top: 19px;
} left: 14px;
.input { }
position: relative;
width: 700px; input {
margin: 0 auto; width: 100%;
} height: 62px;
img { line-height: 62px;
position: absolute; padding: 0 50px;
top: 19px; font-size: 18px;
left: 14px; color: #333;
} border: 0;
input { outline: none;
width: 100%; border-radius: 4px;
height: 62px; }
line-height: 62px;
padding: 0 50px;
font-size: 18px;
color: #333;
border: 0;
outline: none;
border-radius: 4px;
}
} }
.tab { .tab {
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
.item {
padding: 0 20px; .item {
margin-right: 16px; padding: 0 20px;
font-size: 17px; margin-right: 16px;
text-align: center; font-size: 17px;
color: #333; text-align: center;
line-height: 50px; color: #333;
border-bottom: 3px solid transparent; line-height: 50px;
cursor: pointer; border-bottom: 3px solid transparent;
&.active { cursor: pointer;
color: #007eff;
border-color: #007eff; &.active {
} color: #007eff;
border-color: #007eff;
} }
}
} }
.station { .station {
min-height: calc(100vh - 520px); min-height: calc(100vh - 520px);
background: url(../../../assets/img/station1.png) (top left) / auto no-repeat, background: url(../../../assets/img/station1.png) (top left) / auto no-repeat,
url(../../../assets/img/station2.png) bottom right/auto no-repeat; url(../../../assets/img/station2.png) bottom right/auto no-repeat;
.inner {
width: 1072px; .inner {
margin: 0 auto; width: 1072px;
} margin: 0 auto;
.curs { }
.curs {
display: flex;
flex-wrap: wrap;
width: 1072px;
padding-top: 60px;
margin: 0 auto;
.item {
position: relative;
padding: 0 10px;
margin: 0 10px 40px;
text-align: center;
background-color: #fff;
border-radius: 8px;
cursor: pointer;
&:hover {
opacity: 0.9;
}
.cover {
width: 215px;
height: 118px;
margin-top: -20px;
border-radius: 12px;
background-size: 100% 100%;
background-position: 0 0;
background-repeat: no-repeat;
}
.bottom {
display: flex; display: flex;
flex-wrap: wrap; justify-content: space-between;
width: 1072px; align-items: center;
padding-top: 60px; padding: 10px 5px;
margin: 0 auto; }
.item {
position: relative; .text {
padding: 0 10px; display: inline-flex;
margin: 0 10px 40px; align-items: center;
text-align: center; width: 130px;
background-color: #fff; height: 40px;
border-radius: 8px; text-align: left;
cursor: pointer; font-size: 12px;
&:hover { line-height: 1.6;
opacity: 0.9; overflow: hidden;
}
.cover { span {
width: 215px; @include mul-ellipsis(2);
height: 118px;
margin-top: -20px;
border-radius: 12px;
background-size: 100% 100%;
background-position: 0 0;
background-repeat: no-repeat;
}
.bottom {
display: flex;
justify-content: space-between;
align-items: center;
padding: 10px 5px;
}
.text {
display: inline-flex;
align-items: center;
width: 130px;
height: 40px;
text-align: left;
font-size: 12px;
line-height: 1.6;
overflow: hidden;
span {
@include mul-ellipsis(2);
}
}
a {
padding: 0 8px;
line-height: 28px;
font-size: 14px;
color: #7a7a7a;
border-radius: 20px;
border: 1px solid #dadada;
}
} }
}
a {
padding: 0 8px;
line-height: 28px;
font-size: 14px;
color: #7a7a7a;
border-radius: 20px;
border: 1px solid #dadada;
}
} }
}
} }
.empty { .empty {
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
padding: 50px 0; padding: 50px 0;
text-align: center; text-align: center;
img {
width: 471px; img {
} width: 471px;
p { }
margin-top: 40px;
font-size: 18px; p {
color: rgba(0, 0, 0, 0.25); margin-top: 40px;
} font-size: 18px;
color: rgba(0, 0, 0, 0.25);
}
} }
</style> </style>

@ -303,7 +303,7 @@
</template> </template>
<script> <script>
import util from "@/libs/util"; import Util from "@/libs/util";
import Setting from "@/setting"; import Setting from "@/setting";
import { mapState } from "vuex"; import { mapState } from "vuex";
import pdf from "vue-pdf"; import pdf from "vue-pdf";
@ -524,11 +524,11 @@ export default {
// //
submitNote () { submitNote () {
const form = this.noteForm const form = this.noteForm
if (!form.noteName) return util.errorMsg('请输入笔记标题') if (!form.noteName) return Util.errorMsg('请输入笔记标题')
if (!form.noteContent) return util.errorMsg('请输入笔记内容') if (!form.noteContent) return Util.errorMsg('请输入笔记内容')
this.$post(this.api[form.noteId ? 'updateNote' : 'addNote'], form).then(res => { this.$post(this.api[form.noteId ? 'updateNote' : 'addNote'], form).then(res => {
this.getNote() this.getNote()
util.successMsg(form.noteId ? '修改成功' : '添加成功') Util.successMsg(form.noteId ? '修改成功' : '添加成功')
this.showNoteAdd = false this.showNoteAdd = false
this.noteForm = { this.noteForm = {
cid: this.courseId, cid: this.courseId,
@ -543,7 +543,7 @@ export default {
type: "warning" type: "warning"
}).then(() => { }).then(() => {
this.$post(`${this.api.deleteNotes}?noteId=${row.noteId}`).then(res => { this.$post(`${this.api.deleteNotes}?noteId=${row.noteId}`).then(res => {
util.successMsg("删除成功"); Util.successMsg("删除成功");
this.getNote(); this.getNote();
}).catch(res => { }) }).catch(res => { })
}).catch(() => { }) }).catch(() => { })
@ -604,7 +604,7 @@ export default {
type: "warning" type: "warning"
}).then(() => { }).then(() => {
this.$post(`${this.api.deleteAComment}?commentId=${row.commentId}`).then(res => { this.$post(`${this.api.deleteAComment}?commentId=${row.commentId}`).then(res => {
util.successMsg("删除成功"); Util.successMsg("删除成功");
this.getComment(); this.getComment();
}).catch(res => { }) }).catch(res => { })
}).catch(() => { }) }).catch(() => { })
@ -612,7 +612,7 @@ export default {
// //
submitComment (row, reply) { submitComment (row, reply) {
const content = reply ? reply.replyContent : row ? row.replyContent : this.comment const content = reply ? reply.replyContent : row ? row.replyContent : this.comment
if (!content) return util.errorMsg('请输入内容!') if (!content) return Util.errorMsg('请输入内容!')
this.$post(this.api.addCommentStation, { this.$post(this.api.addCommentStation, {
mallId: this.mallId, mallId: this.mallId,
content, content,
@ -827,6 +827,15 @@ export default {
this.showProjectDia() this.showProjectDia()
}) })
} else { // python } else { // python
// python
const opened = +localStorage.getItem('opened')
if (opened) {
Util.errorMsg('Python系统限单页活跃,请切换至当前已有的活跃实验页面。', 5000)
return false
} else {
localStorage.setItem('opened', 1)
}
this.$get(this.api.getTheMostRecentlyRunProject, { this.$get(this.api.getTheMostRecentlyRunProject, {
cid: this.courseId cid: this.courseId
}).then(({ data }) => { }).then(({ data }) => {
@ -844,23 +853,23 @@ export default {
// python // python
toPython (projectId) { toPython (projectId) {
const id = this.systemIds const id = this.systemIds
let token = util.local.get(Setting.tokenKey); let token = Util.local.get(Setting.tokenKey);
util.cookies.set('assessmentId', '', -1) Util.cookies.set('assessmentId', '', -1)
util.cookies.set('startTime', '', -1) Util.cookies.set('startTime', '', -1)
util.cookies.set('stopTime', '', -1) Util.cookies.set('stopTime', '', -1)
projectId ? util.cookies.set('projectId', projectId) : util.cookies.set('projectId', '', -1) projectId ? Util.cookies.set('projectId', projectId) : Util.cookies.set('projectId', '', -1)
util.cookies.set('token', token) Util.cookies.set('token', token)
util.cookies.set('mallId', this.mallId) Util.cookies.set('mallId', this.mallId)
util.cookies.set('third', this.third) Util.cookies.set('third', this.third)
util.cookies.set('courseId', this.courseId) Util.cookies.set('courseId', this.courseId)
util.cookies.set('curriculumName', encodeURIComponent(this.curriculumName)) Util.cookies.set('curriculumName', encodeURIComponent(this.curriculumName))
util.cookies.set('systemId', id) Util.cookies.set('systemId', id)
util.cookies.set('fromManager', 1) Util.cookies.set('fromManager', 1)
util.cookies.set('isSubmit', '', -1) Util.cookies.set('isSubmit', '', -1)
util.cookies.set('competitionId', '', -1) Util.cookies.set('competitionId', '', -1)
util.cookies.set('language', '', -1) Util.cookies.set('language', '', -1)
util.cookies.set('className', '', -1) Util.cookies.set('className', '', -1)
util.cookies.set('loaded', '', -1) Util.cookies.set('loaded', '', -1)
// 8pythoncookiesystemId // 8pythoncookiesystemId
location.href = process.env.NODE_ENV === 'development' ? location.href = process.env.NODE_ENV === 'development' ?
`http://${location.hostname}:8085/#/` : `http://${location.hostname}:8085/#/` :
@ -877,7 +886,7 @@ export default {
} }
const { systemId } = curProject const { systemId } = curProject
let token = util.local.get(Setting.tokenKey); let token = Util.local.get(Setting.tokenKey);
this.third = curProject.type === 2 ? (curProject.systemId === 28 ? 'low' : 'ai') : '' this.third = curProject.type === 2 ? (curProject.systemId === 28 ? 'low' : 'ai') : ''
if (systemId == 11) { if (systemId == 11) {
// //

@ -30,9 +30,9 @@ if (isPro) {
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/"; const ips = ['http://192.168.31.217:9000/', 'http://192.168.31.51:9000/', 'http://121.37.12.51/']
host = localStorage.getItem('localIp') == 1 ? 'http://192.168.31.51:9000/' : 'http://192.168.31.217:9000/' host = ips[+localStorage.getItem('ip')]
// host = 'http://192.168.31.51:9000/' // host = 'http://192.168.31.217:9000/'
} else if (isSq) { } else if (isSq) {
zcPath = `10.20.100.204:8883` zcPath = `10.20.100.204:8883`
} }

Loading…
Cancel
Save