dev_202412
yujialong 1 month ago
parent 7350d37739
commit 4fe500de03
  1. 2
      src/layouts/home/index.vue
  2. 2
      src/layouts/sidebar/index.vue
  3. 1
      src/pages/achievement/show/index.vue
  4. 162
      src/pages/assessment/add/index.vue
  5. 8
      src/pages/lesson/content/index.vue
  6. 2
      src/pages/lesson/content/source.vue
  7. 6
      src/pages/lesson/detail/index.vue
  8. 2
      src/pages/station/preview/index.vue

@ -215,7 +215,7 @@ export default {
// height: calc(100vh - 213px);
padding: 24px;
margin-bottom: 20px;
transition: all 0.3s ease-in-out;
// transition: all 0.3s ease-in-out;
overflow: auto;
}
}

@ -102,7 +102,7 @@ export default {
width: 160px;
height: calc(100vh - 173px);
overflow: auto;
transition: .5s;
// transition: .5s;
transform: translateX(-200px);
&.show {

@ -201,6 +201,7 @@ export default {
},
//
handleList (list) {
console.log("🚀 ~ handleList ~ list:", list)
this.isLc = list.find(e => e.lcRuleRecords) // lcRuleRecords
if (this.isLc) {
list.map(e => {

@ -52,20 +52,21 @@
<el-card shadow="hover" class="mgr20 m-b-20">
<div>
<p class="m-b-20">课程</p>
<div class="inline-input">
<el-select v-model="form.mallId" @change="initData">
<el-option v-for="item in curriculumList" :key="item.mallId" :label="item.curriculumName"
:value="item.mallId">
<el-radio-group v-model="courseTab" @change="courseChange">
<el-radio v-for="(item, i) in courseTypes" :key="i" :label="item.id">{{ item.name
}}</el-radio>
</el-radio-group>
<div class="inline-input m-t-10">
<el-select v-if="courseTab" v-model="form.curriculumId" @change="initData">
<el-option v-for="(item, i) in curriculumList" :key="i" :label="item.curriculumName" :value="item.cid">
</el-option>
</el-select>
<el-select v-else v-model="form.curriculumId" @change="initData">
<el-option v-for="(item, i) in myCurs" :key="i" :label="item.curriculumName" :value="item.cid">
</el-option>
</el-select>
<!-- <el-select v-model="form.curriculumId" @change="initData">
<el-option
v-for="item in systemList"
:key="item.id"
:label="item.label"
:value="item.id">
</el-option>
</el-select> -->
</div>
</div>
</el-card>
@ -180,20 +181,31 @@ export default {
2: "竞赛"
},
isDetail: Boolean(this.$route.query.show),
courseTab: 1,
courseTypes: [
{
id: 1,
name: '校本课程'
},
{
id: 0,
name: '我的课程'
},
],
form: {
id: this.$route.query.id ? this.$route.query.id : "",
experimentalName: "",
id: this.$route.query.id ? this.$route.query.id : '',
experimentalName: '',
type: 1, // (1 2)
experimentDuration: "0d0h0m",
curriculumId: "",
curriculumId: '',
mallId: '',
projectId: '',
paperId: '',
isSpecify: 1, // (1 0)
isEnableCode: 0, //
invitationCode: "",
invitationCode: '',
status: 0, // (0 1 2)
classId: "",
classId: '',
stuInfo: []
},
date: "", //
@ -206,6 +218,7 @@ export default {
stopTime: "0000-00-00 00:00:00", //
expNameRepeat: false, //
curriculumList: [], //
myCurs: [],
filterClassName: "", //
tagList: [], //
defaultCheckedKeys: [], //
@ -254,9 +267,8 @@ export default {
},
mounted () {
this.date = [Util.formatDate("yyyy-MM-dd hh:mm:ss", new Date(new Date().getTime() + 300000)), Util.formatDate("yyyy-MM-dd hh:mm:ss", new Date(new Date().getTime() + 300000))];
this.form.id && this.getData();
this.recoveryData();
this.getschoolCourse();
this.form.id ? this.getData() : this.getMallCourse()
this.recoveryData()
},
watch: {
// ,
@ -294,6 +306,19 @@ export default {
...mapActions("project", [
"setAss"
]),
async getData () { //
const { data } = await this.$get(`${this.api.getDetailById}?id=${this.form.id}`)
data.uuid = data.projectId || data.paperId
this.form = data
if (!data.mallId) {
this.courseTab = 0
this.getMyCourse()
}
this.startTime = data.startTime
this.stopTime = data.stopTime
this.formatDuration()
this.getMallCourse()
},
handleCloseTag (tag) { //
this.allCheckedNodes = this.$refs.tree.getCheckedNodes().concat(this.$refs.tree.getHalfCheckedNodes());
let tagIndex = this.tagList.findIndex(i => i.id === tag.id);
@ -367,30 +392,43 @@ export default {
return resolve([]);
}
},
getschoolCourse () { //
this.$get(this.api.getSchoolEffectiveCourse).then(({ data }) => {
this.curriculumList = data;
if (this.curriculumList.length) {
if (!this.form.mallId) this.form.mallId = data[0].mallId
this.getProjectData()
}
async getMallCourse (fromChange) { //
const { data } = await this.$get(this.api.getSchoolEffectiveCourse)
this.curriculumList = data
if (this.curriculumList.length) {
if (!this.form.curriculumId || fromChange) this.form.curriculumId = data[0].cid
this.getProjectData()
}
if (!fromChange) {
this.$nextTick(() => {
this.updateTime = 0
})
}).catch(err => { });
}
},
//
async getMyCourse (fromChange) {
const res = await this.$get(this.api.getchoolBuiltCoursesList)
const data = res.schoolCourse
this.myCurs = data
if (fromChange) this.form.curriculumId = data[0].cid
this.getProjectData()
},
//
courseChange (val) {
val ? this.getMallCourse(1) : this.getMyCourse(1)
},
getProjectData () {
const curItem = this.curriculumList.find(e => e.mallId === this.form.mallId)
let data = {
const cur = this.courseTab ? this.curriculumList.find(e => e.cid === this.form.curriculumId) : {}
this.$post(this.api.getProjectOrExamPaperByAssessment, {
pageNum: this.page,
pageSize: this.pageSize,
cid: curItem.cid,
cid: this.form.curriculumId,
projectName: this.keyword,
systemId: curItem ? curItem.systemId : 1,
systemId: cur ? cur.systemId : '',
permissions: 1,
mallId: this.form.mallId
}
this.$post(this.api.getProjectOrExamPaperByAssessment, data).then(({ data }) => {
mallId: cur ? cur.mallId : ''
}).then(({ data }) => {
const list = data.records
list.forEach(e => {
e.uuid = e.projectId || e.paperId //
@ -420,9 +458,9 @@ export default {
let day = hour * 24;
this.form.experimentDuration = `${Math.floor(timestamp / day)}d${Math.floor(timestamp % day / hour)}h${Math.floor(timestamp % day % hour / minute)}m`;
}
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) {
if (form.type == 1 && this.form.experimentDuration == "0d0h0m") return Util.warningMsg("请填写考核时长");
if (form.type == 2 && this.startTime == "0000-00-00 00:00:00") return Util.warningMsg("请填写考核时间");
if (form.type == 1) {
const { day, hour, minute } = this.duration
if (String(day).includes('.')) return Util.warningMsg('考核天数请填写整数')
if (day < 0) return Util.warningMsg('考核天数请勿填写负数')
@ -434,31 +472,37 @@ export default {
if (!form.uuid) return Util.warningMsg("请选择考核项目");
const item = this.projectData.find(e => form.uuid === e.projectId || form.uuid === e.paperId)
if (item) form[item.projectId ? 'projectId' : 'paperId'] = form.uuid
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位纯数字邀请码");
if (form.isSpecify == 0 && this.form.isEnableCode == 1) {
if (!form.invitationCode) return Util.warningMsg("请设置邀请码")
if (!form.invitationCode || String(this.form.invitationCode).length < 6 || isNaN(this.form.invitationCode)) return Util.warningMsg("请输入6位纯数字邀请码")
}
this.form.startTime = this.form.type == 2 ? this.startTime : ''
this.form.stopTime = this.form.type == 2 ? this.stopTime : ''
let classId = [];
let stuInfo = [];
form.startTime = form.type == 2 ? this.startTime : ''
form.stopTime = form.type == 2 ? this.stopTime : ''
let classId = []
let stuInfo = []
this.allCheckedNodes.forEach(i => {
if (i.level === 3) {
classId.push(i.id);
classId.push(i.id)
} else if (i.level === 4) {
stuInfo.push({ classId: i.parentId, stuAccountId: i.id });
stuInfo.push({ classId: i.parentId, stuAccountId: i.id })
}
});
})
if (this.isSpecify == 1 && !stuInfo.length) {
Util.warningMsg("请选择学生");
return;
Util.warningMsg("请选择学生")
return
} else {
this.form.classId = classId.toString()
this.form.stuInfo = stuInfo
}
if (this.courseTab) {
const cur = this.curriculumList.find(e => e.cid === this.form.curriculumId)
form.mallId = cur.mallId
} else {
this.form.classId = classId.toString();
this.form.stuInfo = stuInfo;
form.mallId = ''
}
const curItem = this.curriculumList.find(e => e.mallId === this.form.mallId)
this.form.curriculumId = curItem.cid
this.submiting = true
if (this.form.id) {
this.$post(this.api.modifyAssessment, this.form).then(async res => {
@ -478,16 +522,6 @@ export default {
});
}
},
getData () { //
this.$get(`${this.api.getDetailById}?id=${this.form.id}`).then(({ data }) => {
this.form = data;
this.startTime = data.startTime
this.stopTime = data.stopTime
this.formatDuration();
this.getschoolCourse();
}).catch(err => {
});
},
formatDuration () { //
let duration = this.form.experimentDuration.replace(/\D+/g, ",").split(",");
this.duration = {

@ -400,7 +400,7 @@ export default {
message: "上传出错,请重试!",
type: "error",
center: true
});
})
},
beforeRemove (file, fileList) {
if ((file.size / 1024 / 1024) < 10) {
@ -408,7 +408,7 @@ export default {
}
},
handleRemove () {
Oss.del(this.fileUrl)
// Oss.del(this.fileUrl)
this.fileUrl = ''
},
transferType (ext) {
@ -775,8 +775,8 @@ export default {
type: "warning"
}).then(() => {
this.$del(`${this.api.deleteSubsectionCurriculm}/${row.id}`).then(res => {
row.fileUrl && Oss.del(row.fileUrl)
this.$message.success("删除成功")
// row.fileUrl && Oss.del(row.fileUrl)
this.$message.success('删除成功')
this.getData()
}).catch(res => { })
}).catch(() => { })

@ -174,7 +174,6 @@ export default {
methods: {
//
init () {
this.getCourse()
this.checked = []
this.curType = '全部'
this.sourceType = [
@ -187,6 +186,7 @@ export default {
this.sourceType.forEach(e => {
e.check = false
})
this.getCourse()
},
//
async getCourse () {

@ -209,7 +209,7 @@
</div>
<div v-if="step !== 4" class="btns">
<el-button v-if="step === 2 || step === 3" type="primary" @click="prev">上一步</el-button>
<el-button v-if="step < 3" type="primary" @click="save(1)">下一步</el-button>
<el-button v-if="step < 3" type="primary" @click="save(1)">保存并下一步</el-button>
<el-button type="primary" @click="save()">保存</el-button>
<el-button @click="back">返回</el-button>
</div>
@ -837,7 +837,7 @@ export default {
cid: this.cid,
systemIdByAssessment: list
})
this.step = 4
this.back()
} finally {
this.submiting = false
load.close()
@ -847,7 +847,7 @@ export default {
},
//
toStep (i) {
this.step = i
if (!this.isAdd || (this.cid && i < this.step)) this.step = i
},
//
back () {

@ -324,6 +324,7 @@ import quill from "@/components/quill";
import pdfDia from '@/components/pdf'
import Editor from '@tinymce/tinymce-vue'
import editorConfig from '@/components/editor'
import Cookies from 'js-cookie'
export default {
components: { pdf, pdfDia, quill, Editor },
data () {
@ -963,6 +964,7 @@ export default {
window.open(`http://${Setting.zcPath}?systemId=${systemId}&courseId=${this.courseId}&projectId=${this.curProject}&token=${token}&userId=${this.userId}&classId=1&mallId=${this.mallId}${Setting.isTest ? '&beta=1' : ''}`);
} else if (systemId == 19) {
//
Cookies.set('sand-projectId', this.curProject)
location.href = `${Setting.sandPath}/#/?curriculumName=${this.curriculumName}&token=${token}&cid=${this.courseId}&mallId=${this.mallId}&systemId=${this.systemIds}&projectId=${this.curProject}&assessmentId=&classId=&stopTime=&manager=1&referrer=${encodeURIComponent(location.href)}`
} else {
// python

Loading…
Cancel
Save