资源修改 #30
|
@ -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()
|
||||
})
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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) => {
|
||||
|
|
|
@ -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()
|
||||
}
|
||||
|
||||
|
|
|
@ -48,6 +48,7 @@ export default defineStore('resource', {
|
|||
loading: false,
|
||||
//查询条件
|
||||
query: {
|
||||
textbookId: '',
|
||||
fileSource: '平台',
|
||||
//资源格式 mp3 ppt ...
|
||||
fileSuffix: -1,
|
||||
|
|
Loading…
Reference in New Issue