yujialong 5 months ago
parent d11e9ed59b
commit 8068572935
  1. 2
      public/index.html
  2. 2
      src/api/index.js
  3. 55
      src/components/quill/index.vue
  4. 16
      src/pages/achievement/info/project.vue
  5. 51
      src/pages/achievement/list/course.vue
  6. 8
      src/pages/achievement/show/index.vue
  7. 190
      src/pages/assessment/add/index.vue
  8. 244
      src/pages/product/show/index.vue
  9. 5
      src/pages/project/add/index.vue
  10. 208
      src/pages/project/list/index.vue
  11. 137
      src/pages/screen/index.vue
  12. 1
      src/pages/station/preview/index.vue
  13. 47
      src/plugins/requests/index.js
  14. 1
      src/setting.js
  15. 12
      src/store/modules/project.js
  16. 7
      src/styles/page/screen.scss

@ -10,7 +10,7 @@
var _hmt = _hmt || []; var _hmt = _hmt || [];
(function() { (function() {
var hm = document.createElement('script'); var hm = document.createElement('script');
hm.src = 'https://hm.baidu.com/hm.js?e4d7deeca2d6ea71d2bd5fa2365bc654'; hm.src = 'https://hm.baidu.com/hm.js?72fbad6ebf1d6c705117fe8fe0686a0e';
var s = document.getElementsByTagName('script')[0]; var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(hm, s); s.parentNode.insertBefore(hm, s);
})(); })();

