dev_2022-05-11
yujialong 3 years ago
parent c19c41390d
commit 711829036a
  1. 4
      src/pages/account/login/index.vue
  2. 48
      src/pages/achievement/list/index.vue
  3. 21
      src/pages/achievement/teach/index.vue
  4. 21
      src/pages/achievement/vir/index.vue
  5. 2
      src/pages/assessment/add/index.vue
  6. 73
      src/pages/assessment/list/index.vue
  7. 35
      src/pages/course/courseManagement/contentSettings.vue
  8. 4
      src/pages/match/manage/matchSignup.vue

@ -79,12 +79,12 @@ export default {
isHh: Setting.isHh, isHh: Setting.isHh,
tabName: "1", tabName: "1",
param: { param: {
account: "admin", account: "zh",
password: "111aaa", password: "111aaa",
code: "", // code: "", //
random: "", // random: "", //
distinguish: null, // ,1,2 distinguish: null, // ,1,2
platform: 3 // 123 platform: 1 // 123
}, },
rules: { rules: {
account: [{ required: true, message: "请输入账号", trigger: "blur" }], account: [{ required: true, message: "请输入账号", trigger: "blur" }],

@ -18,7 +18,7 @@
</li> </li>
<li v-show="projectPermissions === 1"> <li v-show="projectPermissions === 1">
<label>班级</label> <label>班级</label>
<el-select size="small" v-model="classId" placeholder="请选择" @change="initData"> <el-select size="small" v-model="classId" @change="initData">
<el-option <el-option
v-for="item in classList" v-for="item in classList"
:key="item.id" :key="item.id"
@ -32,13 +32,13 @@
<div class="tool mul"> <div class="tool mul">
<ul class="filter"> <ul class="filter">
<li> <li>
<label>系统</label> <label>课程</label>
<el-select size="small" v-model="systemId" placeholder="请选择" @change="initData"> <el-select v-model="curriculumId" @change="initData">
<el-option <el-option
v-for="item in systemList" v-for="item in curriculumList"
:key="item.value" :key="item.cid"
:label="item.label" :label="item.curriculumName"
:value="item.id" :value="item.cid"
></el-option> ></el-option>
</el-select> </el-select>
</li> </li>
@ -98,8 +98,8 @@ export default {
return { return {
classId: "", classId: "",
classList: [], classList: [],
systemId: "", curriculumId: "",
systemList: Setting.systemList, curriculumList: [],
projectPermissions: this.$route.query.per ? Number(this.$route.query.per) : 0, projectPermissions: this.$route.query.per ? Number(this.$route.query.per) : 0,
keyword: "", keyword: "",
searchTimer: null, searchTimer: null,
@ -139,11 +139,6 @@ export default {
loadIns: null, loadIns: null,
}; };
}, },
computed: {
...mapState("project", [
"lastSystemId"
])
},
watch: { watch: {
month: function(val) { month: function(val) {
if (val) { if (val) {
@ -171,15 +166,21 @@ export default {
} }
}, },
mounted() { mounted() {
// systemIdsystemIdsystemId this.getschoolCourse();
this.systemId = this.lastSystemId ? this.lastSystemId : Setting.systemId;
this.getData();
this.getClassData(); this.getClassData();
}, },
methods: { methods: {
...mapActions("project", [ getschoolCourse() { //
"setSystemId" this.$get(this.api.schoolCourse).then(res => {
]), if (res.data && res.data.length) {
this.curriculumList = res.data;
this.curriculumId = this.curriculumList[0].cid;
this.getData();
}
}).catch(err => {
console.log(err);
});
},
getClassData() { // getClassData() { //
this.$post(this.api.myClass).then(res => { this.$post(this.api.myClass).then(res => {
this.classList = res.list; this.classList = res.list;
@ -192,7 +193,7 @@ export default {
let data = { let data = {
classId: this.classId, classId: this.classId,
permissions: this.projectPermissions, permissions: this.projectPermissions,
systemId: this.systemId, curriculumId: this.curriculumId,
keyWord: this.keyword, keyWord: this.keyword,
startTime: this.startingtime, startTime: this.startingtime,
endTime: this.endTime, endTime: this.endTime,
@ -221,14 +222,13 @@ export default {
return true; return true;
}, },
entry(row) { // entry(row) { //
this.setSystemId(this.systemId);
if (this.projectPermissions === 1) { if (this.projectPermissions === 1) {
let list = row.classList.map(i => { let list = row.classList.map(i => {
return {id: i.id.toString(), name: i.className} return {id: i.id.toString(), name: i.className}
}) })
this.$router.push(`teach?assessmentId=${row.assessmentId}&projectName=${row.projectName}&permissions=${row.permissions}&systemId=${this.systemId}&classList=${JSON.stringify(list)}`); this.$router.push(`teach?assessmentId=${row.assessmentId}&projectName=${row.projectName}&permissions=${row.permissions}&classList=${JSON.stringify(list)}`);
} else { } else {
this.$router.push(`vir?projectId=${row.projectId}&projectName=${row.projectName}&permissions=${row.permissions}&systemId=${this.systemId}`); this.$router.push(`vir?projectId=${row.projectId}&projectName=${row.projectName}&permissions=${row.permissions}`);
} }
}, },
handleDelete(row) { // handleDelete(row) { //

@ -63,7 +63,6 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" width="220"> <el-table-column label="操作" align="center" width="220">
<template slot-scope="scope"> <template slot-scope="scope">
<!-- <el-button type="text" @click="edit(scope.row)">修改分数</el-button> -->
<el-button type="text" @click="show(scope.row)">查看成绩报告</el-button> <el-button type="text" @click="show(scope.row)">查看成绩报告</el-button>
<el-button type="text" @click="handleDelete(scope.row)">删除</el-button> <el-button type="text" @click="handleDelete(scope.row)">删除</el-button>
</template> </template>
@ -88,7 +87,6 @@ export default {
activeName: "", // activeName: "", //
classId: "", // id classId: "", // id
classList: [], // classList: [], //
systemId: this.$route.query.systemId,
permissions: this.$route.query.permissions, permissions: this.$route.query.permissions,
experimentalName: this.$route.query.projectName, experimentalName: this.$route.query.projectName,
assessmentId: this.$route.query.assessmentId, assessmentId: this.$route.query.assessmentId,
@ -136,24 +134,11 @@ export default {
}).catch(err => { }).catch(err => {
}); });
}, },
edit(row) {
if (this.systemId == 2 || this.systemId == 3) {
this.$router.push(`addexperiment?id=${row.reportId}&stuId=${row.userId}&studentName=${row.studentName}&class=${row.class}`);
} else {
this.$router.push(`addexperiment?id=${row.reportId}`);
}
},
show(row) { // show(row) { //
if (this.systemId == 2) { if (this.permissions) {
this.$router.push(`showexperimentOption?id=${row.reportId}&stuId=${row.userId}&studentName=${row.studentName}&class=${row.class}`); this.$router.push(`show?id=${row.recordId}&projectId=${row.projectId}&reportId=${row.reportId}&studentId=${row.studentId}`);
} else if (this.systemId == 3) {
this.$router.push(`showexperimentOptions?id=${row.reportId}&stuId=${row.userId}&studentName=${row.studentName}&class=${row.class}`);
} else { } else {
if (this.permissions) { this.$router.push(`show?id=${row.recordId}&type=1`);
this.$router.push(`show?id=${row.recordId}&projectId=${row.projectId}&reportId=${row.reportId}&studentId=${row.studentId}`);
} else {
this.$router.push(`show?id=${row.recordId}&type=1`);
}
} }
}, },
exportData() { // () exportData() { // ()

@ -48,7 +48,6 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" width="220"> <el-table-column label="操作" align="center" width="220">
<template slot-scope="scope"> <template slot-scope="scope">
<!-- <el-button type="text" @click="edit(scope.row)">修改分数</el-button> -->
<el-button type="text" @click="show(scope.row)">查看成绩报告</el-button> <el-button type="text" @click="show(scope.row)">查看成绩报告</el-button>
<el-button type="text" @click="handleDelete(scope.row)">删除</el-button> <el-button type="text" @click="handleDelete(scope.row)">删除</el-button>
</template> </template>
@ -70,7 +69,6 @@ import echarts from "echarts";
export default { export default {
data() { data() {
return { return {
systemId: this.$route.query.systemId,
permissions: this.$route.query.permissions, permissions: this.$route.query.permissions,
experimentName: this.$route.query.projectName, experimentName: this.$route.query.projectName,
projectId: this.$route.query.projectId, projectId: this.$route.query.projectId,
@ -112,24 +110,11 @@ export default {
}).catch(res => { }).catch(res => {
}); });
}, },
edit(row) {
if (this.systemId == 2 || this.systemId == 3) {
this.$router.push(`addexperiment?id=${row.reportId}&stuId=${row.userId}&studentName=${row.studentName}&class=${row.class}`);
} else {
this.$router.push(`addexperiment?id=${row.reportId}`);
}
},
show(row) { show(row) {
if (this.systemId == 2) { if (this.permissions) {
this.$router.push(`showexperimentOption?id=${row.reportId}&stuId=${row.userId}&studentName=${row.studentName}&class=${row.class}`); this.$router.push(`show?id=${row.recordId}&projectId=${this.projectId}&reportId=${row.reportId}`);
} else if (this.systemId == 3) {
this.$router.push(`showexperimentOptions?id=${row.reportId}&stuId=${row.userId}&studentName=${row.studentName}&class=${row.class}`);
} else { } else {
if (this.permissions) { this.$router.push(`show?id=${row.recordId}&type=1`);
this.$router.push(`show?id=${row.recordId}&projectId=${this.projectId}&reportId=${row.reportId}`);
} else {
this.$router.push(`show?id=${row.recordId}&type=1`);
}
} }
}, },
exportData() { exportData() {

@ -68,7 +68,7 @@
<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.curriculumId" placeholder="请选择" @change="initData"> <el-select v-model="form.curriculumId" @change="initData">
<el-option <el-option
v-for="item in curriculumList" v-for="item in curriculumList"
:key="item.cid" :key="item.cid"

@ -23,14 +23,14 @@
</el-select> </el-select>
</li> </li>
<li> <li>
<label>系统</label> <label>课程</label>
<el-select size="small" v-model="systemId" placeholder="请选择" @change="initData"> <el-select size="small" v-model="curriculumId" placeholder="请选择" @change="initData">
<el-option label="不限" value=""></el-option> <el-option label="不限" value=""></el-option>
<el-option <el-option
v-for="item in systemList" v-for="item in curriculumList"
:key="item.value" key="item.cid"
:label="item.label" :label="item.curriculumName"
:value="item.id" :value="item.cid"
></el-option> ></el-option>
</el-select> </el-select>
</li> </li>
@ -85,7 +85,7 @@
</el-table-column> </el-table-column>
<el-table-column label="倒计时" align="center"> <el-table-column label="倒计时" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ changeTime(scope.row.countDown) }}</span> <span>{{ scope.row.countDown | timeFilter }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="实验状态" align="center"> <el-table-column label="实验状态" align="center">
@ -175,8 +175,8 @@ export default {
} }
], ],
date: [], date: [],
systemList: Setting.systemList, curriculumList: [],
systemId: "", curriculumId: "",
keyWord: "", // keyWord: "", //
searchTimer: null, searchTimer: null,
form: { form: {
@ -191,7 +191,7 @@ export default {
total: 0, // total: 0, //
listData: [], // listData: [], //
multipleSelection: [], // multipleSelection: [], //
ticker: null ticker: null //
}; };
}, },
watch: { watch: {
@ -221,12 +221,24 @@ export default {
} }
}, },
mounted() { mounted() {
//
this.$once("hook:beforeDestroy", function() {
clearInterval(this.ticker);
this.ticker = null;
});
this.getData(); this.getData();
this.beginTimer(); this.getschoolCourse();
}, },
created() { filters: {
if (this.ticker) { timeFilter(countDown) {
clearInterval(this.ticker); if (countDown > 0) {
let h = Math.floor(countDown / (60 * 60));
let m = Math.floor(countDown % (60 * 60) / 60);
let s = Math.floor(countDown % (60 * 60) % 60);
return `${h > 9 ? h : `0${h}`}:${m > 9 ? m : `0${m}`}:${s > 9 ? s : `0${s}`}`;
} else {
return "00:00:00";
}
} }
}, },
methods: { methods: {
@ -241,30 +253,19 @@ export default {
} }
}, 1000); }, 1000);
}, },
changeTime(countDown) {
let that = this;
if (countDown < 0) {
clearInterval(setInterval(this.changeTime(countDown), 1000));
}
let hh = that.fillNumber(countDown / (60 * 60));
let mm = that.fillNumber(countDown % (60 * 60) / 60);
let ss = that.fillNumber(countDown % (60 * 60) % 60);
return `${hh}:${mm}:${ss}`;
},
fillNumber(num) {
let number = Math.floor(num);
return number > 9 ? number : `0${number}`;
},
getData() { getData() {
if (this.ticker) {
clearInterval(this.ticker);
}
let data = { let data = {
...this.form, ...this.form,
keyWord: this.keyWord, keyWord: this.keyWord,
pageNum: this.pageNum, pageNum: this.pageNum,
pageSize: this.pageSize, pageSize: this.pageSize,
systemId: this.systemId curriculumId: this.curriculumId
}; };
this.$post(this.api.pageByCondition, data).then(res => { this.$post(this.api.pageByCondition, data).then(res => {
if (res.status === 200) { if (res.status === 200 && res.list && res.list.length) {
this.listData = res.list; this.listData = res.list;
this.total = res.total; this.total = res.total;
this.listData.forEach(i => { this.listData.forEach(i => {
@ -290,8 +291,7 @@ export default {
} }
} }
}); });
} else { this.beginTimer();
util.errorMsg(res.message);
} }
}).catch(err => { }).catch(err => {
console.log(err); console.log(err);
@ -302,6 +302,13 @@ export default {
this.pageNum = 1; this.pageNum = 1;
this.getData(); this.getData();
}, },
getschoolCourse() { //
this.$get(this.api.schoolCourse).then(res => {
this.curriculumList = res.data;
}).catch(err => {
console.log(err);
});
},
add() { add() {
this.$router.push("add"); this.$router.push("add");
}, },
@ -309,7 +316,7 @@ export default {
this.$router.push(`add?id=${row.id}`); this.$router.push(`add?id=${row.id}`);
}, },
show(row) { show(row) {
this.$router.push(`/achievement/ass?systemId=${this.systemId}&id=${row.id}&projectId=${row.projectId}&name=${row.projectName}&experimentalName=${row.experimentalName}&class=${row.experimentalClassName}`); this.$router.push(`/achievement/ass?curriculumId=${this.curriculumId}&id=${row.id}&projectId=${row.projectId}&name=${row.projectName}&experimentalName=${row.experimentalName}&class=${row.experimentalClassName}`);
}, },
start(row) { start(row) {
let data = { let data = {

@ -12,12 +12,12 @@
<div class="p-title">内容设置</div> <div class="p-title">内容设置</div>
<div class="btns" style="top: -10px"> <div class="btns" style="top: -10px">
<template v-if="!sorting"> <template v-if="!sorting">
<el-button type="primary" size="small" round v-throttle @click="addChapter">添加章节</el-button> <el-button type="primary" round v-throttle @click="addChapter">添加章节</el-button>
<el-button type="primary" size="small" round v-throttle @click="sort">编辑顺序</el-button> <el-button type="primary" round v-throttle @click="sort">编辑顺序</el-button>
</template> </template>
<template v-else> <template v-else>
<el-button type="primary" size="small" round v-throttle @click="cancelSort">取消</el-button> <el-button type="primary" round v-throttle @click="cancelSort">取消</el-button>
<el-button type="primary" size="small" round v-throttle @click="saveSort">保存</el-button> <el-button type="primary" round v-throttle @click="saveSort">保存</el-button>
</template> </template>
</div> </div>
</div> </div>
@ -28,9 +28,9 @@
<div>{{ chapter.name }}</div> <div>{{ chapter.name }}</div>
<div> <div>
<template v-if="!sorting"> <template v-if="!sorting">
<el-button class="action-btn" type="primary" size="small" round v-throttle @click="editChapter(chapter)">修改章节名称</el-button> <el-button class="action-btn" type="primary" round v-throttle @click="editChapter(chapter)">修改章节名称</el-button>
<el-button class="action-btn" type="primary" size="small" round v-throttle @click="addSection(chapter.id)">添加小节</el-button> <el-button class="action-btn" type="primary" round v-throttle @click="addSection(chapter.id)">添加小节</el-button>
<el-button class="action-btn" type="primary" size="small" round v-throttle @click="delChapter(chapter.id)">删除</el-button> <el-button class="action-btn" type="primary" round v-throttle @click="delChapter(chapter.id)">删除</el-button>
</template> </template>
<template v-else> <template v-else>
<i class="el-icon-top sort-icon" :class="{disabled: index == 0}" style="margin-right: 5px" @click="sortChapter(chapter,'up',index == 0,index)"></i> <i class="el-icon-top sort-icon" :class="{disabled: index == 0}" style="margin-right: 5px" @click="sortChapter(chapter,'up',index == 0,index)"></i>
@ -72,8 +72,8 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button size="small" @click="chapterVisible = false">取消</el-button> <el-button @click="chapterVisible = false">取消</el-button>
<el-button size="small" type="primary" @click="chapterSubmit">确定</el-button> <el-button type="primary" @click="chapterSubmit">确定</el-button>
</span> </span>
</el-dialog> </el-dialog>
@ -101,8 +101,8 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button size="small" @click="sectionVisible = false">取消</el-button> <el-button @click="sectionVisible = false">取消</el-button>
<el-button size="small" type="primary" @click="sectionSubmit">确定</el-button> <el-button type="primary" @click="sectionSubmit">确定</el-button>
</span> </span>
</el-dialog> </el-dialog>
@ -124,8 +124,8 @@
</el-upload> </el-upload>
</div> </div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button size="small" @click="switchVisible = false">取消</el-button> <el-button @click="switchVisible = false">取消</el-button>
<el-button size="small" type="primary" @click="switchSubmit">确定</el-button> <el-button type="primary" @click="switchSubmit">确定</el-button>
</span> </span>
</el-dialog> </el-dialog>
@ -136,8 +136,8 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button size="small" @click="sectionNameVisible = false">取消</el-button> <el-button @click="sectionNameVisible = false">取消</el-button>
<el-button size="small" type="primary" @click="sectionNameSubmit">确定</el-button> <el-button type="primary" @click="sectionNameSubmit">确定</el-button>
</span> </span>
</el-dialog> </el-dialog>
@ -459,9 +459,10 @@ export default {
this.sectionId = ""; this.sectionId = "";
}, },
preview(row) { preview(row) {
// console.log(JSON.stringify(row));
if (this.transferType(row.fileType) == "视频") { if (this.transferType(row.fileType) == "视频") {
this.$get(`${this.api.getPlayAuth}/${row.fileId}`).then(res => { this.$get(`${this.api.getPlayAuth}/${row.fileId}`).then(res => {
this.playAuth = res.data.playAuth; this.playAuth = res.playAuth;
if (this.player) { if (this.player) {
this.player.replayByVidAndPlayAuth(row.fileId, this.playAuth); this.player.replayByVidAndPlayAuth(row.fileId, this.playAuth);
} else { } else {
@ -503,7 +504,7 @@ export default {
this.isWord = false; this.isWord = false;
this.isExcel = false; this.isExcel = false;
} }
this.iframeSrc = res.data.previewUrl; this.iframeSrc = res.previewUrl;
this.$nextTick(() => { this.$nextTick(() => {
this.iframeOnload(); this.iframeOnload();
}); });

@ -85,8 +85,8 @@ export default {
}; };
if (this.keyword) data.name = this.keyword; if (this.keyword) data.name = this.keyword;
this.$get(`${this.api.queryApplicantByCondition}/${this.pageNo}/${this.pageSize}`, data).then(res => { this.$get(`${this.api.queryApplicantByCondition}/${this.pageNo}/${this.pageSize}`, data).then(res => {
this.listData = res.data.applicantList; this.listData = res.applicantList;
this.totals = res.data.total; this.totals = res.total;
this.$refs.table.clearSelection(); this.$refs.table.clearSelection();
}).catch(res => { }).catch(res => {
}); });

Loading…
Cancel
Save