diff --git a/src/layouts/header/index.vue b/src/layouts/header/index.vue
index e2a0c61..6200152 100644
--- a/src/layouts/header/index.vue
+++ b/src/layouts/header/index.vue
@@ -153,7 +153,7 @@ export default {
},
initSocket ({ id, account }) {
// 实例化socket
- this.socket = new WebSocket(`wss://${Setting.isDev ? '192.168.31.51' : location.host}/nakadai/websocket/${id}/${account}`)
+ this.socket = new WebSocket(`${Setting.isTest ? 'ws' : 'wss'}://${Setting.isDev ? '192.168.31.51' : location.host}/nakadai/websocket/${id}/${account}`)
// this.socket = new WebSocket(`ws://121.37.12.51:9100/nakadai/websocket/${id}/${account}`)
// 监听socket连接
this.socket.onopen = this.open;
diff --git a/src/pages/achievement/show/index.vue b/src/pages/achievement/show/index.vue
index 9bbb27e..fc76b60 100644
--- a/src/pages/achievement/show/index.vue
+++ b/src/pages/achievement/show/index.vue
@@ -55,8 +55,8 @@
- {{ infoData.workNumber }}
+ v-model="infoData.className">
+ {{ infoData.className }}
@@ -146,8 +146,7 @@
v-html="scope.row.referenceAnswer">
-
@@ -166,7 +165,8 @@
style='white-space: pre-wrap'>
-
diff --git a/src/pages/assessment/list/index.vue b/src/pages/assessment/list/index.vue
index af5b7b5..e3b014a 100644
--- a/src/pages/assessment/list/index.vue
+++ b/src/pages/assessment/list/index.vue
@@ -50,16 +50,12 @@
-
-
-
-
+
@@ -272,12 +268,15 @@ export default {
curriculumId: "",
keyWord: "", // 搜索框筛选条件
searchTimer: null,
+ mallIds: [],
+ curs: [],
form: {
type: "",
status: "",
startTime: "",
endTime: "",
- month: ""
+ month: "",
+
},
pageNum: +this.$route.query.page || 1, // 当前页数
pageSize: 10, // 每页10条
@@ -326,8 +325,7 @@ export default {
clearInterval(this.ticker);
this.ticker = null;
});
- this.getData(1);
- this.getschoolCourse();
+ this.getCourse();
},
methods: {
pickerInput () {
@@ -368,12 +366,16 @@ export default {
},
getData (counddown) {
this.listLoading = true;
+ const { mallIds } = this
+ const cur = this.curs.find(e => e.mallId == mallIds[0])
let data = {
...this.form,
keyWord: this.keyWord,
pageNum: this.pageNum,
pageSize: this.pageSize,
- curriculumId: this.curriculumId
+ cid: cur.cid,
+ mallId: mallIds[0],
+ systemId: mallIds[1]
};
this.$post(this.api.pageByCondition, data).then(res => {
this.listData = res.list;
@@ -409,16 +411,37 @@ export default {
},
initData () {
this.$refs.table.clearSelection();
- this.pageNum = 1;
+ this.pageNum = 1
this.getData();
},
- getschoolCourse () { // 获取课程下拉框数据
- this.$get(this.api.schoolCourse).then(res => {
- this.curriculumList = res.data;
- }).catch(err => {
- console.log(err);
- });
+
+ // 获取课程
+ async getCourse () {
+ const { data } = await this.$get(this.api.getSystemIdBySchool)
+ const res = await this.$get(this.api.getSchoolEffectiveCourse)
+ if (res.data.length) {
+ res.data.map(e => {
+ e.id = e.mallId
+ e.label = e.curriculumName
+ e.children = data.filter(n => e.systemId.split(',').includes(n.id + '')) // 筛选出该课程下的系统
+ })
+ this.curs = res.data
+ this.mallIds = [res.data[0].mallId, data[0].id]
+ this.pageNum = 1
+ this.getData(1)
+ console.log("🚀 ~ file: index.vue:431 ~ getSystemData ~ res.data:", this.mallIds)
+ }
},
+ // 课程选择回调
+ curChange (val) {
+ const id = val[0]
+ if (val.length === 1) {
+ // 如果选择的是课程,则默认选中下面第一个系统
+ this.mallIds = [id, this.curs.find(e => e.id == id).children[0].id]
+ }
+ this.initData()
+ },
+
add () {
this.$router.push("add");
},
diff --git a/src/pages/project/add/index.vue b/src/pages/project/add/index.vue
index 60e5864..60e8ca7 100644
--- a/src/pages/project/add/index.vue
+++ b/src/pages/project/add/index.vue
@@ -23,7 +23,7 @@
-
+
+ label="课程">
+ style="top: 0;width:100%;height: 48px;">
+ style="top: 53px;width:100%;height: 30px;">
+
{
- if (row.fileType == "pptx") {
- this.isPPT = true;
- this.isWord = false;
- this.isExcel = false;
- } else if (row.fileType == "doc" || row.fileType == "docx") {
- this.isPPT = false;
- this.isWord = true;
- this.isExcel = false;
- } else if (row.fileType == "xls" || row.fileType == "xlsx") {
- this.isExcel = true;
- this.isPPT = false;
- this.isWord = false;
- } else {
- this.isPPT = false;
- this.isWord = false;
- this.isExcel = false;
- }
+ if (row.fileType == "pptx") this.isPPT = true
+ if (row.fileType == "doc" || row.fileType == "docx") this.isWord = true
+ if (row.fileType == "xls" || row.fileType == "xlsx") this.isExcel = true
if (this.isPPT) {
this.showMask = true;
} else {
@@ -869,16 +857,16 @@ export default {
}
},
closePlayer () {
- this.playAuth = "";
+ this.playAuth = ''
this.player.pause();
},
closeIframe () {
- this.iframeSrc = "";
+ this.iframeSrc = ''
this.showMask = false;
this.showMask1 = false;
},
closePdf () {
- this.pdfSrc = "";
+ this.pdfSrc = ''
this.currentPage = 1;
},
changePdfPage (val) {