Branch_d40a2540
yujialong 1 year ago
parent 108372bbd1
commit 039609418b
  1. 2
      src/components/editor.js
  2. 18
      src/pages/achievement/teach/index.vue
  3. 217
      src/pages/product/list/index.vue
  4. 16
      src/pages/station/preview/index.vue
  5. 2
      src/setting.js
  6. 9
      src/styles/page/station.scss

@ -374,7 +374,7 @@ export default {
editor.on('init', function(ed) {
// 设置默认字体
ed.target.editorCommands.execCommand("fontName", false, "Microsoft Yahei")
ed.target.editorCommands.execCommand("fontSize", false, "19px")
ed.target.editorCommands.execCommand("fontSize", false, "14px")
ed.target.editorCommands.execCommand("lineHeight", false, "1.5")
})
},

@ -106,8 +106,8 @@
{{ scope.$index + (page - 1) * pageSize + 1 }}
</template>
</el-table-column>
<el-table-column prop="schoolName"
label="学校"
<el-table-column prop="className"
label="班级"
min-width="150"
align="center">
</el-table-column>
@ -185,8 +185,8 @@
{{ scope.$index + (pageActivation - 1) * pageSizeActivation + 1 }}
</template>
</el-table-column>
<el-table-column prop="schoolName"
label="学校"
<el-table-column prop="className"
label="班级"
min-width="150"
align="center">
</el-table-column>
@ -398,20 +398,20 @@ export default {
},
//
exportReport () {
const list = this.multipleSelection.length ? this.multipleSelection : this.listData
//
const list = this.multipleSelection.length ? this.multipleSelection : this.listDataAll
list.forEach(async e => {
const { report, userScores } = await this.$get(`${this.api.reportDetail}?reportId=${e.reportId}`)
const list = userScores
list.map((e, i) => {
userScores.map((e, i) => {
if (e.answer && typeof e.answer === 'string') e.answer = e.answer.replace(/<[^>]+>/g, '').replace(/(&nbsp;|&amp;|%s)/g, '').replace(/>/g, '&gt;').replace(/</g, '&lt;')
})
for (const i in report) {
if (report[i] && typeof report[i] === 'string') report[i] = report[i].replace(/<[^>]+>/g, '')
}
report.purpose = report.purpose.replace(/<[^>]+>/g, '')
this.$post(this.api.exportBankExperimentReport, {
this.$post(this.api[userScores.find(e => e.lcRuleRecords) ? 'exportBankExperimentReport' : 'exportLabReport'], {
...report,
experimentalData: list
experimentalData: userScores
}).then(res => {
util.downloadFileDirect(`${e.userName}的实验报告.docx`, new Blob([res]))
}).catch(res => { })

@ -9,10 +9,13 @@
<img :src="item.banner"
alt=""
:style="{height: carouselHeight}">
<!-- <img src="https://huoran.oss-cn-shenzhen.aliyuncs.com/20230707/png/1677215781005844480.png"
<!-- <img src="https://huoran.oss-cn-shenzhen.aliyuncs.com/20230726/png/1684091617063493632.png"
alt=""
:style="{height: carouselHeight}"> -->
<p class="banner-name">{{ item.title }}</p>
<div class="texts">
<h6>{{ item.title }}</h6>
<p class="sub">{{ item.subheading }}</p>
</div>
</div>
</el-carousel-item>
</template>
@ -50,46 +53,20 @@
@click="catetoryClick('')">全部</dd>
<dd :class="{active: categoryId === 1}"
@click="catetoryClick(1)">不限</dd>
<el-dropdown class="category"
@command="id => categoryDropdown(id, 'categoryId')">
<span class="el-dropdown-link">
{{ categoryName }}<i class="el-icon-arrow-down el-icon--right"></i>
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item v-for="(item, i) in subjectList"
:key="i"
:command="item.disciplineId">{{ item.disciplineName }}</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
<el-dropdown class="category"
@command="id => categoryDropdown(id, 'professionalCategoryId')">
<span class="el-dropdown-link">
{{ professionalCategoryName }}<i class="el-icon-arrow-down el-icon--right"></i>
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item v-for="(item, i) in professionalClassList"
<div v-for="(item, i) in category"
:key="i"
:command="item.professionalClassId">{{ item.professionalClassName }}</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
<el-dropdown class="category"
@command="id => categoryDropdown(id, 'professionalId')">
<span class="el-dropdown-link">
{{ professionalName }}<i class="el-icon-arrow-down el-icon--right"></i>
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item v-for="(item, i) in professionalList"
:key="i"
:command="item.professionalId">{{ item.professionalName }}</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
<!-- <el-cascader style="width: 300px;padding: 0 15px"
v-model="category"
:props="props"
clearable
@change="initData"></el-cascader> -->
class="category-item">
<span v-if="!item.val.length"
class="name"
@click="nameClick(i)">{{ item.name }}</span>
<el-cascader :class="{active: item.disciplineId == categoryId}"
:ref="'category' + i"
v-model="item.val"
:options="item.list"
:props="{ checkStrictly: true }"
placeholder=""
@change="id => categoryChange(id, item)"></el-cascader>
</div>
</dl>
<dl v-if="curTab == 3">
<dt>产品标签</dt>
@ -244,7 +221,6 @@ export default {
category: [],
//
props: {
// multiple: true,
checkStrictly: true,
lazy: true,
lazyLoad (node, resolve) {
@ -252,11 +228,13 @@ export default {
//
if (!level) {
that.$get(that.api.courseDiscipline).then(({ list }) => {
list = list.slice(1).filter(e => e.level > 1)
list.map(e => {
e.value = e.disciplineId
e.label = e.disciplineName
e.children = []
})
that.category = [list[0].disciplineId]
resolve(list)
}).catch(err => { })
} else if (level === 1) {
@ -264,6 +242,7 @@ export default {
that.$get(that.api.courseProfessionalClass, {
disciplineId: value
}).then(({ list }) => {
list = list.filter(e => e.level > 1)
list.map(e => {
e.value = e.professionalClassId
e.label = e.professionalClassName
@ -276,6 +255,7 @@ export default {
that.$get(that.api.courseProfessional, {
professionalClassId: value
}).then(({ list }) => {
list = list.filter(e => e.level > 1)
list.map(e => {
e.value = e.professionalId
e.label = e.professionalName
@ -320,20 +300,7 @@ export default {
name: '热销排行'
},
],
list: [
{
coverUrl: 'https://huoran.oss-cn-shenzhen.aliyuncs.com/20230220/jpg/1627584816180912128.jpg',
courseName: '理论课程'
},
{
coverUrl: 'https://huoran.oss-cn-shenzhen.aliyuncs.com/20230220/jpg/1627584816180912128.jpg',
courseName: '理论课程'
},
{
coverUrl: 'https://huoran.oss-cn-shenzhen.aliyuncs.com/20230220/jpg/1627584816180912128.jpg',
courseName: '理论课程'
},
],
list: [],
keyword: '',
total: 0,
page: 1,
@ -356,7 +323,7 @@ export default {
this.getSubject()
this.getLabel()
this.getClass()
// this.initData()
this.initData()
},
methods: {
// banner
@ -408,38 +375,83 @@ export default {
}).catch(err => { })
},
//
getSubject () {
async getSubject () {
//
this.$get(this.api.courseDiscipline).then(({ list }) => {
this.subjectList = list.slice(1)
this.getProfessionalClassData(list[1].disciplineId)
}).catch(err => {
});
list = list.filter(e => e.level > 1).slice(1)
const result = []
const promises = []
list.map((e, i) => {
promises.push(new Promise((resolve, reject) => {
//
this.$get(this.api.courseProfessionalClass, {
disciplineId: e.disciplineId
}).then(({ list }) => {
list = list.filter(e => e.level > 1)
list.map(e => {
e.value = e.professionalClassId
e.label = e.professionalClassName
//
this.$get(this.api.courseProfessional, {
professionalClassId: e.value
}).then(({ list }) => {
list = list.filter(e => e.level > 1)
list.map(e => {
e.value = e.professionalId
e.label = e.professionalName
})
if (list.length) e.children = list
resolve()
}).catch(err => { })
})
result.push({
val: [],
disciplineId: e.disciplineId,
name: e.disciplineName,
list
})
}).catch(err => { })
}))
})
Promise.all(promises).then(_ => {
console.log("🚀 ~ file: index.vue:378 ~ this.$get ~ result:", result)
this.category = result
})
}).catch(err => { })
},
nameClick (i) {
this.$refs['category' + i][0].toggleDropDownVisible()
},
categoryChange (val, item) {
this.categoryId = item.disciplineId
this.professionalCategoryId = val[0] || ''
this.professionalId = val[1] || ''
this.initData()
},
getProfessionalClassData (id) {
let data = {
disciplineId: id || this.categoryId
};
const i = id === 1 ? 1 : 0
this.$get(this.api.courseProfessionalClass, data).then(({ list }) => {
this.$get(this.api.courseProfessionalClass, {
disciplineId: id || this.categoryId
}).then(({ list }) => {
this.professionalClassList = list.slice(i)
if (id) this.professionalCategoryId = list[i].professionalClassId
this.getProfessionalData(list[i].professionalClassId)
}).catch(err => {
});
}).catch(err => { })
},
//
getProfessionalData (id) {
let data = {
professionalClassId: id || this.professionalCategoryId
};
const i = id === 1 ? 1 : 0
this.$get(this.api.courseProfessional, data).then(({ list }) => {
this.$get(this.api.courseProfessional, {
professionalClassId: id || this.professionalCategoryId
}).then(({ list }) => {
this.professionalList = list.slice(i)
if (id) this.professionalId = list[i].professionalId
this.handleCategoryName()
this.initData()
}).catch(err => {
});
}).catch(err => { })
},
// name
handleCategoryName () {
@ -488,20 +500,6 @@ export default {
this.professionalId = id
this.initData()
},
//
categoryDropdown (id, prop) {
this[prop] = id
if (prop === 'categoryId') {
this.getProfessionalClassData(id)
}
if (prop === 'professionalCategoryId') {
this.getProfessionalData(id)
}
if (prop === 'professionalId') {
this.handleCategoryName()
this.initData()
}
},
//
getClass () {
this.$get(this.api.productTypeList).then(res => {
@ -525,7 +523,7 @@ export default {
// tab
tabChange ({ id }) {
this.curTab = id
this.category = []
// this.category = []
this.form.hotTag = 1
this.form.selection = ''
this.form.tagId = ''
@ -567,12 +565,18 @@ export default {
width: 100%;
height: 100%;
}
.banner-name {
.texts {
position: absolute;
top: 116px;
top: 200px;
left: 188px;
color: #fff;
}
h6 {
margin-bottom: 15px;
font-size: 50px;
color: #2e2d31;
}
.sub {
font-size: 24px;
}
}
.inner-wrap {
@ -666,6 +670,35 @@ export default {
.category {
margin: 5px 10px 0;
}
/deep/.category-item {
display: inline-flex;
align-items: center;
margin-right: 20px;
.name {
position: relative;
font-size: 14px;
color: #333;
cursor: pointer;
& + .el-cascader {
width: 50px;
}
}
}
/deep/.el-cascader {
width: auto;
.el-input {
.el-input__inner {
font-size: 14px;
color: #333;
border: 0;
}
}
&.active {
.el-input .el-input__inner {
color: #9278ff;
}
}
}
}
.vals {
display: inline-flex;

@ -7,8 +7,8 @@
:content="curriculumName || courseName"></el-page-header>
</div>
</el-card>
<el-card shadow="hover"
class="m-b-20"
<el-card class="source-card"
shadow="hover"
style="background: none;">
<div class="flex">
<div class="cover"
@ -345,6 +345,7 @@
</template>
</div>
<div class="rank">
<h6 class="title">练习成绩排行</h6>
<el-select style="width: 100%"
v-model="archProject"
placeholder="请选择"
@ -996,6 +997,11 @@ $height: 700px;
}
}
}
/deep/.source-card {
.el-card__body {
padding: 0;
}
}
.video_wid,
.cover {
position: relative;
@ -1127,7 +1133,7 @@ $height: 700px;
}
.chapters {
margin-top: 16px;
max-height: calc(100% - 138px);
max-height: calc(100% - 167px);
overflow: auto;
}
.chapter {
@ -1292,6 +1298,10 @@ $height: 700px;
padding: 20px;
margin-left: 12px;
background-color: #fff;
.title {
margin-bottom: 10px;
font-size: 16px;
}
.arches {
margin-top: 20px;
}

@ -26,7 +26,7 @@ if (isPro) {
uploadURL = `http://121.37.12.51/`
host = "http://121.37.12.51/"; // 中台测试服
// host = 'https://www.occupationlab.com/' // 正式服
// host = "http://192.168.31.152:9000/"; // 榕
host = "http://192.168.31.152:9000/"; // 榕
// host = 'http://192.168.31.51:9000/'; // 赓
}

@ -120,10 +120,17 @@
align-items: center;
padding-bottom: 10px;
margin: -22px 0 20px;
font-size: 20px;
font-size: 15px;
color: #9076ff;
border-bottom: 1px dashed #bfbfbf;
}
.des {
p,
span,
em {
font-size: 14px !important;
}
}
.withdraw {
margin-right: 10px;
font-size: 13px;

Loading…
Cancel
Save