dev_2022-05-11
yujialong 3 years ago
parent 209660f910
commit 6210b29513
  1. 2
      src/api/index.js
  2. BIN
      src/assets/img/bug.png
  3. BIN
      src/assets/img/func.png
  4. BIN
      src/assets/img/log-bg.png
  5. BIN
      src/assets/img/log-bg1.png
  6. BIN
      src/assets/img/optimize.png
  7. 174
      src/layouts/home/index.vue
  8. 5
      src/pages/achievement/teach/index.vue
  9. 53
      src/pages/assessment/add/index.vue
  10. 1
      src/pages/station/preview/index.vue
  11. 16
      src/pages/student/list/index.vue
  12. 2
      src/pages/system/list/role.vue
  13. 2
      src/pages/system/list/staff.vue
  14. 4
      src/setting.js
  15. 8
      src/store/modules/user.js

@ -12,6 +12,8 @@ export default {
getUserAllRoleByToken : `users/role/getUserAllRoleByToken`,
getSchoolIdByToken : `users/users/data/user/getSchoolIdByToken`,
platformLogList: `nakadai/log/platformLogList`,
logNotification: `nakadai/log/logNotification`,
//实验台
curriculumDetail: `nakadai/nakadai/curriculum/curriculumDetail`, // 课程详情
curriculumChapter: `nakadai/curriculum/chapter/queryChaptersAndSubsections`, // 根据课程id查询章节小节,树状结构

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

@ -10,6 +10,31 @@
<el-backtop target=".content"></el-backtop>
</div>
<v-footer ref="footer"></v-footer>
<div class="log-mask" v-if="logVisible"></div>
<div class="log-dia" v-if="logVisible">
<img class="bg1" src="@/assets/img/log-bg.png" alt="">
<img class="bg2" src="@/assets/img/log-bg1.png" alt="">
<p class="log-title">更新日志</p>
<div class="log-wrap">
<div class="logs">
<div class="item" v-for="(item, i) in list" :key="i" v-show="!i || (i && logAll)">
<h6>{{ item.versionName }}</h6>
<img v-if="item.coverUrl" :src="item.coverUrl" alt="" class="cover">
<ul class="detail">
<li v-for="(item, i) in item.logContents" :key="i">
<p class="name"><img :src="require('@/assets/img/' + funcList.find(e => e.id === item.type).icon + '.png')" alt=""> {{ funcList.find(e => e.id === item.type).name }}</p>
<div class="val">
<p v-for="(item, i) in item.content" :key="i">{{ i + 1 }}{{ item }}</p>
</div>
</li>
</ul>
</div>
</div>
<div class="more-wrap">
<el-button class="know" type="primary" size="small" @click="logVisible = false">知道了</el-button>
</div>
</div>
</div>
</div>
</div>
</template>
@ -18,26 +43,79 @@
import vHead from "../header";
import navbar from "../navbar";
import vFooter from "../footer";
import { mapState, mapActions } from "vuex";
import { mapState, mapMutations, mapActions } from "vuex";
import util from "@/libs/util";
import Setting from "@/setting";
export default {
data() {
return {};
return {
logVisible: false,
list: [],
logAll: false,
funcList: [
{
id: 0,
name: '新功能',
icon: 'func'
},
{
id: 1,
name: '修复',
icon: 'bug'
},
{
id: 2,
name: '优化',
icon: 'optimize'
}
]
};
},
components: {
vHead,
navbar,
vFooter
},
computed: {
...mapState("user", [
'logView'
])
},
mounted() {
this.autoLogout();
this.logView || this.getLogStatus() // logViewfalse
},
methods: {
...mapMutations("user", [
'SET_LOG'
]),
...mapActions("user", [
"logout"
]),
//
getLog() {
this.$get(`${this.api.platformLogList}?platformId=${Setting.platformId}&port=1&versionName=`).then(({ logList }) => {
logList.map((e, i) => {
e.logContents.map(n => {
n.content = n.content.split('\n')
})
})
this.list = logList
}).catch(res => {})
},
//
getLogStatus() {
util.local.get(Setting.tokenKey) && this.$get(this.api.logNotification, {
platformId: Setting.platformId
}).then(({ notification }) => {
this.SET_LOG() // true
if (notification) {
this.logVisible = true // true
this.getLog()
}
}).catch(res => {})
},
// ,退
autoLogout() {
let lastTime = new Date().getTime();
@ -63,5 +141,97 @@ export default {
min-height: calc(100vh - 176px);
padding: 24px 24px;
}
}.log-mask {
position: fixed;
top: 0;
left: 0;
bottom: 0;
right: 0;
background-color: rgba(0, 0, 0, .4);
}
/deep/.log-dia {
z-index: 11;
position: absolute;
top: 250px;
left: 50%;
width: 550px;
transform: translateX(-50%);
background-color: #fff;
border-radius: 6px;
.bg1 {
width: 100%;
height: 140px;
}
.bg2 {
position: absolute;
top: -130px;
left: 48px;
max-width: 100%;
height: 250px;
}
.log-title {
position: absolute;
top: 65px;
left: 0;
width: 100%;
text-align: center;
font-size: 22px;
color: #fff;
font-weight: 600;
}
.log-wrap {
padding-bottom: 30px;
}
.logs {
max-height: 250px;
padding: 0 100px;
margin: 30px 0;
overflow: auto;
}
h6 {
margin-bottom: 15px;
font-size: 16px;
color: #333;
line-height: 1;
}
.more-wrap {
padding: 0 60px;
font-size: 14px;
color: #333;
text-align: center;
}
.know {
margin-top: 15px;
}
.cover {
max-width: 250px;
max-height: 160px;
margin: 10px 0 20px;
}
.detail {
li {
margin-bottom: 20px;
}
.name {
display: flex;
align-items: center;
margin-bottom: 5px;
font-size: 14px;
img {
width: 20px;
margin-right: 8px;
}
}
.val {
font-size: 15px;
line-height: 1.8;
white-space: pre-wrap;
p {
position: relative;
font-size: 13px;
color: #727272;
}
}
}
}
</style>

@ -148,7 +148,7 @@ export default {
this.$post(`${this.api.getAssessmentDetail}?pageNum=${this.page}&pageSize=10000&assessmentId=${this.id}&classId=${this.classId}&keyword=${this.keyword}`).then(res => {
this.listDataAll = res.page.records
this.total = res.page.total
this.avgScore = res.avgScore
this.avgScore = (+res.avgScore).toFixed(2)
this.peopleNum = res.peopleNum
this.handlePage()
this.getChart()
@ -158,8 +158,7 @@ export default {
this.$post(`${this.api.getPracticeDetail}?pageNum=${this.page}&pageSize=10000&projectId=${this.id}&keyword=${this.keyword}`).then(res => {
this.listDataAll = res.page.records
this.total = res.page.total
let avgScore = +res.avgScore
this.avgScore = avgScore.toFixed(2)
this.avgScore = (+res.avgScore).toFixed(2)
this.peopleNum = res.peopleNum
this.handlePage()
this.getChart()

@ -5,7 +5,7 @@
<div class="flex-between">
<el-page-header @back="goBack" :content="isDetail ? '查看' : (form.id ? '更新' : '创建') + '教学实验'"></el-page-header>
<div>
<el-button type="primary" @click="upload" v-show="!isDetail">{{ form.id ? "更新" : "创建" }}</el-button>
<el-button type="primary" @click="submit" v-show="!isDetail">{{ form.id ? "更新" : "创建" }}</el-button>
</div>
</div>
</el-card>
@ -39,11 +39,11 @@
<!-- 手动发布显示 -->
<div class="date-inputs" v-if="form.type==1">
实验时长
<el-input type="number" v-model.trim="duration.day" placeholder></el-input>
<el-input type="number" min="0" v-model.trim="duration.day" placeholder></el-input>
<el-input type="number" v-model.trim="duration.hour" placeholder></el-input>
<el-input type="number" min="0" v-model.trim="duration.hour" placeholder></el-input>
小时
<el-input type="number" v-model.trim="duration.minute" placeholder></el-input>
<el-input type="number" min="0" v-model.trim="duration.minute" placeholder></el-input>
</div>
<!-- 定时发布显示 -->
@ -255,7 +255,8 @@ export default {
total: 0,
isToProject: false,
systemList: [],
submiting: false //
submiting: false, //
updateTime: 0
};
},
computed: {
@ -273,6 +274,13 @@ export default {
if (!this.isToProject) this.setAss({});
},
watch: {
// ,
form: {
handler(val){
this.updateTime++
},
deep:true
},
date: function(val) {
if (val[0] != "0000-00-00 00:00:00") {
this.startTime = util.formatDate("yyyy-MM-dd hh:mm:ss", new Date(val[0]));
@ -420,7 +428,7 @@ export default {
this.page = 1;
this.getProjectData();
},
upload() { //
submit() { //
if (this.submiting) return false
if (!this.form.experimentalName) return util.warningMsg("请填写考核名称");
if (this.expNameRepeat) return util.warningMsg("考核名称重复,请重新输入");
@ -435,17 +443,19 @@ export default {
if (this.form.type == 1 && this.form.experimentDuration == "0d0h0m") return util.warningMsg("请填写实验时长");
if (this.form.type == 2 && this.startTime == "0000-00-00 00:00:00") return util.warningMsg("请填写实验时间");
if (this.form.type == 1) {
const duration = this.duration
if (String(duration.day).includes('.')) return util.warningMsg('实验天数请填写整数')
if (String(duration.hour).includes('.')) return util.warningMsg('实验小时请填写整数')
if (String(duration.minute).includes('.')) return util.warningMsg('实验分钟请填写整数')
const { day, hour, minute } = this.duration
if (String(day).includes('.')) return util.warningMsg('实验天数请填写整数')
if (day < 0) return util.warningMsg('实验天数请勿填写负数')
if (String(hour).includes('.')) return util.warningMsg('实验小时请填写整数')
if (hour < 0) return util.warningMsg('实验小时请勿填写负数')
if (String(minute).includes('.')) return util.warningMsg('实验分钟请填写整数')
if (minute < 0) return util.warningMsg('实验分钟请勿填写负数')
}
if (!this.form.projectId) return util.warningMsg("请选择实训项目");
if (this.form.isSpecify == 0 && this.form.isEnableCode == 1) {
if (!this.form.invitationCode) return util.warningMsg("请设置邀请码");
if (!this.form.invitationCode || String(this.form.invitationCode).length < 6 || isNaN(this.form.invitationCode)) return util.warningMsg("请输入6位纯数字邀请码");
}
debugger
if (this.form.type == 2) {
this.form.startTime = this.startTime;
this.form.stopTime = this.stopTime;
@ -549,13 +559,24 @@ export default {
this.page = val;
this.getProjectData();
},
//
backPage() {
this.$router.back()
},
goBack() {
if (this.isDetail) {
this.$router.back();
const { id } = this.form
const updateTime = this.updateTime
//
if (updateTime > 1) {
this.$confirm(`编辑的内容未保存,是否保存?`, '提示', {
type: 'warning'
}).then(() => {
this.submit()
}).catch(() => {
this.backPage()
})
} else {
this.$confirm("确定返回?未更新的信息将不会保存。", "提示", { type: "warning" }).then(() => {
this.$router.back();
});
this.backPage()
}
}
}

@ -326,7 +326,6 @@ $height: 700px;
.video_wid,.cover{
position: relative;
width: 76%;
max-width: 1400px;
height: $height !important;
border: 0;
}

@ -1,6 +1,6 @@
<template>
<div class="flex">
<div class="page" style="width: 17%">
<div class="page" style="width: 320px">
<div class="m-b-20">
<h6 class="p-title">学生</h6>
<el-radio-group v-model="studentType" @change="changeStudentType">
@ -34,7 +34,7 @@
:props="{children: 'children', label: 'organizationName', isLeaf: 'leaf'}"
>
<span class="custom-tree-node" slot-scope="{ node, data }">
<span style="display: inline-block; margin-right: 20px">{{ node.label }}</span>
<span class="name" :title="node.label">{{ node.label }}</span>
<span>
<el-button
v-if="auth('学生组织架构编辑')"
@ -1001,5 +1001,15 @@ export default {
</script>
<style lang="scss" scoped>
.custom-tree-node {
display: inline-flex;
align-items: center;
}
.name {
display: inline-block;
max-width: 160px;
margin-right: 20px;
overflow: hidden;
text-overflow: ellipsis;
}
</style>

@ -108,7 +108,7 @@ export default {
},
methods: {
getData() {
this.$get(`${this.api.roleList}?page=${this.page}&size=${this.pageSize}&name=${util.encodeStr(this.keyword)}&platformId=1`).then(res => {
this.$get(`${this.api.roleList}?page=${this.page}&size=${this.pageSize}&name=${util.encodeStr(this.keyword)}&platformId=1&port=0`).then(res => {
this.listData = res.rolePage.records;
this.total = res.rolePage.total;
}).catch(res => {});

@ -254,7 +254,7 @@ export default {
},
getRoleData() { //
this.roleList =[];
this.$get(`${this.api.roleList}?page=1&size=100&name=&platformId=1`).then(res => {
this.$get(`${this.api.roleList}?page=1&size=100&name=&platformId=1&port=0`).then(res => {
for(var i=0;i<res.rolePage.records.length;i++){
if (res.rolePage.records[i].roleName == '超级管理员'){

@ -32,8 +32,8 @@ if (isHh) {
} else if (isDev) {
jumpPath = "http://192.168.31.125:8087/";
bankPath = `http://192.168.31.125:8093`
// host = "http://39.108.250.202:9000/"; // 中台测试服
host = "http://192.168.31.151:9000/"; // 榕
host = "http://39.108.250.202:9000/"; // 中台测试服
// host = "http://192.168.31.151:9000/"; // 榕
// host = 'http://192.168.31.137:9000/'; // 赓
}

@ -21,7 +21,8 @@ export default {
dataTime: "",
roleName: '',
schoolId: '',
fromClient: false // 是否从学生端登录
fromClient: false, // 是否从学生端登录
logView: false // 是否查询过日志状态,如果有,则不再调接口
},
mutations: {
SET_INFO: (state, info) => {
@ -57,7 +58,10 @@ export default {
},
SET_SCHOOLID: (state, schoolId) => {
state.schoolId = schoolId
}
},
SET_LOG: (state) => {
state.logView = true
},
},
actions: {
login({ state, commit }, userInfo) {

Loading…
Cancel
Save