资源修改 #30

Merged
lyc merged 1 commits from lyc-dev into main 2024-07-17 15:39:32 +08:00
5 changed files with 10 additions and 6 deletions

View File

@ -107,4 +107,5 @@ ipcMain.on('close-window', () => {
ipcMain.on('set-winsize', (e, {x, y})=>{
const win = BrowserWindow.getFocusedWindow();
win.setSize(x,y);
win.center()
})

View File

@ -16,7 +16,7 @@ import AppMain from './components/AppMain.vue'
import Uploader from './components/Uploader.vue'
const { ipcRenderer } = window.electron || {}
ipcRenderer.send('set-winsize', { x: 1200, y: 700 })
ipcRenderer ? ipcRenderer .send('set-winsize', { x: 1200, y: 700 }) : ''
</script>
<style lang="scss" scoped>

View File

@ -61,7 +61,7 @@ const rules = reactive({
password: [{ required: true, trigger: 'blur', message: '请输入您的密码' }]
})
ipcRenderer.send('set-winsize', { x: 888, y: 520 })
ipcRenderer ? ipcRenderer.send('set-winsize', { x: 888, y: 520 }) : ''
//
const submitForm = async (formEl) => {

View File

@ -29,8 +29,7 @@ import uploaderState from '@/store/modules/uploader'
const sourceStore = useResoureStore()
const isDialogOpen = ref(false)
const { ipcRenderer } = window.electron || {}
// ipcRenderer.send('set-winsize',{x:1100,y: 700})
const openDialog = () => {
@ -47,26 +46,29 @@ const changeBook = (data) => {
}
//
const nodeClick = (data) => {
getData(data)
// getData(data)
}
//
const getData = (data) => {
const { textBook, node } = data
let textbookId = textBook.curBookId
console.log(textbookId)
let levelFirstId = node.id
let levelSecondId = node.parentNode ? node.parentNode.id : ''
sourceStore.query = {
textbookId,
levelFirstId,
levelSecondId,
...sourceStore.query
}
sourceStore.query.textbookId = textbookId
sourceStore.nodeData = {
textbookId,
levelFirstId,
levelSecondId,
}
sourceStore.handleQuery()
}

View File

@ -48,6 +48,7 @@ export default defineStore('resource', {
loading: false,
//查询条件
query: {
textbookId: '',
fileSource: '平台',
//资源格式 mp3 ppt ...
fileSuffix: -1,