@ -126,6 +126,7 @@ export default {
exportDetailsOfStudentAssessmentResults: `${host}occupationlab/occupationlab/achievement/exportDetailsOfStudentAssessmentResults`, exportDetailsOfStudentAssessmentResults: `${host}occupationlab/occupationlab/achievement/exportDetailsOfStudentAssessmentResults`,
exportProductPracticeResults: `${host}occupationlab/occupationlab/achievement/exportProductPracticeResults`, exportProductPracticeResults: `${host}occupationlab/occupationlab/achievement/exportProductPracticeResults`,
exportProductAssessResults: `${host}occupationlab/occupationlab/achievement/exportProductAssessResults`, exportProductAssessResults: `${host}occupationlab/occupationlab/achievement/exportProductAssessResults`,
exportMultipleExperimentalReports: `${host}occupationlab/occupationlab/achievement/exportMultipleExperimentalReports`,
// 项目管理 // 项目管理
getSystemIdBySchool: `occupationlab/occupationlab/projectManage/getSystemIdBySchool`, // 获取学校下拥有的系统 getSystemIdBySchool: `occupationlab/occupationlab/projectManage/getSystemIdBySchool`, // 获取学校下拥有的系统
@ -422,6 +423,7 @@ export default {
courseRankings: `occupationlab/occupationlab/data/kanban/courseRankings`, courseRankings: `occupationlab/occupationlab/data/kanban/courseRankings`,
platformLoginStatistics: `users/users/user/platformLoginStatistics`, platformLoginStatistics: `users/users/user/platformLoginStatistics`,
activityRanking: `occupationlab/occupationlab/data/kanban/activityRanking`, activityRanking: `occupationlab/occupationlab/data/kanban/activityRanking`,
productsWithExperimentalResults: `occupationlab/occupationlab/data/kanban/productsWithExperimentalResults`,
// 产品中心 // 产品中心
productCategoryList: `nakadai/productClassification/productCategoryList`, productCategoryList: `nakadai/productClassification/productCategoryList`,

@ -1,39 +1,21 @@
<template> <template>
<div> <div>
<el-radio-group v-if="!readonly && radio" <el-radio-group v-if="!readonly && radio" class="type-radio" v-model="editorType" @change="typeChange">
class="type-radio"
v-model="editorType"
@change="typeChange">
<el-radio label="0">富文本</el-radio> <el-radio label="0">富文本</el-radio>
<el-radio label="1">markdown</el-radio> <el-radio label="1">markdown</el-radio>
</el-radio-group> </el-radio-group>
<div v-show="editorType == 0" <div v-show="editorType == 0" class="quill" ref="quill" :class="classes">
class="quill" <div ref="editor" :style="styles" v-loading="loading"></div>
ref="quill"
:class="classes">
<div ref="editor"
:style="styles"
v-loading="loading"></div>
<Upload :max-size="1000" <Upload :max-size="1000" :limit="100" @beforeUpload="beforeUpload" @onSuccess="editorUploadSuccess"
:limit="100"
@beforeUpload="beforeUpload"
@onSuccess="editorUploadSuccess"
style="display: none"> style="display: none">
<div slot="trigger"> <div slot="trigger">
<el-button :id="'editorUpload' + index" <el-button :id="'editorUpload' + index" type="primary">点击上传</el-button>
type="primary">点击上传</el-button>
</div> </div>
</Upload> </Upload>
</div> </div>
<mavon-editor class="md" <mavon-editor class="md" v-model="mdVal" v-show="editorType == 1" ref="md" :ishljs="true" :subfield="false"
v-model="mdVal" @change="mdChange" @imgAdd="imgAdd" />
v-show="editorType == 1"
ref="md"
:ishljs="true"
:subfield="false"
@change="mdChange"
@imgAdd="imgAdd" />
</div> </div>
</template> </template>
@ -305,6 +287,7 @@ export default {
.type-radio { .type-radio {
margin-bottom: 20px; margin-bottom: 20px;
} }
.quill-no-border { .quill-no-border {
.ql-toolbar.ql-snow { .ql-toolbar.ql-snow {
border: none; border: none;
@ -324,8 +307,10 @@ export default {
border-top: 0; border-top: 0;
} }
} }
/deep/.ql-snow { /deep/.ql-snow {
position: relative; position: relative;
.ql-tooltip { .ql-tooltip {
position: absolute !important; position: absolute !important;
top: 10px !important; top: 10px !important;
@ -333,10 +318,30 @@ export default {
transform: translateY(10px); transform: translateY(10px);
} }
} }
.md { .md {
max-height: 300px; max-height: 300px;
} }
/deep/.v-note-wrapper .v-note-panel { /deep/.v-note-wrapper .v-note-panel {
min-height: 200px; min-height: 200px;
} }
/deep/.markdown-body {
ul {
list-style: disc;
li {
list-style: inherit;
}
}
ol {
list-style: decimal;
li {
list-style: inherit;
}
}
}
</style> </style>

@ -263,8 +263,10 @@ export default {
const res = this.permissions ? const res = this.permissions ?
await this.$post(`${this.api.getAssessmentDetail}?pageNum=${this.page}&pageSize=${this.pageSize}&assessmentId=${this.id}&classId=${this.classId}&keyword=${this.keyword}&mallId=${this.mallId}`) : await this.$post(`${this.api.getAssessmentDetail}?pageNum=${this.page}&pageSize=${this.pageSize}&assessmentId=${this.id}&classId=${this.classId}&keyword=${this.keyword}&mallId=${this.mallId}`) :
await this.$post(`${this.api.getPracticeDetail}?pageNum=${this.page}&pageSize=${this.pageSize}&projectId=${this.id}&keyWord=${this.keyword}&classId=${this.classId}&mallId=${this.mallId}`) await this.$post(`${this.api.getPracticeDetail}?pageNum=${this.page}&pageSize=${this.pageSize}&projectId=${this.id}&keyWord=${this.keyword}&classId=${this.classId}&mallId=${this.mallId}`)
this.listData = res.page.records //
this.total = res.page.total const isArr = res.page instanceof Array
this.listData = isArr ? res.page : res.page.records
this.total = isArr ? res.total : res.page.total
this.avgScore = (+res.avgScore).toFixed(2) this.avgScore = (+res.avgScore).toFixed(2)
this.examCount = res.examCount this.examCount = res.examCount
this.peopleNum = res.peopleNum this.peopleNum = res.peopleNum
@ -339,6 +341,16 @@ export default {
list = res.page.records list = res.page.records
} }
const res = await axios.post(this.api.exportMultipleExperimentalReports, list.map(e => e.reportId), {
headers: {
token: this.token
},
responseType: 'blob'
})
const name = res.headers['content-disposition']
util.downloadFileDirect(name ? decodeURI(name) : '成绩报告.xlsx', new Blob([res.data]))
this.exporting = false
return
list.forEach(async e => { list.forEach(async e => {
if (e.reportId) { if (e.reportId) {
try { try {

@ -1,66 +1,38 @@
<template> <template>
<div class="page" <div class="page" v-loading="loading">
v-loading="loading">
<h6 class="p-title">筛选</h6> <h6 class="p-title">筛选</h6>
<div class="tool mul"> <div class="tool mul">
<ul class="filter"> <ul class="filter">
<li> <li>
<el-input placeholder="请输入课程名称" <el-input placeholder="请输入课程名称" prefix-icon="el-icon-search" v-model="keyword" clearable></el-input>
prefix-icon="el-icon-search"
v-model="keyword"
clearable></el-input>
</li> </li>
</ul> </ul>
</div> </div>
<el-table :data="list" <el-table :data="list" class="table" ref="table" stripe header-align="center" row-key="id">
class="table" <el-table-column type="index" width="60" label="序号" align="center">
ref="table"
stripe
header-align="center"
row-key="id">
<el-table-column type="index"
width="60"
label="序号"
align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.$index + (page - 1) * pageSize + 1 }} {{ scope.$index + (page - 1) * pageSize + 1 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="curriculumName" <el-table-column prop="curriculumName" label="课程" align="center" min-width="200"></el-table-column>
label="课程"
align="center"
min-width="200"></el-table-column>
<!-- <el-table-column prop="className" <!-- <el-table-column prop="className"
label="班级" label="班级"
align="center" align="center"
min-width="130"></el-table-column> --> min-width="130"></el-table-column> -->
<el-table-column prop="numberOfPracticeItems" <el-table-column prop="numberOfPracticeItems" label="练习项目数" align="center" min-width="100"></el-table-column>
label="练习项目数" <el-table-column prop="numberOfAssessmentItems" label="考核项目数" align="center" min-width="100"></el-table-column>
align="center"
min-width="100"></el-table-column>
<el-table-column prop="numberOfAssessmentItems"
label="考核项目数"
align="center"
min-width="100"></el-table-column>
<!-- <el-table-column prop="classSize" <!-- <el-table-column prop="classSize"
label="班级人数" label="班级人数"
align="center" align="center"
min-width="100"></el-table-column> --> min-width="100"></el-table-column> -->
<el-table-column label="操作" <el-table-column label="操作" align="center" width="100">
align="center"
width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button v-auth="'练习成绩管理'" <el-button v-auth="'练习成绩管理'" type="text" @click="entry(scope.row)">成绩管理</el-button>
type="text"
@click="entry(scope.row)">成绩管理</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="pagination"> <div class="pagination">
<el-pagination background <el-pagination background layout="total, prev, pager, next" :total="total" @current-change="handleCurrentChange"
layout="total, prev, pager, next"
:total="total"
@current-change="handleCurrentChange"
:current-page="page"></el-pagination> :current-page="page"></el-pagination>
</div> </div>
</div> </div>
@ -253,9 +225,10 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.el-radio.is-bordered + .el-radio.is-bordered { .el-radio.is-bordered+.el-radio.is-bordered {
margin-left: 0; margin-left: 0;
} }
.el-radio-group { .el-radio-group {
white-space: nowrap; white-space: nowrap;
} }

@ -218,9 +218,14 @@ export default {
index++ index++
} }
}) })
// lcStudentAnswerlcRuleRecords
if (e.lcStudentAnswer) {
e.lcStudentAnswer.map((n, i) => { e.lcStudentAnswer.map((n, i) => {
e.answer += `${i + 1}.${n.userAnswer || '未填写'};` e.answer += `${i + 1}.${n.userAnswer || '未填写'};`
}) })
} else {
e.lcStudentAnswer = e.lcRuleRecords
}
}) })
} else { // pythonuserScores } else { // pythonuserScores
list.forEach(e => { list.forEach(e => {
@ -234,7 +239,7 @@ export default {
this.expData = list this.expData = list
this.loading = false this.loading = false
}, },
exportPage () { async exportPage () {
const form = Object.assign(this.form, this.infoData) const form = Object.assign(this.form, this.infoData)
const list = JSON.parse(JSON.stringify(this.expData)) const list = JSON.parse(JSON.stringify(this.expData))
list.map((e, i) => { list.map((e, i) => {
@ -387,6 +392,7 @@ samp {
padding: 10px 16px; padding: 10px 16px;
font-size: 14px; font-size: 14px;
color: #333; color: #333;
white-space: pre-wrap;
&.edit { &.edit {
color: #abb3c6; color: #abb3c6;

@ -1,33 +1,24 @@
<template> <template>
<div> <div>
<el-form :disabled="isDetail"> <el-form :disabled="isDetail">
<el-card shadow="hover" <el-card shadow="hover" class="m-b-20">
class="m-b-20">
<div class="flex-between"> <div class="flex-between">
<el-page-header @back="goBack" <el-page-header @back="goBack" :content="isDetail ? '查看' : (form.id ? '更新' : '创建') + '教学实验'"></el-page-header>
:content="isDetail ? '查看' : (form.id ? '更新' : '创建') + '教学实验'"></el-page-header>
<div> <div>
<el-button type="primary" <el-button type="primary" @click="save(0)" v-show="!isDetail">{{ form.id ? "更新" : "创建" }}</el-button>
@click="save(0)"
v-show="!isDetail">{{ form.id ? "更新" : "创建" }}</el-button>
</div> </div>
</div> </div>
</el-card> </el-card>
<el-card shadow="hover" <el-card shadow="hover" class="mgr20 m-b-20">
class="mgr20 m-b-20">
<div> <div>
<p class="m-b-20">考核名称</p> <p class="m-b-20">考核名称</p>
<el-input placeholder="请输入考核名称" <el-input placeholder="请输入考核名称" v-model.trim="form.experimentalName" clearable maxlength="15"
v-model.trim="form.experimentalName"
clearable
maxlength="15"
class="inline-input"></el-input> class="inline-input"></el-input>
</div> </div>
</el-card> </el-card>
<el-card shadow="hover" <el-card shadow="hover" class="m-b-20">
class="m-b-20">
<div> <div>
<p class="m-b-20">发布方式</p> <p class="m-b-20">发布方式</p>
<el-radio-group v-model="form.type"> <el-radio-group v-model="form.type">
@ -37,54 +28,33 @@
</div> </div>
</el-card> </el-card>
<!-- 根据发布方式判断时间的显示 --> <!-- 根据发布方式判断时间的显示 -->
<el-card shadow="hover" <el-card shadow="hover" class="m-b-20">
class="m-b-20">
<div> <div>
<p class="m-b-20">实验时间</p> <p class="m-b-20">实验时间</p>
<!-- 手动发布显示 --> <!-- 手动发布显示 -->
<div class="date-inputs" <div class="date-inputs" v-if="form.type == 1">
v-if="form.type==1">
实验时长 实验时长
<el-input type="number" <el-input type="number" min="0" v-model.trim="duration.day" placeholder></el-input>
min="0"
v-model.trim="duration.day"
placeholder></el-input>
<el-input type="number" <el-input type="number" min="0" v-model.trim="duration.hour" placeholder></el-input>
min="0"
v-model.trim="duration.hour"
placeholder></el-input>
小时 小时
<el-input type="number" <el-input type="number" min="0" v-model.trim="duration.minute" placeholder></el-input>
min="0"
v-model.trim="duration.minute"
placeholder></el-input>
</div> </div>
<!-- 定时发布显示 --> <!-- 定时发布显示 -->
<div v-if="form.type==2" <div v-if="form.type == 2" class="addAssess">
class="addAssess">
<span class="mgr10">开始时间:</span> <span class="mgr10">开始时间:</span>
<el-date-picker size="small" <el-date-picker size="small" v-model="date" type="datetimerange" range-separator="-"
v-model="date" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions"></el-date-picker>
type="datetimerange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
:picker-options="pickerOptions"></el-date-picker>
</div> </div>
</div> </div>
</el-card> </el-card>
<el-card shadow="hover" <el-card shadow="hover" class="mgr20 m-b-20">
class="mgr20 m-b-20">
<div> <div>
<p class="m-b-20">课程</p> <p class="m-b-20">课程</p>
<div class="inline-input"> <div class="inline-input">
<el-select v-model="form.mallId" <el-select v-model="form.mallId" @change="initData">
@change="initData"> <el-option v-for="item in curriculumList" :key="item.mallId" :label="item.curriculumName"
<el-option v-for="item in curriculumList"
:key="item.mallId"
:label="item.curriculumName"
:value="item.mallId"> :value="item.mallId">
</el-option> </el-option>
</el-select> </el-select>
@ -100,76 +70,49 @@
</div> </div>
</el-card> </el-card>
<!-- 实训项目模块 --> <!-- 实训项目模块 -->
<el-card shadow="hover" <el-card shadow="hover" class="m-b-20">
class="m-b-20">
<div class="flex-between m-b-20"> <div class="flex-between m-b-20">
<span>实训项目</span> <span>实训项目</span>
<div style="display: inline-flex;"> <div style="display: inline-flex;">
<div> <div>
<el-input placeholder="请输入项目名称" <el-input placeholder="请输入项目名称" prefix-icon="el-icon-search" v-model.trim="keyword" clearable></el-input>
prefix-icon="el-icon-search"
v-model.trim="keyword"
clearable></el-input>
</div> </div>
<el-button style="margin-left: 5px" <el-button style="margin-left: 5px" type="primary" round @click="toProject">自定义实验项目</el-button>
type="primary"
round
@click="toProject">自定义实验项目</el-button>
</div> </div>
</div> </div>
<!-- 实训项目表格 --> <!-- 实训项目表格 -->
<el-table :data="projectData" <el-table :data="projectData" class="table" stripe header-align="center">
class="table"
stripe
header-align="center">
<!-- 单选实训项目ID --> <!-- 单选实训项目ID -->
<el-table-column width="60" <el-table-column width="60" label="选择" align="center">
label="选择"
align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-radio v-model="form.projectId" <el-radio v-model="form.projectId" :label="scope.row.projectId">&nbsp;</el-radio>
:label="scope.row.projectId">&nbsp;</el-radio>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="projectName" <el-table-column prop="projectName" label="项目名称" align="center"></el-table-column>
label="项目名称" <el-table-column prop="auth" label="项目权限" align="center">
align="center"></el-table-column>
<el-table-column prop="auth"
label="项目权限"
align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ permissionsKeys[scope.row.permissions] }} {{ permissionsKeys[scope.row.permissions] }}
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column prop="createUser" label="创建人" align="center"></el-table-column> --> <!-- <el-table-column prop="createUser" label="创建人" align="center"></el-table-column> -->
<el-table-column prop="founder" <el-table-column prop="founder" label="创建人" align="center">
label="创建人"
align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.createUser }} {{ scope.row.createUser }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="createTime" <el-table-column prop="createTime" label="创建时间" align="center"></el-table-column>
label="创建时间" <el-table-column label="操作" align="center">
align="center"></el-table-column>
<el-table-column label="操作"
align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" <el-button type="text" @click="showProject(scope.row)">查看</el-button>
@click="showProject(scope.row)">查看</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="pagination"> <div class="pagination">
<el-pagination background <el-pagination background :page-size="pageSize" @current-change="handleCurrentChange"
:page-size="pageSize" layout="total,prev, pager, next" :total="total"></el-pagination>
@current-change="handleCurrentChange"
layout="total,prev, pager, next"
:total="total"></el-pagination>
</div> </div>
</el-card> </el-card>
<el-card shadow="hover" <el-card shadow="hover" class="mgr20 m-b-20">
class="mgr20 m-b-20">
<div> <div>
<p class="m-b-20">考核发布</p> <p class="m-b-20">考核发布</p>
<el-radio-group v-model="form.isSpecify"> <el-radio-group v-model="form.isSpecify">
@ -177,46 +120,28 @@
<el-radio :label="0">无指定范围</el-radio> <el-radio :label="0">无指定范围</el-radio>
</el-radio-group> </el-radio-group>
</div> </div>
<div v-show="form.isSpecify == 1" <div v-show="form.isSpecify == 1" style="padding-top: 24px;">
style="padding-top: 24px;">
<p class="m-b-20">班级名称</p> <p class="m-b-20">班级名称</p>
<el-input placeholder="请输入班级名称" <el-input placeholder="请输入班级名称" v-model.trim="filterClassName" class="inline-input m-b-20" clearable>
v-model.trim="filterClassName" <el-button slot="append" icon="el-icon-search"></el-button>
class="inline-input m-b-20"
clearable>
<el-button slot="append"
icon="el-icon-search"></el-button>
</el-input> </el-input>
<div v-show="tagList.length" <div v-show="tagList.length" class="m-b-20">
class="m-b-20"> <el-tag v-for="(tag, index) in tagList" :key="index" closable @close="handleCloseTag(tag)"
<el-tag v-for="(tag, index) in tagList"
:key="index"
closable
@close="handleCloseTag(tag)"
style="margin-right: 10px"> style="margin-right: 10px">
{{ tag.organizationName }} {{ tag.organizationName }}
</el-tag> </el-tag>
</div> </div>
<div class="tree-con"> <div class="tree-con">
<student-tree ref="tree" <student-tree ref="tree" node-key="id" show-checkbox highlight-current default-expand-all lazy
node-key="id" :load="loadTree" :default-checked-keys="defaultCheckedKeys"
show-checkbox :props="{ children: 'children', label: 'organizationName', isLeaf: 'leaf' }"
highlight-current :filter-node-method="filterNode" @check="handleCheck">
default-expand-all
lazy
:load="loadTree"
:default-checked-keys="defaultCheckedKeys"
:props="{children: 'children', label: 'organizationName', isLeaf: 'leaf'}"
:filter-node-method="filterNode"
@check="handleCheck">
</student-tree> </student-tree>
</div> </div>
</div> </div>
</el-card> </el-card>
<!-- 邀请码 --> <!-- 邀请码 -->
<el-card v-if="form.isSpecify == 0" <el-card v-if="form.isSpecify == 0" shadow="hover" class="m-b-20">
shadow="hover"
class="m-b-20">
<div style="margin-bottom: 10px"> <div style="margin-bottom: 10px">
<p class="m-b-20">设置邀请码</p> <p class="m-b-20">设置邀请码</p>
<el-radio-group v-model="form.isEnableCode"> <el-radio-group v-model="form.isEnableCode">
@ -225,13 +150,9 @@
</el-radio-group> </el-radio-group>
</div> </div>
<div v-if="form.isEnableCode == 1"> <div v-if="form.isEnableCode == 1">
<el-input style="display: inline-block;width: auto;margin-right: 10px" <el-input style="display: inline-block;width: auto;margin-right: 10px" type="number"
type="number" v-model.trim="form.invitationCode" maxlength="6" placeholder="请设置6个数字"></el-input>
v-model.trim="form.invitationCode" <el-button type="text" @click="createInv">随机</el-button>
maxlength="6"
placeholder="请设置6个数字"></el-input>
<el-button type="text"
@click="createInv">随机</el-button>
</div> </div>
</el-card> </el-card>
</el-form> </el-form>
@ -597,16 +518,16 @@ export default {
expNameRepeat: this.expNameRepeat, // expNameRepeat: this.expNameRepeat, //
allCheckedNodes: this.allCheckedNodes // allCheckedNodes: this.allCheckedNodes //
}; };
this.setAss(data); this.setAss(data)
this.isToProject = true; this.isToProject = true
}, },
toProject () { toProject () {
this.handleCacheData(); this.handleCacheData()
this.$router.push("/project/list?show=1"); this.$router.push("/project/list?show=1")
}, },
showProject (row) { showProject (row) {
this.handleCacheData(); this.handleCacheData()
this.$router.push(`/project/add?projectId=${row.projectId}&show=1`); this.$router.push(`/project/add?projectId=${row.projectId}&show=1&ass=1`)
}, },
createInv () { createInv () {
let result = ""; let result = "";
@ -648,11 +569,13 @@ export default {
.inline-input { .inline-input {
width: 500px; width: 500px;
} }
.date-inputs { .date-inputs {
.el-input { .el-input {
width: 100px; width: 100px;
} }
} }
.tree-con { .tree-con {
height: 400px; height: 400px;
max-height: 400px; max-height: 400px;
@ -661,8 +584,10 @@ export default {
border-radius: 4px; border-radius: 4px;
padding: 10px 10px 10px 40px; padding: 10px 10px 10px 40px;
overflow: auto; overflow: auto;
/deep/ .el-tree-node__content { /deep/ .el-tree-node__content {
height: 30px; height: 30px;
.el-tree-node__expand-icon { .el-tree-node__expand-icon {
padding: 2px; padding: 2px;
color: #fff; color: #fff;
@ -670,23 +595,28 @@ export default {
border-radius: 30px; border-radius: 30px;
margin: 0 10px; margin: 0 10px;
} }
.el-tree-node__expand-icon.is-leaf { .el-tree-node__expand-icon.is-leaf {
background-color: transparent; background-color: transparent;
} }
.el-icon-caret-right:before { .el-icon-caret-right:before {
font-size: 14px; font-size: 14px;
} }
.el-checkbox__inner { .el-checkbox__inner {
width: 18px; width: 18px;
height: 18px; height: 18px;
border: 1px solid #9278ff; border: 1px solid #9278ff;
border-radius: 20px; border-radius: 20px;
} }
.el-checkbox__inner::after { .el-checkbox__inner::after {
position: absolute; position: absolute;
top: 3px; top: 3px;
left: 6px; left: 6px;
} }
.el-checkbox__input.is-indeterminate .el-checkbox__inner::before { .el-checkbox__input.is-indeterminate .el-checkbox__inner::before {
position: absolute; position: absolute;
top: 7px; top: 7px;

@ -1,141 +1,87 @@
<template> <template>
<div class="wrap"> <div class="wrap">
<el-card shadow="hover" <el-card shadow="hover" class="m-b-20">
class="m-b-20">
<div class="flex-between"> <div class="flex-between">
<el-page-header @back="$router.push('list')" <el-page-header @back="$router.push('list')" :content="form.mall.productName"></el-page-header>
:content="form.mall.productName"></el-page-header>
</div> </div>
</el-card> </el-card>
<div class="inner"> <div class="inner">
<div class="top"> <div class="top">
<el-carousel class="pics" <el-carousel class="pics" :interval="6000" height="278px" :arrow="form.pics.length > 1 ? 'hover' : 'never'"
:interval="6000"
height="278px"
:arrow="form.pics.length > 1 ? 'hover' : 'never'"
:indicator-position="form.pics.length > 1 ? '' : 'none'"> :indicator-position="form.pics.length > 1 ? '' : 'none'">
<el-carousel-item v-for="(item, i) in form.pics" <el-carousel-item v-for="(item, i) in form.pics" :key="i">
:key="i"> <img class="pic" :src="item" />
<img class="pic"
:src="item" />
</el-carousel-item> </el-carousel-item>
</el-carousel> </el-carousel>
<div class="right" <div class="right" id="fields">
id="fields">
<h6>{{ form.mall.productName }}</h6> <h6>{{ form.mall.productName }}</h6>
<div v-if="isCourse" <div v-if="isCourse" class="meta">
class="meta">
<span class="val">{{ form.numberOfExperimentalItems }}</span> 个实验项目&emsp;&emsp; <span class="val">{{ form.numberOfExperimentalItems }}</span> 个实验项目&emsp;&emsp;
已有 <span class="val">{{ form.goodsRes.learningCount }}</span>人学过 已有 <span class="val">{{ form.goodsRes.learningCount }}</span>人学过
</div> </div>
<div class="des" <div class="des" v-html="form.mall.productIntroduction"></div>
v-html="form.mall.productIntroduction"></div>
<div class="fields"> <div class="fields">
<div class="field"> <div class="field">
<img src="@/assets/img/product/1.png" <img src="@/assets/img/product/1.png" alt=""> 适用专业
alt=""> 适用专业 <el-tooltip class="text" effect="dark" :visible-arrow="false" :content="form.goodsRes.professionalName"
<el-tooltip class="text"
effect="dark"
:visible-arrow="false"
:content="form.goodsRes.professionalName"
placement="bottom"> placement="bottom">
<div> <div>
{{ form.goodsRes.professionalName }} {{ form.goodsRes.professionalName }}
</div> </div>
</el-tooltip> </el-tooltip>
</div> </div>
<div v-if="form.mall.applicationScenario" <div v-if="form.mall.applicationScenario" class="field">
class="field"> <img src="@/assets/img/product/2.png" alt=""> 适用场景
<img src="@/assets/img/product/2.png"
alt=""> 适用场景
<div class="text">{{ form.mall.applicationScenario }}</div> <div class="text">{{ form.mall.applicationScenario }}</div>
</div> </div>
<div v-if="form.mall.matchingCourse" <div v-if="form.mall.matchingCourse" class="field">
class="field"> <img src="@/assets/img/product/3.png" alt=""> 匹配课程
<img src="@/assets/img/product/3.png" <el-tooltip class="text" effect="dark" :visible-arrow="false" :content="form.mall.matchingCourse"
alt=""> 匹配课程
<el-tooltip class="text"
effect="dark"
:visible-arrow="false"
:content="form.mall.matchingCourse"
placement="bottom"> placement="bottom">
<div class="text"> <div class="text">
{{ form.mall.matchingCourse }} {{ form.mall.matchingCourse }}
</div> </div>
</el-tooltip> </el-tooltip>
</div> </div>
<div v-if="form.mall.courseHours" <div v-if="form.mall.courseHours" class="field">
class="field"> <img src="@/assets/img/product/4.png" alt=""> 预计课时
<img src="@/assets/img/product/4.png"
alt=""> 预计课时
<div class="text">{{ form.mall.courseHours }}</div> <div class="text">{{ form.mall.courseHours }}</div>
</div> </div>
<div v-if="form.goodsRes.typeName" <div v-if="form.goodsRes.typeName" class="field">
class="field"> <img src="@/assets/img/product/5.png" alt=""> 产品类型
<img src="@/assets/img/product/5.png"
alt=""> 产品类型
<div class="text">{{ form.goodsRes.typeName }}</div> <div class="text">{{ form.goodsRes.typeName }}</div>
</div> </div>
</div> </div>
<button v-if="!form.goodsRes.logoOfOurSchool" <button v-if="!form.goodsRes.logoOfOurSchool" class="btn" @click="toTrail">试用体验</button>
class="btn" <button v-else-if="isCourse || withLink" class="btn entry" @click="toStation">进入{{ isDataforward ? '系统' : '实验'
@click="toTrail">试用体验</button> }}</button>
<button v-else-if="isCourse || withLink" <button v-else-if="isValueModule" class="btn entry" @click="toSystem">进入系统</button>
class="btn entry"
@click="toStation">进入{{ isDataforward ? '系统' : '实验' }}</button>
<button v-else-if="isValueModule"
class="btn entry"
@click="toSystem">进入系统</button>
</div> </div>
</div> </div>
<div class="course" <div class="course" id="part0">
id="part0">
<div class="detail"> <div class="detail">
<ul class="tab"> <ul class="tab">
<li v-for="(tab, i) in tabs" <li v-for="(tab, i) in tabs" :key="i" :class="{ active: curTab === tab.id }" @click="tabChange(tab)">{{
:key="i" tab.name }}</li>
:class="{active: curTab === tab.id}"
@click="tabChange(tab)">{{ tab.name }}</li>
</ul> </ul>
<div class="courses"> <div class="courses">
<div class="des" <div class="des" v-html="form.mall.detailedIntroduction"></div>
v-html="form.mall.detailedIntroduction"></div> <div v-if="isCourse" class="chapter" id="part1" v-for="(item, i) in chapterList" :key="i">
<div v-if="isCourse"
class="chapter"
id="part1"
v-for="(item, i) in chapterList"
:key="i">
<div class="chapterName">{{ item.name }}</div> <div class="chapterName">{{ item.name }}</div>
<div class="section" <div class="section" v-if="item.subsectionList.length">
v-if="item.subsectionList.length"> <div v-for="(section, j) in item.subsectionList" :key="j" @click="toPreview(i, j)">
<div v-for="(section, j) in item.subsectionList" <div class="sectionName" :title="section.name">
:key="j"
@click="toPreview(i, j)">
<div class="sectionName"
:title="section.name">
<div class="val"> <div class="val">
<img v-if="section.fileType === 'pptx'" <img v-if="section.fileType === 'pptx'" src="@/assets/img/exts/ppt.png" alt="">
src="@/assets/img/exts/ppt.png" <img v-else-if="section.fileType === 'mp4'" src="@/assets/img/exts/video.png" alt="">
alt="">
<img v-else-if="section.fileType === 'mp4'"
src="@/assets/img/exts/video.png"
alt="">
<img v-else-if="section.fileType === 'doc' || section.fileType === 'docx'" <img v-else-if="section.fileType === 'doc' || section.fileType === 'docx'"
src="@/assets/img/exts/word.png" src="@/assets/img/exts/word.png" alt="">
alt=""> <img v-else-if="section.fileType === 'txt'" src="@/assets/img/exts/txt.png" alt="">
<img v-else-if="section.fileType === 'txt'" <img v-else-if="section.fileType === 'pdf'" src="@/assets/img/exts/pdf.png" alt="">
src="@/assets/img/exts/txt.png" <img v-else src="@/assets/img/exts/pic.png" alt="">
alt="">
<img v-else-if="section.fileType === 'pdf'"
src="@/assets/img/exts/pdf.png"
alt="">
<img v-else
src="@/assets/img/exts/pic.png"
alt="">
{{ section.name }} {{ section.name }}
</div> </div>
<i v-if="!form.goodsRes.logoOfOurSchool && j" <i v-if="!form.goodsRes.logoOfOurSchool && j" class="icon el-icon-lock"></i>
class="icon el-icon-lock"></i>
</div> </div>
</div> </div>
</div> </div>
@ -145,33 +91,20 @@
<div class="products"> <div class="products">
<h6>热门产品推荐</h6> <h6>热门产品推荐</h6>
<ul class="product"> <ul class="product">
<li v-for="(item, i) in hots" <li v-for="(item, i) in hots" :key="i" @click="toDetail(item.mallId)">
:key="i" <img :src="item.coverDrawing" alt="" />
@click="toDetail(item.mallId)"> <img v-if="item.logoOfOurSchool" class="my-school" src="@/assets/img/my-school.png" alt="">
<img :src="item.coverDrawing"
alt="" />
<img v-if="item.logoOfOurSchool"
class="my-school"
src="@/assets/img/my-school.png"
alt="">
<div class="texts"> <div class="texts">
<div class="title">{{ item.productName }}</div> <div class="title">{{ item.productName }}</div>
<div :class="['desc', {'not-tag': !item.tagsName}]" <div :class="['desc', { 'not-tag': !item.tagsName }]" v-html="item.productIntroduction"></div>
v-html="item.productIntroduction"></div> <div v-if="item.tagsName" class="tags">
<div v-if="item.tagsName" <el-tag v-for="(tag, i) in item.tagsName.split(',')" :key="i" class="tag">{{ tag }}</el-tag>
class="tags">
<el-tag v-for="(tag, i) in item.tagsName.split(',')"
:key="i"
class="tag">{{ tag }}</el-tag>
</div> </div>
<div class="metas"> <div class="metas">
<el-tag v-if="item.selected" <el-tag v-if="item.selected" type="danger" effect="dark">
type="danger"
effect="dark">
官方精选 官方精选
</el-tag> </el-tag>
<div v-if="item.isCourse" <div v-if="item.isCourse" class="meta">{{ item.learningCount }}人学过</div>
class="meta">{{ item.learningCount }}人学过</div>
</div> </div>
</div> </div>
</li> </li>
@ -181,20 +114,11 @@
</div> </div>
<!-- 选择链接 --> <!-- 选择链接 -->
<el-dialog title="请选择链接" <el-dialog title="请选择链接" :visible.sync="linkVisible" width="420px" center :close-on-click-modal="false">
:visible.sync="linkVisible" <div v-if="withLink" class="buy">
width="420px" <div v-for="(link, i) in form.mallNonAssociatedLinks" :key="i" class="link-line">
center
:close-on-click-modal="false">
<div v-if="withLink"
class="buy">
<div v-for="(link, i) in form.mallNonAssociatedLinks"
:key="i"
class="link-line">
{{ link.urlName }} {{ link.urlName }}
<a class="url" <a class="url" :href="link.url" target="_blank">{{ link.url }}</a>
:href="link.url"
target="_blank">{{ link.url }}</a>
</div> </div>
</div> </div>
</el-dialog> </el-dialog>
@ -334,14 +258,19 @@ export default {
window.open('https://www.wjx.top/vm/wFCPCFp.aspx') window.open('https://www.wjx.top/vm/wFCPCFp.aspx')
}, },
// //
toStation () { async toStation () {
if (this.isCourse) { // if (this.isCourse) { //
this.$post(`${this.api.addLearningRecord}?mallId=${this.id}`).then(res => { await this.$post(`${this.api.addLearningRecord}?mallId=${this.id}`)
this.$router.push('/station/preview?courseId=' + this.form.mall.associatedProduct + '&curriculumName=' + this.form.mall.productName + '&mallId=' + this.id + '&admin=1') this.$router.push('/station/preview?courseId=' + this.form.mall.associatedProduct + '&curriculumName=' + this.form.mall.productName + '&mallId=' + this.id + '&admin=1')
}).catch(res => { })
} else if (this.withLink) { // } else if (this.withLink) { //
const links = this.form.mallNonAssociatedLinks
//
if (links.length === 1) {
window.open(links[0].url)
} else {
this.linkVisible = true this.linkVisible = true
} }
}
}, },
// //
toSystem () { toSystem () {
@ -383,41 +312,50 @@ export default {
margin: -24px; margin: -24px;
background: url(../../../assets/img/product/bg1.png) 0 373px no-repeat, url(../../../assets/img/product/bg2.png) bottom right no-repeat; background: url(../../../assets/img/product/bg1.png) 0 373px no-repeat, url(../../../assets/img/product/bg2.png) bottom right no-repeat;
background-color: #f3f6fa; background-color: #f3f6fa;
.inner { .inner {
width: 1146px; width: 1146px;
margin: 0 auto; margin: 0 auto;
} }
.top { .top {
display: flex; display: flex;
padding: 24px; padding: 24px;
background-color: #fff; background-color: #fff;
border-radius: 10px; border-radius: 10px;
.pics { .pics {
width: 484px; width: 484px;
margin-right: 20px; margin-right: 20px;
.pic { .pic {
width: 100%; width: 100%;
height: 100%; height: 100%;
border-radius: 8px; border-radius: 8px;
} }
} }
.right { .right {
width: 592px; width: 592px;
overflow: hidden; overflow: hidden;
} }
h6 { h6 {
font-size: 24px; font-size: 24px;
font-weight: 600; font-weight: 600;
color: #2e2d31; color: #2e2d31;
} }
.meta { .meta {
margin: 10px 0; margin: 10px 0;
font-size: 12px; font-size: 12px;
color: #2e2d31; color: #2e2d31;
.val { .val {
color: #007eff; color: #007eff;
} }
} }
.des { .des {
margin-bottom: 15px; margin-bottom: 15px;
font-size: 14px; font-size: 14px;
@ -425,26 +363,32 @@ export default {
line-height: 20px; line-height: 20px;
@include mul-ellipsis(3); @include mul-ellipsis(3);
} }
.field { .field {
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
margin: 0 20px 10px 0; margin: 0 20px 10px 0;
font-size: 14px; font-size: 14px;
color: #2e2d31; color: #2e2d31;
&:last-child { &:last-child {
margin-right: 0; margin-right: 0;
} }
.label { .label {
color: #333; color: #333;
} }
.text { .text {
max-width: 160px; max-width: 160px;
@include ellipsis; @include ellipsis;
} }
img { img {
margin-right: 5px; margin-right: 5px;
} }
} }
.fields { .fields {
display: flex; display: flex;
// justify-content: space-between; // justify-content: space-between;
@ -453,6 +397,7 @@ export default {
margin: 10px 0 10px; margin: 10px 0 10px;
overflow: hidden; overflow: hidden;
} }
.btn { .btn {
width: 119px; width: 119px;
height: 46px; height: 46px;
@ -461,17 +406,21 @@ export default {
border-radius: 6px; border-radius: 6px;
border: 0; border: 0;
cursor: pointer; cursor: pointer;
&:hover { &:hover {
opacity: 0.9; opacity: 0.9;
} }
&:first-child { &:first-child {
margin-left: 11px; margin-left: 11px;
} }
} }
.entry { .entry {
background: #007eff; background: #007eff;
} }
} }
.tab { .tab {
z-index: 100; z-index: 100;
position: sticky; position: sticky;
@ -479,6 +428,7 @@ export default {
display: flex; display: flex;
padding: 10px 10px 20px; padding: 10px 10px 20px;
background-color: #fff; background-color: #fff;
li { li {
position: relative; position: relative;
margin-right: 20px; margin-right: 20px;
@ -486,6 +436,7 @@ export default {
line-height: 25px; line-height: 25px;
color: #0b1d30; color: #0b1d30;
cursor: pointer; cursor: pointer;
&:after { &:after {
content: ''; content: '';
position: absolute; position: absolute;
@ -495,14 +446,17 @@ export default {
height: 4px; height: 4px;
transform: translateX(-50%); transform: translateX(-50%);
} }
&.active:after { &.active:after {
background-color: #007eff; background-color: #007eff;
} }
} }
} }
.course { .course {
display: flex; display: flex;
margin-top: 20px; margin-top: 20px;
.detail { .detail {
width: calc(100% - 294px); width: calc(100% - 294px);
padding: 20px 24px; padding: 20px 24px;
@ -510,9 +464,11 @@ export default {
border-radius: 10px; border-radius: 10px;
} }
} }
.courses { .courses {
padding-top: 10px; padding-top: 10px;
overflow: hidden; overflow: hidden;
/deep/.des { /deep/.des {
div, div,
p, p,
@ -520,15 +476,18 @@ export default {
font-family: PingFang SC !important; font-family: PingFang SC !important;
} }
} }
.chapters { .chapters {
margin-top: 16px; margin-top: 16px;
max-height: calc(100% - 53px); max-height: calc(100% - 53px);
overflow: auto; overflow: auto;
} }
.chapter { .chapter {
padding-top: 60px; padding-top: 60px;
margin-bottom: 20px; margin-bottom: 20px;
} }
.chapterName { .chapterName {
padding: 0 12px; padding: 0 12px;
margin-bottom: 15px; margin-bottom: 15px;
@ -536,6 +495,7 @@ export default {
font-size: 14px; font-size: 14px;
font-weight: 600; font-weight: 600;
} }
.sectionName { .sectionName {
position: relative; position: relative;
display: flex; display: flex;
@ -546,33 +506,41 @@ export default {
cursor: pointer; cursor: pointer;
border-radius: 8px; border-radius: 8px;
@include ellipsis; @include ellipsis;
img { img {
margin-right: 8px; margin-right: 8px;
} }
&:hover { &:hover {
color: #007eff; color: #007eff;
background: #f6fbff; background: #f6fbff;
} }
.val { .val {
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
} }
.icon { .icon {
font-size: 18px; font-size: 18px;
color: #666; color: #666;
} }
} }
} }
.products { .products {
width: 270px; width: 270px;
margin-left: 24px; margin-left: 24px;
& > h6 {
&>h6 {
font-size: 14px; font-size: 14px;
color: #0b1d30; color: #0b1d30;
} }
} }
.product { .product {
margin-top: 11px; margin-top: 11px;
li { li {
position: relative; position: relative;
margin-bottom: 15px; margin-bottom: 15px;
@ -581,11 +549,13 @@ export default {
background-color: #fff; background-color: #fff;
transition: all 0.3s; transition: all 0.3s;
overflow: hidden; overflow: hidden;
img { img {
width: 100%; width: 100%;
height: 155px; height: 155px;
transition: 0.3s; transition: 0.3s;
} }
.my-school { .my-school {
position: absolute; position: absolute;
top: 0; top: 0;
@ -593,9 +563,11 @@ export default {
width: 57px; width: 57px;
height: 22px; height: 22px;
} }
.texts { .texts {
padding: 10px; padding: 10px;
} }
.title { .title {
margin-bottom: 10px; margin-bottom: 10px;
color: #0b1d30; color: #0b1d30;
@ -607,6 +579,7 @@ export default {
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
} }
.desc { .desc {
min-height: 34px; min-height: 34px;
color: #757f92; color: #757f92;
@ -615,19 +588,23 @@ export default {
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
-webkit-line-clamp: 2; -webkit-line-clamp: 2;
overflow: hidden; overflow: hidden;
&.not-tag { &.not-tag {
-webkit-line-clamp: 3; -webkit-line-clamp: 3;
} }
} }
.tags { .tags {
margin-top: 10px; margin-top: 10px;
} }
.tag { .tag {
margin-right: 8px; margin-right: 8px;
color: #007eff; color: #007eff;
background-color: #f9f9f9; background-color: #f9f9f9;
border: 0; border: 0;
} }
.type { .type {
display: inline-block; display: inline-block;
padding: 4px 11px; padding: 4px 11px;
@ -636,26 +613,31 @@ export default {
border: 1px solid #dadada; border: 1px solid #dadada;
border-radius: 20px; border-radius: 20px;
} }
.metas { .metas {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
margin-top: 10px; margin-top: 10px;
} }
.meta { .meta {
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
color: #b5bfd5; color: #b5bfd5;
font-size: 12px; font-size: 12px;
.icon { .icon {
width: 14px; width: 14px;
max-height: 14px; max-height: 14px;
margin-right: 3px; margin-right: 3px;
} }
} }
&:hover { &:hover {
box-shadow: 0px 5px 12px 4px rgba(142, 123, 253, 0.09), 0px 3px 6px 0px rgba(142, 123, 253, 0.12), box-shadow: 0px 5px 12px 4px rgba(142, 123, 253, 0.09), 0px 3px 6px 0px rgba(142, 123, 253, 0.12),
0px 1px 2px -2px rgba(142, 123, 253, 0.16); 0px 1px 2px -2px rgba(142, 123, 253, 0.16);
img { img {
transform: scale(1.05); transform: scale(1.05);
} }
@ -663,8 +645,10 @@ export default {
} }
} }
} }
.link-line { .link-line {
margin: 5px 0; margin: 5px 0;
.url { .url {
color: #007eff; color: #007eff;
text-decoration: underline; text-decoration: underline;

@ -193,6 +193,7 @@ export default {
return { return {
projectId: this.$route.query.projectId, projectId: this.$route.query.projectId,
founder: this.$route.query.founder, founder: this.$route.query.founder,
fromAss: this.$route.query.ass, //
systemList: [], systemList: [],
mallIds: [], mallIds: [],
curs: [], curs: [],
@ -400,7 +401,6 @@ export default {
this.setSystemId(this.projectManage.systemId); this.setSystemId(this.projectManage.systemId);
}).catch(() => { }).catch(() => {
this.projectManage.systemId = this.lastSystemId; this.projectManage.systemId = this.lastSystemId;
// console.log(this.lastSystemId, "this.lastSystemId");
}); });
} }
}, },
@ -759,8 +759,7 @@ export default {
} }
}, },
backPage () { backPage () {
const { params } = this.$store.state.project this.fromAss ? this.$router.back() : this.$router.push(this.$store.state.achievement.referrer || '/project')
this.$router.push(`/project?${qs.stringify(params.form)}&page=${params.page}`)
}, },
} }
}; };

@ -1,10 +1,7 @@
<template> <template>
<div> <div>
<el-card v-if="showBack" <el-card v-if="fromAss" shadow="hover" class="m-b-20">
shadow="hover" <el-page-header content="实验项目管理" @back="goBack"></el-page-header>
class="m-b-20">
<el-page-header content="实验项目管理"
@back="goBack"></el-page-header>
</el-card> </el-card>
<div class="page"> <div class="page">
<h6 class="p-title">筛选</h6> <h6 class="p-title">筛选</h6>
@ -12,196 +9,114 @@
<ul class="filter"> <ul class="filter">
<li> <li>
<label>创建人</label> <label>创建人</label>
<el-select v-model="form.founder" <el-select v-model="form.founder" placeholder="请选择创建人" @change="founderChange">
placeholder="请选择创建人" <el-option v-for="(item, index) in founderList" :key="index" :label="item.label"
@change="founderChange">
<el-option v-for="(item,index) in founderList"
:key="index"
:label="item.label"
:value="item.value"></el-option> :value="item.value"></el-option>
</el-select> </el-select>
</li> </li>
<li> <li>
<label>状态</label> <label>状态</label>
<el-select v-model="form.state" <el-select v-model="form.state" clearable placeholder="请选择状态" @change="initData">
clearable <el-option v-for="(item, index) in stateList" :key="index" :label="item.label"
placeholder="请选择状态"
@change="initData">
<el-option v-for="(item,index) in stateList"
:key="index"
:label="item.label"
:value="item.value"></el-option> :value="item.value"></el-option>
</el-select> </el-select>
</li> </li>
<li> <li>
<label>用途</label> <label>用途</label>
<el-select v-model="form.permissions" <el-select v-model="form.permissions" placeholder="请选择" @change="initData">
placeholder="请选择" <el-option v-for="item in permissionsList" :key="item.value" :label="item.label"
@change="initData">
<el-option v-for="item in permissionsList"
:key="item.value"
:label="item.label"
:value="item.value"></el-option> :value="item.value"></el-option>
</el-select> </el-select>
</li> </li>
<li> <li>
<label>课程</label> <label>课程</label>
<el-cascader v-model="cid" <el-cascader v-model="cid" :options="curs" :props="{ checkStrictly: true, value: 'id' }"
:options="curs" popper-class="course-cas" @expand-change="curChange" @change="curChange"></el-cascader>
:props="{ checkStrictly: true, value: 'id' }"
popper-class="course-cas"
@expand-change="curChange"
@change="curChange"></el-cascader>
</li> </li>
<li> <li>
<el-input placeholder="请输入项目名称" <el-input placeholder="请输入项目名称" prefix-icon="el-icon-search" v-model="form.projectName"
prefix-icon="el-icon-search"
v-model="form.projectName"
clearable></el-input> clearable></el-input>
</li> </li>
</ul> </ul>
<div> <div>
<el-button v-auth <el-button v-auth type="info" @click="add">新增项目</el-button>
type="info" <el-button v-auth type="primary" @click="delAllData">批量删除</el-button>
@click="add">新增项目</el-button>
<el-button v-auth
type="primary"
@click="delAllData">批量删除</el-button>
</div> </div>
</div> </div>
<el-table :data="listData" <el-table :data="listData" class="table" ref="table" stripe header-align="center"
class="table"
ref="table"
stripe
header-align="center"
@selection-change="handleSelectionChange"> @selection-change="handleSelectionChange">
<el-table-column type="selection" <el-table-column type="selection" width="55" align="center" :selectable="disabledSelection"></el-table-column>
width="55" <el-table-column type="index" width="100" label="序号" align="center">
align="center"
:selectable="disabledSelection"></el-table-column>
<el-table-column type="index"
width="100"
label="序号"
align="center">
<template slot-scope="scope">{{ scope.$index + (page - 1) * pageSize + 1 }}</template> <template slot-scope="scope">{{ scope.$index + (page - 1) * pageSize + 1 }}</template>
</el-table-column> </el-table-column>
<el-table-column prop="projectName" <el-table-column prop="projectName" label="实验项目名称" min-width="400" align="center"
label="实验项目名称"
min-width="400"
align="center"
show-overflow-tooltip></el-table-column> show-overflow-tooltip></el-table-column>
<el-table-column prop="founder" <el-table-column prop="founder" label="创建人" min-width="150" align="center">
label="创建人"
min-width="150"
align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ founderKeys[scope.row.founder] }} {{ founderKeys[scope.row.founder] }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="用途" <el-table-column label="用途" min-width="120" align="center">
min-width="120"
align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ permissionsKeys[scope.row.permissions] }} {{ permissionsKeys[scope.row.permissions] }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="createTime" <el-table-column prop="createTime" label="创建时间" min-width="150" align="center"></el-table-column>
label="创建时间" <el-table-column prop="status" label="状态" min-width="100" align="center">
min-width="150"
align="center"></el-table-column>
<el-table-column prop="status"
label="状态"
min-width="100"
align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ stateKeys[scope.row.state] }} {{ stateKeys[scope.row.state] }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="实验提示" <el-table-column label="实验提示" width="120" align="center">
width="120"
align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<template v-if="scope.row.state"> <template v-if="scope.row.state">
<!-- 老师 --> <!-- 老师 -->
<el-switch v-if="scope.row.founder" <el-switch v-if="scope.row.founder" v-model="scope.row.hintOpen"
v-model="scope.row.hintOpen" :active-text="scope.row.hintOpen ? '关闭' : '启用'" :active-value="0" :inactive-value="1"
:active-text="scope.row.hintOpen ? '关闭' : '启用'" style="margin: 0 10px 0 10px" @change="switchOffTips(scope.row, scope.row.hintOpen)"></el-switch>
:active-value="0"
:inactive-value="1"
style="margin: 0 10px 0 10px"
@change="switchOffTips(scope.row, scope.row.hintOpen)"></el-switch>
<!-- 系统 --> <!-- 系统 -->
<el-switch v-else <el-switch v-else v-model="scope.row.hintOpenBySchool"
v-model="scope.row.hintOpenBySchool" :active-text="scope.row.hintOpenBySchool ? '关闭' : '启用'" :active-value="0" :inactive-value="1"
:active-text="scope.row.hintOpenBySchool ? '关闭' : '启用'"
:active-value="0"
:inactive-value="1"
style="margin: 0 10px 0 10px" style="margin: 0 10px 0 10px"
@change="switchOffTips(scope.row, scope.row.hintOpenBySchool)"></el-switch> @change="switchOffTips(scope.row, scope.row.hintOpenBySchool)"></el-switch>
</template> </template>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" <el-table-column label="操作" width="300" align="center">
width="300"
align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" <el-button type="text" @click="edit(scope.row, 1)">查看</el-button>
@click="edit(scope.row, 1)">查看</el-button> <el-button
<el-button v-if="scope.row.founder && (roleName.includes('超级') || roleName === scope.row.roleName || (roleName === '管理员' && !scope.row.roleName.includes('超级')))" v-if="scope.row.founder && (roleName.includes('超级') || roleName === scope.row.roleName || (roleName === '管理员' && !scope.row.roleName.includes('超级')))"
type="text" type="text" @click="edit(scope.row)">编辑</el-button>
@click="edit(scope.row)">编辑</el-button> <el-button
<el-button v-if="scope.row.founder && (roleName.includes('超级') || roleName === scope.row.roleName || (roleName === '管理员' && !scope.row.roleName.includes('超级')))" v-if="scope.row.founder && (roleName.includes('超级') || roleName === scope.row.roleName || (roleName === '管理员' && !scope.row.roleName.includes('超级')))"
type="text" type="text" @click="handleDelete(scope.row.projectId)">删除</el-button>
@click="handleDelete(scope.row.projectId)">删除</el-button> <el-button v-auth type="text" @click="copyData(scope.row.projectId)">复制</el-button>
<el-button v-auth <el-switch v-auth="'禁用'" v-if="scope.row.state" v-model="scope.row.ccupationlabOpen"
type="text" :active-text="scope.row.ccupationlabOpen ? '关闭' : '启用'" :active-value="0" :inactive-value="1"
@click="copyData(scope.row.projectId)">复制</el-button> style="margin: 0 10px 0 10px" @change="switchOff(scope.row)"></el-switch>
<el-switch v-auth="'禁用'"
v-if="scope.row.state"
v-model="scope.row.ccupationlabOpen"
:active-text="scope.row.ccupationlabOpen ? '关闭' : '启用'"
:active-value="0"
:inactive-value="1"
style="margin: 0 10px 0 10px"
@change="switchOff(scope.row)"></el-switch>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="pagination"> <div class="pagination">
<el-pagination background <el-pagination background @current-change="handleCurrentChange" :current-page="page"
@current-change="handleCurrentChange" layout="total, prev, pager, next" :total="total"></el-pagination>
:current-page="page"
layout="total, prev, pager, next"
:total="total"></el-pagination>
</div> </div>
<el-dialog title="复制" <el-dialog title="复制" :visible.sync="copyVisible" width="24%" center :close-on-click-modal="false">
:visible.sync="copyVisible"
width="24%"
center
:close-on-click-modal="false">
<el-form label-width="70px"> <el-form label-width="70px">
<el-form-item label="项目名称"> <el-form-item label="项目名称">
<el-input placeholder="请输入项目名称" <el-input placeholder="请输入项目名称" v-model="copyForm.projectName"></el-input>
v-model="copyForm.projectName"></el-input>
</el-form-item> </el-form-item>
<el-form-item v-if="!curRow.projectManage.founder" <el-form-item v-if="!curRow.projectManage.founder" label="课程">
label="课程"> <el-cascader v-model="copyMallId" :options="copyCurs" :props="{ checkStrictly: true, value: 'id' }"
<el-cascader v-model="copyMallId" popper-class="course-cas" @expand-change="copySystemChange" @change="copySystemChange"></el-cascader>
:options="copyCurs"
:props="{ checkStrictly: true, value: 'id' }"
popper-class="course-cas"
@expand-change="copySystemChange"
@change="copySystemChange"></el-cascader>
</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="copyVisible = false"> </el-button> <el-button @click="copyVisible = false"> </el-button>
<el-button type="primary" <el-button type="primary" :loading="submiting" @click="copySubmit"> </el-button>
:loading="submiting"
@click="copySubmit"> </el-button>
</span> </span>
</el-dialog> </el-dialog>
</div> </div>
@ -209,12 +124,13 @@
</template> </template>
<script> <script>
import { mapState, mapActions, mapMutations } from "vuex"; import { mapState } from "vuex";
import util from "@/libs/util"; import util from "@/libs/util";
import qs from 'qs'
export default { export default {
data () { data () {
return { return {
showBack: Boolean(this.$route.query.show), fromAss: Boolean(this.$route.query.show), //
lc: [11, 12, 19], lc: [11, 12, 19],
cid: [this.$route.query.mallId ? +this.$route.query.mallId : '', this.$route.query.cid ? +this.$route.query.cid : ''], cid: [this.$route.query.mallId ? +this.$route.query.mallId : '', this.$route.query.cid ? +this.$route.query.cid : ''],
curs: [], curs: [],
@ -308,10 +224,6 @@ export default {
...mapState("user", [ ...mapState("user", [
"userId", "roleId", 'roleName' "userId", "roleId", 'roleName'
]), ]),
...mapState("project", [
"lastSystemId",
"assFields",
])
}, },
watch: { watch: {
'form.projectName': function (val) { 'form.projectName': function (val) {
@ -331,11 +243,7 @@ export default {
this.getSystemData() this.getSystemData()
}, },
methods: { methods: {
...mapActions("project", [
"setSystemId"
]),
getData () { getData () {
this.setSystemId(this.form.systemId);
let data = { let data = {
...this.form, ...this.form,
pageNum: this.page, pageNum: this.page,
@ -398,20 +306,15 @@ export default {
}, },
// //
setCache () { setCache () {
this.$store.commit('project/setParams', { this.$store.commit('achievement/setReferrer', `${this.$route.path}?${qs.stringify(this.form)}&page=${this.page}`)
form: this.form,
page: this.page,
})
}, },
add () { // add () { //
this.setCache() this.setCache()
this.setSystemId(this.form.systemId); this.$router.push(`/project/add?founder=${this.form.founder}${this.fromAss ? '&ass=1' : ''}`);
this.$router.push(`/project/add?founder=${this.form.founder}`);
}, },
edit (row, show) { // edit (row, show) { //
this.setCache() this.setCache()
this.setSystemId(row.systemId); this.$router.push(`/project/add?projectId=${row.projectId}&founder=${this.form.founder}${show ? `&show=1` : ''}${this.fromAss ? '&ass=1' : ''}`);
this.$router.push(`/project/add?projectId=${row.projectId}&founder=${this.form.founder}${show ? `&show=1` : ''}`);
}, },
handleSelectionChange (val) { // handleSelectionChange (val) { //
this.multipleSelection = val; this.multipleSelection = val;
@ -544,5 +447,4 @@ export default {
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped></style>
</style>

@ -1,10 +1,7 @@
<template> <template>
<div class="wrap"> <div class="wrap">
<!-- 全屏 --> <!-- 全屏 -->
<img class="full" <img class="full" src="@/assets/img/screen/full.png" alt="" @click="fullScreen">
src="@/assets/img/screen/full.png"
alt=""
@click="fullScreen">
<!--header--> <!--header-->
<div class="header"> <div class="header">
<div class="bg_header"> <div class="bg_header">
@ -37,18 +34,15 @@
<i class="b_r_line"></i> <i class="b_r_line"></i>
</div> </div>
<div class="main_title"> <div class="main_title">
<img src="@/assets/img/screen/t_1.png" <img src="@/assets/img/screen/t_1.png" alt="">
alt="">
平台考试数据统计 平台考试数据统计
</div> </div>
<ul class="time-switch"> <ul class="time-switch">
<li v-for="(item, i) in times" <li v-for="(item, i) in times" :key="i" :class="{ active: item.id === time }" @click="switchTime(item.id)">
:key="i" {{
:class="{active: item.id === time}" item.name }}</li>
@click="switchTime(item.id)">{{ item.name }}</li>
</ul> </ul>
<div id="chart1" <div id="chart1" class="chart"></div>
class="chart"></div>
</div> </div>
<div class="item"> <div class="item">
<div class="t_line_box"> <div class="t_line_box">
@ -68,12 +62,10 @@
<i class="b_r_line"></i> <i class="b_r_line"></i>
</div> </div>
<div class="main_title"> <div class="main_title">
<img src="@/assets/img/screen/t_2.png" <img src="@/assets/img/screen/t_2.png" alt="">
alt="">
学生成绩分布分析 学生成绩分布分析
</div> </div>
<div id="chart2" <div id="chart2" class="chart t_btn9"></div>
class="chart t_btn9"></div>
</div> </div>
<div class="item"> <div class="item">
<div class="t_line_box"> <div class="t_line_box">
@ -93,12 +85,10 @@
<i class="b_r_line"></i> <i class="b_r_line"></i>
</div> </div>
<div class="main_title"> <div class="main_title">
<img src="@/assets/img/screen/t_7.png" <img src="@/assets/img/screen/t_7.png" alt="">
alt="">
月人均在线学习时长情况 月人均在线学习时长情况
</div> </div>
<div id="chart3" <div id="chart3" class="chart t_btn9"></div>
class="chart t_btn9"></div>
</div> </div>
<div class="item"> <div class="item">
<div class="t_line_box"> <div class="t_line_box">
@ -118,17 +108,14 @@
<i class="b_r_line"></i> <i class="b_r_line"></i>
</div> </div>
<div class="main_title"> <div class="main_title">
<img src="@/assets/img/screen/t_7.png" <img src="@/assets/img/screen/t_7.png" alt="">
alt="">
平台登录人数 平台登录人数
</div> </div>
<div id="chart4" <div id="chart4" class="chart t_btn9"></div>
class="chart t_btn9"></div>
</div> </div>
</div> </div>
<div class="middle"> <div class="middle">
<div class="item" <div class="item" style="height: 620px">
style="height: 620px">
<!--左上边框--> <!--左上边框-->
<div class="t_line_box"> <div class="t_line_box">
<i class="t_l_line"></i> <i class="t_l_line"></i>
@ -149,15 +136,8 @@
<i class="r_b_line"></i> <i class="r_b_line"></i>
<i class="b_r_line"></i> <i class="b_r_line"></i>
</div> </div>
<video class="video" <video class="video" ref="video" width="100%" height="100%" autoplay muted loop>
ref="video" <source src="@/assets/videos/screen.mp4" type="video/mp4">
width="100%"
height="100%"
autoplay
muted
loop>
<source src="@/assets/videos/screen.mp4"
type="video/mp4">
您的浏览器不支持 video 标签 您的浏览器不支持 video 标签
</video> </video>
<div class="stat-mask"></div> <div class="stat-mask"></div>
@ -173,8 +153,7 @@
<p class="name">当前活跃人数</p> <p class="name">当前活跃人数</p>
</div> </div>
</div> </div>
<div class="item" <div class="item" style="height: 440px;">
style="height: 440px;">
<!--左上边框--> <!--左上边框-->
<div class="t_line_box"> <div class="t_line_box">
<i class="t_l_line"></i> <i class="t_l_line"></i>
@ -196,18 +175,14 @@
<i class="b_r_line"></i> <i class="b_r_line"></i>
</div> </div>
<div class="main_title"> <div class="main_title">
<img src="@/assets/img/screen/t_3.png" <img src="@/assets/img/screen/t_3.png" alt="">
alt="">
学生实验课程考核成绩趋势图 学生实验课程考核成绩趋势图
</div> </div>
<div class="chart" <div class="chart" id="chart5" style="height: 420px"></div>
id="chart5"
style="height: 420px"></div>
</div> </div>
</div> </div>
<div class="right"> <div class="right">
<div class="item" <div class="item" style="height: 160px">
style="height: 160px">
<!--左上边框--> <!--左上边框-->
<div class="t_line_box"> <div class="t_line_box">
<i class="t_l_line"></i> <i class="t_l_line"></i>
@ -229,23 +204,18 @@
<i class="b_r_line"></i> <i class="b_r_line"></i>
</div> </div>
<div class="main_title"> <div class="main_title">
<img src="@/assets/img/screen/t_4.png" <img src="@/assets/img/screen/t_4.png" alt="">
alt="">
本月综合学习积极性最高的实验课程 本月综合学习积极性最高的实验课程
</div> </div>
<ul class="list"> <ul class="list">
<li v-for="(item, i) in courses" <li v-for="(item, i) in courses" :key="i">
:key="i">
<span class="index">{{ i + 1 }}</span> <span class="index">{{ i + 1 }}</span>
<p class="text">{{ item.goodsName }}</p> <p class="text">{{ item.goodsName }}</p>
<img class="icon" <img class="icon" src="@/assets/img/screen/medal.png" alt="">
src="@/assets/img/screen/medal.png"
alt="">
</li> </li>
</ul> </ul>
</div> </div>
<div class="item" <div class="item" style="height: 240px">
style="height: 240px">
<!--左上边框--> <!--左上边框-->
<div class="t_line_box"> <div class="t_line_box">
<i class="t_l_line"></i> <i class="t_l_line"></i>
@ -267,23 +237,20 @@
<i class="b_r_line"></i> <i class="b_r_line"></i>
</div> </div>
<div class="main_title"> <div class="main_title">
<img src="@/assets/img/screen/t_5.png" <img src="@/assets/img/screen/t_5.png" alt="">
alt="">
热门理论课程排行榜 热门理论课程排行榜
</div> </div>
<div class="popular-wrap" <div class="popular-wrap" ref="popularCourses">
ref="popularCourses">
<ul class="list popular"> <ul class="list popular">
<li v-for="(item, i) in popularCourses" <li v-for="(item, i) in popularCourses" :key="i">
:key="i">
<span class="index">{{ i + 1 }}</span> <span class="index">{{ i + 1 }}</span>
<p class="text">{{ item }}</p> <p class="text">{{ item.courseName }}</p>
<span class="num">{{ item.viewCount }}</span>
</li> </li>
</ul> </ul>
</div> </div>
</div> </div>
<div class="item" <div class="item" style="height: 300px">
style="height: 300px">
<div class="t_line_box"> <div class="t_line_box">
<i class="t_l_line"></i> <i class="t_l_line"></i>
<i class="l_t_line"></i> <i class="l_t_line"></i>
@ -301,8 +268,7 @@
<i class="b_r_line"></i> <i class="b_r_line"></i>
</div> </div>
<div class="main_title"> <div class="main_title">
<img src="@/assets/img/screen/t_7.png" <img src="@/assets/img/screen/t_7.png" alt="">
alt="">
学霸排行榜 学霸排行榜
</div> </div>
<div class="main_table"> <div class="main_table">
@ -318,13 +284,10 @@
</thead> </thead>
</table> </table>
</div> </div>
<div class="main_table" <div class="main_table" ref="ach" style="max-height: 222px;margin-top: 0;overflow: hidden">
ref="ach"
style="max-height: 222px;margin-top: 0;overflow: hidden">
<table> <table>
<tbody> <tbody>
<tr v-for="(item, i) in achs" <tr v-for="(item, i) in achs" :key="i">
:key="i">
<td width="20%">{{ i + 1 }}</td> <td width="20%">{{ i + 1 }}</td>
<td width="20%">{{ item.userName }}</td> <td width="20%">{{ item.userName }}</td>
<td width="20%">{{ token ? item.className : item.schoolName }}</td> <td width="20%">{{ token ? item.className : item.schoolName }}</td>
@ -335,8 +298,7 @@
</table> </table>
</div> </div>
</div> </div>
<div class="item" <div class="item" style="height: 300px">
style="height: 300px">
<div class="t_line_box"> <div class="t_line_box">
<i class="t_l_line"></i> <i class="t_l_line"></i>
<i class="l_t_line"></i> <i class="l_t_line"></i>
@ -354,8 +316,7 @@
<i class="b_r_line"></i> <i class="b_r_line"></i>
</div> </div>
<div class="main_title"> <div class="main_title">
<img src="@/assets/img/screen/t_7.png" <img src="@/assets/img/screen/t_7.png" alt="">
alt="">
活跃度排行榜 活跃度排行榜
</div> </div>
<div class="main_table"> <div class="main_table">
@ -369,13 +330,10 @@
</thead> </thead>
</table> </table>
</div> </div>
<div class="main_table" <div class="main_table" ref="active" style="max-height: 230px;margin-top: 0;overflow: hidden">
ref="active"
style="max-height: 230px;margin-top: 0;overflow: hidden">
<table> <table>
<tbody> <tbody>
<tr v-for="(item, i) in actives" <tr v-for="(item, i) in actives" :key="i">
:key="i">
<td width="20%">{{ i + 1 }}</td> <td width="20%">{{ i + 1 }}</td>
<td width="20%">{{ token ? item.className : item.schoolName }}</td> <td width="20%">{{ token ? item.className : item.schoolName }}</td>
<td width="20%">{{ item.activityIndex }}</td> <td width="20%">{{ item.activityIndex }}</td>
@ -462,8 +420,8 @@ export default {
}).catch(res => { }) }).catch(res => { })
// //
this.$post(this.api.courseRankings).then(({ data }) => { this.$post(this.api.courseRankings).then(({ list }) => {
this.popularCourses = data this.popularCourses = list
}).catch(res => { }) }).catch(res => { })
// //
@ -769,9 +727,9 @@ export default {
color2: 'rgba(150, 20, 144, 0.4)' color2: 'rgba(150, 20, 144, 0.4)'
}, },
] ]
1
const cousrseRes = await this.$post(this.api.websiteProductList, {
const cousrseRes = await this.$post(this.api.productsWithExperimentalResults, {
pageNum: 1, pageNum: 1,
pageSize: 1000, pageSize: 1000,
sort: 0, sort: 0,
@ -780,7 +738,7 @@ export default {
purchaseStatus: this.token ? 1 : '' purchaseStatus: this.token ? 1 : ''
}) })
if (cousrseRes) { if (cousrseRes) {
const courseList = cousrseRes.page.records const courseList = cousrseRes.list
const ids = courseList.map(e => e.mallId) const ids = courseList.map(e => e.mallId)
times.map(e => { times.map(e => {
e.mallId = ids e.mallId = ids
@ -1137,15 +1095,16 @@ export default {
const dom = this.$refs.popularCourses const dom = this.$refs.popularCourses
const dom1 = this.$refs.ach const dom1 = this.$refs.ach
const dom2 = this.$refs.active const dom2 = this.$refs.active
const unit = window.innerWidth > 1920 ? 2 : 1
setInterval(() => { setInterval(() => {
dom.scrollTop += 1 dom.scrollTop += unit
if (dom.clientHeight + dom.scrollTop === dom.scrollHeight) dom.scrollTop = 0 if (dom.clientHeight + dom.scrollTop >= dom.scrollHeight) dom.scrollTop = 0
dom1.scrollTop += 1 dom1.scrollTop += unit
if (dom1.clientHeight + dom1.scrollTop === dom1.scrollHeight) dom1.scrollTop = 0 if (dom1.clientHeight + dom1.scrollTop >= dom1.scrollHeight) dom1.scrollTop = 0
dom2.scrollTop += 1 dom2.scrollTop += unit
if (dom2.clientHeight + dom2.scrollTop === dom2.scrollHeight) dom2.scrollTop = 0 if (dom2.clientHeight + dom2.scrollTop >= dom2.scrollHeight) dom2.scrollTop = 0
}, 30) }, 30)
} }
} }

@ -858,6 +858,7 @@ export default {
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)
// 8pythoncookiesystemId // 8pythoncookiesystemId
location.href = process.env.NODE_ENV === 'development' ? location.href = process.env.NODE_ENV === 'development' ?
`http://${location.hostname}:8085/#/` : `http://${location.hostname}:8085/#/` :

@ -1,5 +1,5 @@
import axios from "axios"; import axios from "axios";
import util from "@/libs/util"; import Util from "@/libs/util";
import router from "@/router/index"; import router from "@/router/index";
import Setting from "@/setting"; import Setting from "@/setting";
import store from '@/store' import store from '@/store'
@ -13,11 +13,11 @@ service.defaults.headers.post["Content-Type"] = "application/json;charset=UTF-8"
// 请求拦截器 // 请求拦截器
service.interceptors.request.use(config => { service.interceptors.request.use(config => {
let token = util.local.get(Setting.tokenKey); let token = Util.local.get(Setting.tokenKey);
if (token) config.headers.token = token; if (token) config.headers.token = token;
return config; return config;
}, err => { }, err => {
util.errorMsg({ Util.errorMsg({
message: "退出登陆", message: "退出登陆",
onClose: function () { onClose: function () {
store.dispatch('user/logout') store.dispatch('user/logout')
@ -33,10 +33,22 @@ service.interceptors.response.use(
const res = response.data; const res = response.data;
if (res.status == 200 || res.status == 10000 || res.status == 30001) { if (res.status == 200 || res.status == 10000 || res.status == 30001) {
return Promise.resolve(res).catch(e => { }); return Promise.resolve(res).catch(e => { });
} else if (res.code === 401) {
// 账号互踢
if (!logouted) {
Util.local.remove(Setting.storeKey)
Util.local.remove(Setting.tokenKey)
Util.errorMsg(res.msg.includes('顶') ? '您的账号已在其他设备登录,您已被迫下线!' : '登录过期,请重新登录!')
setTimeout(() => {
store.dispatch('user/logout')
logouted = 0
}, 2000)
logouted = 1
}
} else if (!res.status) { } else if (!res.status) {
return Promise.resolve(res).catch(e => { }); return Promise.resolve(res).catch(e => { });
} else { } else {
util.errorMsg(res.message); Util.errorMsg(res.message);
return Promise.reject(res) return Promise.reject(res)
// return Promise.resolve(res).catch(e => {}); // return Promise.resolve(res).catch(e => {});
} }
@ -50,9 +62,9 @@ service.interceptors.response.use(
// 在登录成功后返回当前页面,这一步需要在登录页操作。 // 在登录成功后返回当前页面,这一步需要在登录页操作。
case 401: case 401:
if (!logouted) { if (!logouted) {
util.local.remove(Setting.storeKey); Util.local.remove(Setting.storeKey);
util.local.remove(Setting.tokenKey); Util.local.remove(Setting.tokenKey);
util.errorMsg("登录过期,请重新登录"); Util.errorMsg("登录过期,请重新登录");
setTimeout(() => { setTimeout(() => {
store.dispatch('user/logout') store.dispatch('user/logout')
}, 1000); }, 1000);
@ -60,30 +72,15 @@ service.interceptors.response.use(
} }
break; break;
case 500: case 500:
util.errorMsg("网络错误"); Util.errorMsg("网络错误");
break;
// 403 token过期
// 登录过期对用户进行提示
// 清除本地token和清空vuex中token对象
// 跳转登录页面
case 403:
util.local.remove(Setting.storeKey);
util.local.remove(Setting.tokenKey);
util.errorMsg("登录过期,请重新登录");
// 清除token
// store.commit('loginSuccess', null);
// 跳转登录页面,并将要浏览的页面fullPath传过去,登录成功后跳转需要访问的页面
setTimeout(() => {
store.dispatch('user/logout')
}, 1000);
break; break;
// 404请求不存在 // 404请求不存在
case 404: case 404:
util.errorMsg("网络请求不存在!"); Util.errorMsg("网络请求不存在!");
break; break;
// 其他错误,直接抛出错误提示 // 其他错误,直接抛出错误提示
default: default:
util.errorMsg(error.response.data.message); Util.errorMsg(error.response.data.message);
Promise.reject(res); Promise.reject(res);
} }
return Promise.reject(error.response); return Promise.reject(error.response);

@ -32,6 +32,7 @@ if (isPro) {
host = 'https://www.occupationlab.com/' // 正式服 host = 'https://www.occupationlab.com/' // 正式服
// host = "http://192.168.31.51:9000/"; // host = "http://192.168.31.51:9000/";
host = localStorage.getItem('localIp') == 1 ? 'http://192.168.31.51:9000/' : 'http://192.168.31.217:9000/' host = localStorage.getItem('localIp') == 1 ? 'http://192.168.31.51:9000/' : 'http://192.168.31.217:9000/'
// host = 'http://192.168.31.51:9000/'
} else if (isSq) { } else if (isSq) {
zcPath = `10.20.100.204:8883` zcPath = `10.20.100.204:8883`
} }

@ -8,7 +8,8 @@ export default {
lastSystemId: "", lastSystemId: "",
projectFields: {}, projectFields: {},
assFields: {}, assFields: {},
queryDataStatus: null queryDataStatus: null,
referrer: '',
}, },
mutations: { mutations: {
setParams: (state, val) => { setParams: (state, val) => {
@ -23,15 +24,18 @@ export default {
SET_ASS: (state, assFields) => { SET_ASS: (state, assFields) => {
state.assFields = assFields; state.assFields = assFields;
}, },
setReferrer: (state, val) => {
state.referrer = val
},
}, },
actions: { actions: {
setSystemId({ state, commit }, systemId) { setSystemId ({ state, commit }, systemId) {
commit("SET_SYSTEM_ID", systemId); commit("SET_SYSTEM_ID", systemId);
}, },
setProject({ state, commit }, projectFields) { setProject ({ state, commit }, projectFields) {
commit("SET_PROJECT", projectFields); commit("SET_PROJECT", projectFields);
}, },
setAss({ state, commit }, assFields) { setAss ({ state, commit }, assFields) {
commit("SET_ASS", assFields); commit("SET_ASS", assFields);
} }
} }

@ -381,6 +381,13 @@ $height: 250px;
background-color: #072951; background-color: #072951;
box-shadow:-10px 0px 15px #2C58A6 inset, 10px 0px 15px #2C58A6 inset; box-shadow:-10px 0px 15px #2C58A6 inset, 10px 0px 15px #2C58A6 inset;
} }
.num {
position: absolute;
top: 10px;
right: 10%;
font-size: 12px;
color: #fff;
}
} }
.index { .index {
position: absolute; position: absolute;

Loading…
Cancel
Save