资源模块修改 #32
|
@ -112,8 +112,8 @@ const editUserInfo = async () =>{
|
||||||
const data = {
|
const data = {
|
||||||
userId,
|
userId,
|
||||||
userName,
|
userName,
|
||||||
edustage: subjectVal.value,
|
edustage: gradeVal.value,
|
||||||
edusubject: gradeVal.value
|
edusubject: subjectVal.value
|
||||||
}
|
}
|
||||||
await updateUserInfo(data)
|
await updateUserInfo(data)
|
||||||
await userStore.getInfo()
|
await userStore.getInfo()
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
<div class="file-list-item flex" v-for="(item, index) in fileList" :key="item.uid">
|
<div class="file-list-item flex" v-for="(item, index) in fileList" :key="item.uid">
|
||||||
<div class="file-name">
|
<div class="file-name">
|
||||||
<span class="name">标题:</span>
|
<span class="name">标题:</span>
|
||||||
<FileImage :fileName="item.name" size="50"/>
|
<FileImage :fileName="item.name" :size="50"/>
|
||||||
<el-input class="file-input" v-model="item.fileData.name" placeholder="请输入文件名" />
|
<el-input class="file-input" v-model="item.fileData.name" placeholder="请输入文件名" />
|
||||||
<span>.{{ getFileSuffix(item.name) }}</span>
|
<span>.{{ getFileSuffix(item.name) }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
}}</el-button>
|
}}</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12" class="search-box flex">
|
<el-col :span="12" class="search-box flex">
|
||||||
<el-input v-model="sourceStore.searchKey" style="width: 240px" placeholder="请输入关键词" />
|
<el-input v-model="sourceStore.query.fileName" @input="sourceStore.changeName" style="width: 240px" placeholder="请输入关键词" />
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row class="resoure-btns">
|
<el-row class="resoure-btns">
|
||||||
|
@ -36,7 +36,6 @@
|
||||||
import useResoureStore from '../store'
|
import useResoureStore from '../store'
|
||||||
|
|
||||||
const sourceStore = useResoureStore()
|
const sourceStore = useResoureStore()
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.resoure-search {
|
.resoure-search {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="page-resource flex">
|
<div class="page-resource flex">
|
||||||
<!--左侧 教材 目录-->
|
<!--左侧 教材 目录-->
|
||||||
<ChooseTextbook @changeBook="changeBook" @nodeClick="nodeClick" />
|
<ChooseTextbook @changeBook="getData" @nodeClick="getData" />
|
||||||
|
|
||||||
<div class="page-right">
|
<div class="page-right">
|
||||||
<!-- 搜索 -->
|
<!-- 搜索 -->
|
||||||
|
@ -27,7 +27,6 @@ import ResoureList from './container/resoure-list.vue'
|
||||||
import uploadDialog from '@/components/upload-dialog/index.vue'
|
import uploadDialog from '@/components/upload-dialog/index.vue'
|
||||||
import uploaderState from '@/store/modules/uploader'
|
import uploaderState from '@/store/modules/uploader'
|
||||||
|
|
||||||
|
|
||||||
const sourceStore = useResoureStore()
|
const sourceStore = useResoureStore()
|
||||||
const isDialogOpen = ref(false)
|
const isDialogOpen = ref(false)
|
||||||
|
|
||||||
|
@ -35,27 +34,13 @@ const openDialog = () => {
|
||||||
isDialogOpen.value = true
|
isDialogOpen.value = true
|
||||||
}
|
}
|
||||||
|
|
||||||
const onSubmit = (data)=>{
|
|
||||||
console.log(data)
|
|
||||||
}
|
|
||||||
|
|
||||||
// 切换教材
|
|
||||||
const changeBook = (data) => {
|
|
||||||
getData(data)
|
|
||||||
}
|
|
||||||
// 节点点击
|
|
||||||
const nodeClick = (data) => {
|
|
||||||
getData(data)
|
|
||||||
}
|
|
||||||
|
|
||||||
// 查询
|
// 查询
|
||||||
const getData = (data) => {
|
const getData = (data) => {
|
||||||
const { textBook, node } = data
|
const { textBook, node } = data
|
||||||
|
|
||||||
let textbookId = textBook.curBookId
|
let textbookId = textBook.curBookId
|
||||||
console.log(textbookId)
|
let levelSecondId = node.id
|
||||||
let levelFirstId = node.id
|
let levelFirstId = node.parentNode ? node.parentNode.id : ''
|
||||||
let levelSecondId = node.parentNode ? node.parentNode.id : ''
|
|
||||||
sourceStore.query = {
|
sourceStore.query = {
|
||||||
levelFirstId,
|
levelFirstId,
|
||||||
levelSecondId,
|
levelSecondId,
|
||||||
|
|
|
@ -38,10 +38,7 @@ export default defineStore('resource', {
|
||||||
resourceTypeList,
|
resourceTypeList,
|
||||||
resourceFormatList,
|
resourceFormatList,
|
||||||
|
|
||||||
curFormat: -1,
|
|
||||||
searchKey: '',
|
searchKey: '',
|
||||||
// 新建资源
|
|
||||||
isCreate: false,
|
|
||||||
|
|
||||||
//节点数据
|
//节点数据
|
||||||
nodeData:{},
|
nodeData:{},
|
||||||
|
@ -55,6 +52,7 @@ export default defineStore('resource', {
|
||||||
// 资源类型 课件 素材 教案
|
// 资源类型 课件 素材 教案
|
||||||
fileFlag: '',
|
fileFlag: '',
|
||||||
fileRoot: '资源',
|
fileRoot: '资源',
|
||||||
|
fileName: '',
|
||||||
orderByColumn: 'uploadTime',
|
orderByColumn: 'uploadTime',
|
||||||
isAsc: 'desc',
|
isAsc: 'desc',
|
||||||
...structQuery
|
...structQuery
|
||||||
|
@ -91,6 +89,11 @@ export default defineStore('resource', {
|
||||||
changeSuffix(val){
|
changeSuffix(val){
|
||||||
this.query.fileSuffix = val
|
this.query.fileSuffix = val
|
||||||
this.handleQuery()
|
this.handleQuery()
|
||||||
}
|
},
|
||||||
|
// 关键词搜索
|
||||||
|
changeName(){
|
||||||
|
console.log(this.query.fileName)
|
||||||
|
this.handleQuery()
|
||||||
|
},
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue