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) { editor.on('init', function(ed) {
// 设置默认字体 // 设置默认字体
ed.target.editorCommands.execCommand("fontName", false, "Microsoft Yahei") 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") ed.target.editorCommands.execCommand("lineHeight", false, "1.5")
}) })
}, },

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

@ -9,10 +9,13 @@
<img :src="item.banner" <img :src="item.banner"
alt="" alt=""
:style="{height: carouselHeight}"> :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="" alt=""
:style="{height: carouselHeight}"> --> :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> </div>
</el-carousel-item> </el-carousel-item>
</template> </template>
@ -50,46 +53,20 @@
@click="catetoryClick('')">全部</dd> @click="catetoryClick('')">全部</dd>
<dd :class="{active: categoryId === 1}" <dd :class="{active: categoryId === 1}"
@click="catetoryClick(1)">不限</dd> @click="catetoryClick(1)">不限</dd>
<div v-for="(item, i) in category"
<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"
:key="i" :key="i"
:command="item.professionalClassId">{{ item.professionalClassName }}</el-dropdown-item> class="category-item">
</el-dropdown-menu> <span v-if="!item.val.length"
</el-dropdown> class="name"
<el-dropdown class="category" @click="nameClick(i)">{{ item.name }}</span>
@command="id => categoryDropdown(id, 'professionalId')"> <el-cascader :class="{active: item.disciplineId == categoryId}"
<span class="el-dropdown-link"> :ref="'category' + i"
{{ professionalName }}<i class="el-icon-arrow-down el-icon--right"></i> v-model="item.val"
</span> :options="item.list"
<el-dropdown-menu slot="dropdown"> :props="{ checkStrictly: true }"
<el-dropdown-item v-for="(item, i) in professionalList" placeholder=""
:key="i" @change="id => categoryChange(id, item)"></el-cascader>
:command="item.professionalId">{{ item.professionalName }}</el-dropdown-item> </div>
</el-dropdown-menu>
</el-dropdown>
<!-- <el-cascader style="width: 300px;padding: 0 15px"
v-model="category"
:props="props"
clearable
@change="initData"></el-cascader> -->
</dl> </dl>
<dl v-if="curTab == 3"> <dl v-if="curTab == 3">
<dt>产品标签</dt> <dt>产品标签</dt>
@ -244,7 +221,6 @@ export default {
category: [], category: [],
// //
props: { props: {
// multiple: true,
checkStrictly: true, checkStrictly: true,
lazy: true, lazy: true,
lazyLoad (node, resolve) { lazyLoad (node, resolve) {
@ -252,11 +228,13 @@ export default {
// //
if (!level) { if (!level) {
that.$get(that.api.courseDiscipline).then(({ list }) => { that.$get(that.api.courseDiscipline).then(({ list }) => {
list = list.slice(1).filter(e => e.level > 1)
list.map(e => { list.map(e => {
e.value = e.disciplineId e.value = e.disciplineId
e.label = e.disciplineName e.label = e.disciplineName
e.children = [] e.children = []
}) })
that.category = [list[0].disciplineId]
resolve(list) resolve(list)
}).catch(err => { }) }).catch(err => { })
} else if (level === 1) { } else if (level === 1) {
@ -264,6 +242,7 @@ export default {
that.$get(that.api.courseProfessionalClass, { that.$get(that.api.courseProfessionalClass, {
disciplineId: value disciplineId: value
}).then(({ list }) => { }).then(({ list }) => {
list = list.filter(e => e.level > 1)
list.map(e => { list.map(e => {
e.value = e.professionalClassId e.value = e.professionalClassId
e.label = e.professionalClassName e.label = e.professionalClassName
@ -276,6 +255,7 @@ export default {
that.$get(that.api.courseProfessional, { that.$get(that.api.courseProfessional, {
professionalClassId: value professionalClassId: value
}).then(({ list }) => { }).then(({ list }) => {
list = list.filter(e => e.level > 1)
list.map(e => { list.map(e => {
e.value = e.professionalId e.value = e.professionalId
e.label = e.professionalName e.label = e.professionalName
@ -320,20 +300,7 @@ export default {
name: '热销排行' name: '热销排行'
}, },
], ],
list: [ 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: '理论课程'
},
],
keyword: '', keyword: '',
total: 0, total: 0,
page: 1, page: 1,
@ -356,7 +323,7 @@ export default {
this.getSubject() this.getSubject()
this.getLabel() this.getLabel()
this.getClass() this.getClass()
// this.initData() this.initData()
}, },
methods: { methods: {
// banner // banner
@ -408,38 +375,83 @@ export default {
}).catch(err => { }) }).catch(err => { })
}, },
// //
getSubject () { async getSubject () {
//
this.$get(this.api.courseDiscipline).then(({ list }) => { this.$get(this.api.courseDiscipline).then(({ list }) => {
this.subjectList = list.slice(1) list = list.filter(e => e.level > 1).slice(1)
this.getProfessionalClassData(list[1].disciplineId) const result = []
}).catch(err => { 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) { getProfessionalClassData (id) {
let data = {
disciplineId: id || this.categoryId
};
const i = id === 1 ? 1 : 0 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) this.professionalClassList = list.slice(i)
if (id) this.professionalCategoryId = list[i].professionalClassId if (id) this.professionalCategoryId = list[i].professionalClassId
this.getProfessionalData(list[i].professionalClassId) this.getProfessionalData(list[i].professionalClassId)
}).catch(err => { }).catch(err => { })
});
}, },
// //
getProfessionalData (id) { getProfessionalData (id) {
let data = {
professionalClassId: id || this.professionalCategoryId
};
const i = id === 1 ? 1 : 0 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) this.professionalList = list.slice(i)
if (id) this.professionalId = list[i].professionalId if (id) this.professionalId = list[i].professionalId
this.handleCategoryName() this.handleCategoryName()
this.initData() this.initData()
}).catch(err => { }).catch(err => { })
});
}, },
// name // name
handleCategoryName () { handleCategoryName () {
@ -488,20 +500,6 @@ export default {
this.professionalId = id this.professionalId = id
this.initData() 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 () { getClass () {
this.$get(this.api.productTypeList).then(res => { this.$get(this.api.productTypeList).then(res => {
@ -525,7 +523,7 @@ export default {
// tab // tab
tabChange ({ id }) { tabChange ({ id }) {
this.curTab = id this.curTab = id
this.category = [] // this.category = []
this.form.hotTag = 1 this.form.hotTag = 1
this.form.selection = '' this.form.selection = ''
this.form.tagId = '' this.form.tagId = ''
@ -567,12 +565,18 @@ export default {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.banner-name { .texts {
position: absolute; position: absolute;
top: 116px; top: 200px;
left: 188px; left: 188px;
color: #fff;
}
h6 {
margin-bottom: 15px;
font-size: 50px; font-size: 50px;
color: #2e2d31; }
.sub {
font-size: 24px;
} }
} }
.inner-wrap { .inner-wrap {
@ -666,6 +670,35 @@ export default {
.category { .category {
margin: 5px 10px 0; 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 { .vals {
display: inline-flex; display: inline-flex;

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

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

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

Loading…
Cancel
Save