changes style

develoop
ww 5 months ago
commit 0d469d9cc1
  1. 7
      package.json
  2. 7935
      pnpm-lock.yaml
  3. 106
      src/views/MyCourseStudy/learningProcess.vue
  4. 158
      src/views/courseResources/componse/resourceAdd.vue
  5. 66
      src/views/courseResources/index.vue

@ -19,22 +19,29 @@
"dependencies": {
"3d-force-graph": "^1.73.3",
"@element-plus/icons-vue": "^2.3.1",
"@vueup/vue-quill": "^1.2.0",
"@vueuse/core": "^10.9.0",
"ali-oss": "^6.20.0",
"axios": "^1.6.8",
"d3": "^5.16.0",
"echarts": "^5.5.0",
<<<<<<< HEAD
"element-plus": "^2.6.0",
"jwt-decode": "^4.0.0",
=======
>>>>>>> f6dea2720fd0ad6ab62f53607d894cd0c406cb6d
"echarts-liquidfill": "^3.1.0",
"element-plus": "^2.6.0",
"form-data": "^4.0.0",
"jquery": "^3.7.1",
"jwt-decode": "^4.0.0",
"nanoid": "^5.0.7",
"nprogress": "^0.2.0",
"pinia": "^2.1.7",
"three": "^0.163.0",
"vue": "^3.4.27",
"vue-echarts": "^6.7.2",
"vue-quill": "^1.5.1",
"vue-router": "^4.3.0"
},
"devDependencies": {

File diff suppressed because it is too large Load Diff

@ -161,32 +161,39 @@ const goToAnotherPage = (address) => {
v-if="showCheckbox"
/>
<div class="right">
<div class="video">
<img
:src="record.content"
style="width: 100%"
height="100%"
@click="goToAnotherPage(record.address)"
/>
</div>
<div class="info">
<div class="tv">
<div class="name">
{{ record.coursesName }}
</div>
<el-icon
style="float: right"
@click="onDeleteRecord(record.id)"
>
<Delete />
</el-icon>
</div>
<div class="tv">
<div class="time">{{ record.time }}</div>
<div class="views">{{ record.number }} 观看次数</div>
</div>
</div>
<img
class="img"
:src="record.content"
@click="goToAnotherPage(record.address)"
style="margin-bottom: 10px"
/>
<div
style="
display: flex;
justify-content: space-between;
flex-grow: 1;
margin-top: 10px;
margin-bottom: 10px;
"
>
<p>
{{ record.coursesName }}
</p>
<el-icon @click="onDeleteRecord(record.id)">
<Delete />
</el-icon>
</div>
<div
style="
display: flex;
justify-content: space-between;
flex-grow: 1;
margin-top: 10px;
"
>
<p>{{ record.time }}</p>
<p>{{ record.number }} 观看次数</p>
</div>
</li>
</ul>
@ -211,10 +218,6 @@ const goToAnotherPage = (address) => {
</template>
<style scoped>
.right {
float: right;
}
.record {
display: flex;
flex-direction: column;
@ -234,58 +237,33 @@ const goToAnotherPage = (address) => {
margin: 10px 0;
}
ul {
/* flex-wrap: wrap; */
/* margin-bottom: 10px; */
list-style-type: none;
padding: 10;
display: flex;
flex-wrap: wrap;
/* justify-content: space-evenly; */
justify-content: start;
}
li {
transition: filter 0.3s; /* 添加过渡动画 */
flex: 0 0 20%;
/* width: 18%; */
flex-direction: column;
margin-bottom: 10px;
padding: 10px;
box-sizing: border-box;
/* border: 1px solid #ccc; */
/* border-radius: 4px; */
/* text-align: center; */
transition: box-shadow 0.3s;
cursor: pointer;
align-items: center;
}
li:hover {
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}
.video {
.img {
width: 100%;
height: 150px;
background-color: #d7e8f2;
}
.info {
display: flex;
/* overflow: hidden; */
flex-direction: column;
}
.name {
float: left;
margin: 5px;
font-size: 15px;
}
.tv {
/* display: grid */
margin: 5px;
font-size: 10px;
display: flex;
justify-content: space-between;
align-items: center;
}
.time {
float: left;
}
.views {
float: right;
height: 100%;
}
</style>

@ -1,7 +1,9 @@
<script setup>
<script lang="ts" setup>
import { ref } from 'vue'
import { CourseResourceControllerService } from '../../../../generated/services/CourseResourceControllerService'
const props = defineProps(['dafulIndex'])
import { QuillEditor } from '@vueup/vue-quill'
import '@vueup/vue-quill/dist/vue-quill.snow.css'
//
const visibleDramwer = ref(false)
//
@ -17,28 +19,28 @@ const defaultForm = {
const formModel = ref({
...defaultForm,
})
//
const imgUrl = ref('')
const onSelectFile = (uploadFile) => {
imgUrl.value = URL.createObjectURL(uploadFile.raw)
//
const rules = {
name: [
{ required: true, message: '请输入资源名称', trigger: 'blur' },
{ min: 3, max: 10, message: '长度在 3 到 10 个字符', trigger: 'blur' },
],
}
//selectedOption
// const selectedOption = ref('')
//
// import tool from '@/utils/oss.js'
// const FileList = ref([])
// const upload = async (option) => {
// const res = await tool.oss.upload(option.file)
// console.log(22, res)
// console.log(res.name)
// const url = 'https://wenyu132.oss-cn-beijing.aliyuncs.com/' + res.name
// console.log(url)
// }
//open
const open = (row) => {
const open = async (row) => {
visibleDramwer.value = true
//console.log(row.id)
if (row.id) {
//row.id
const res = await CourseResourceControllerService.getAllUsingGet1(row.id)
//
formModel.value = res.data.records
console.log(res)
//
//
console.log('编辑回显')
} else {
//
@ -61,7 +63,20 @@ const selectOp = ref([
{ label: '文件', value: '5' },
{ label: '音频', value: '6' },
])
function handleSel() {}
const handleSel = () => {}
//
import type { UploadProps, UploadUserFile } from 'element-plus'
const fileList = ref<UploadUserFile[]>([])
const handleRemove: UploadProps['onRemove'] = (uploadFile, uploadFiles) => {
console.log(uploadFile, uploadFiles)
}
const handlePreview: UploadProps['onPreview'] = (file) => {
console.log(file)
}
</script>
<template>
<el-drawer
@ -71,7 +86,13 @@ function handleSel() {}
size="50%"
>
<!-- 添加资源表单 -->
<el-form :model="formModel" ref="formRef" label-width="100px">
<el-form
class="resourceformModel"
:model="formModel"
ref="formRef"
:rules="rules"
label-width="100px"
>
<el-form-item label="资源名称" prop="name">
<el-input
v-model="formModel.name"
@ -79,63 +100,60 @@ function handleSel() {}
></el-input>
</el-form-item>
<el-form-item label="资源类型">
<div class="flex flex-wrap gap-4 items-center">
<el-select
@change="handleSel"
v-model="selectVal"
placeholder="Select"
size="large"
style="width: 240px"
>
<el-option
v-for="item in selectOp"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</div>
</el-form-item>
<el-form-item label="资源简介" prop="description">
资源简介
<!-- <el-input
v-model="formModel.description"
placeholder="请输入资源简介"
></el-input> -->
<el-select
@change="handleSel"
v-model="selectVal"
placeholder="请选择资源类型"
size="large"
style="width: 100%"
>
<el-option
v-for="item in selectOp"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="上传资源" prop="img">
<!-- 此处需要关闭element-plus的自动上传不需要配置action等参数
只需要前端的本地预览图片无需在提交前上传图标
-->
<el-form-item label="上传资源" prop="fileList">
<el-upload
class="avatar-uploader"
:show-file-list="false"
:auto-upload="false"
:onchange="onSelectFile"
>
<img v-if="imgUrl" :src="imgUrl" class="avatar" />
<el-icon v-else class="avatar-uploader-icon">
<Plus />
</el-icon>
</el-upload>
<!-- <el-upload
v-model:file-list="FileList"
:http-request="upload"
v-model:file-list="fileList"
class="upload-demo"
multiple
action="https://run.mocky.io/v3/9d059bf9-4660-45f2-925d-ce80ad6c4d15"
:on-preview="handlePreview"
:on-remove="handleRemove"
list-type="picture"
>
<el-button type="primary">点击上传</el-button>
<el-button type="primary">点击上传资源</el-button>
<template #tip>
<div class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div>
<div class="el-upload__tip">
jpg/png files with a size less than 500kb
</div>
</template>
</el-upload> -->
</el-upload>
</el-form-item>
<el-form-item class="bottom-box">
<el-button type="info" @click="onRemoval">取消</el-button>
<el-button type="primary">确定</el-button>
<el-form-item label="资源简介" prop="description">
<div class="editor">
<quill-editor
v-model:description="formModel.description"
content-type="html"
theme="snow"
></quill-editor>
</div>
</el-form-item>
<el-form-item>
<el-button type="primary">取消</el-button>
<el-button type="info">确定</el-button>
</el-form-item>
</el-form>
</el-drawer>
</template>
<style scoped></style>
<style lang="scss" scoped>
.editor {
width: 100%;
:deep(.ql-editor) {
min-height: 200px;
}
}
</style>

@ -171,22 +171,30 @@ const onEditResource = (row) => {
:key="resource.id"
v-loading="loading"
>
<div>
<div class="icon">
<el-icon @click="onDeleteResource(resource.id)">
<Delete />
</el-icon>
<el-icon @click="onEditResource">
<Edit />
</el-icon>
</div>
<div class="vedio" @click="generateRecords(resource)">
<img style="height: 200px" :src="resource.img" />
</div>
<div class="resource-info">
<div class="zy-name">{{ resource.name }}</div>
<div class="zy-info">{{ resource.description }}</div>
</div>
<div
style="
display: flex;
justify-content: space-between;
margin-bottom: 10px;
"
>
<el-icon @click="onDeleteResource(resource.id)">
<Delete />
</el-icon>
<el-icon @click="onEditResource(row)">
<Edit />
</el-icon>
</div>
<div
class="vedio"
@click="generateRecords(resource)"
style="margin-top: 10px; margin-bottom: 10px"
>
<img :src="resource.img" />
</div>
<div class="box" style="display: flex; flex-direction: column">
<p style="margin-bottom: 10px">{{ resource.name }}</p>
<p style="margin-top: 10px">{{ resource.description }}</p>
</div>
</li>
</ul>
@ -212,6 +220,7 @@ const onEditResource = (row) => {
:dafulIndex="params.type"
ref="resourceAddRef"
></resource-add>
<!-- -->
</div>
</div>
</div>
@ -259,6 +268,11 @@ ul {
li {
transition: filter 0.3s; /* 添加过渡动画 */
flex: 0 0 20%;
<<<<<<< HEAD
=======
flex-direction: column;
align-items: center;
>>>>>>> f6dea2720fd0ad6ab62f53607d894cd0c406cb6d
margin-bottom: 10px;
padding: 10px;
box-sizing: border-box;
@ -281,23 +295,7 @@ li:hover {
bottom: 0;
margin: 0 auto;
}
.icon {
display: flex;
justify-content: space-between;
}
.resource-info {
display: flex;
flex-direction: column;
justify-content: space-between;
}
.zy-name:hover {
color: rgb(138, 201, 243); /* 鼠标经过时将字体颜色设置为蓝色 */
}
.zy-name {
margin-top: 10px;
font-size: 20px;
}
.zy-info {
margin-top: 20px;
.box p:hover {
font-weight: bold;
}
</style>

Loading…
Cancel
Save