资源修改 #30
|
@ -107,4 +107,5 @@ ipcMain.on('close-window', () => {
|
||||||
ipcMain.on('set-winsize', (e, {x, y})=>{
|
ipcMain.on('set-winsize', (e, {x, y})=>{
|
||||||
const win = BrowserWindow.getFocusedWindow();
|
const win = BrowserWindow.getFocusedWindow();
|
||||||
win.setSize(x,y);
|
win.setSize(x,y);
|
||||||
|
win.center()
|
||||||
})
|
})
|
||||||
|
|
|
@ -16,7 +16,7 @@ import AppMain from './components/AppMain.vue'
|
||||||
import Uploader from './components/Uploader.vue'
|
import Uploader from './components/Uploader.vue'
|
||||||
|
|
||||||
const { ipcRenderer } = window.electron || {}
|
const { ipcRenderer } = window.electron || {}
|
||||||
ipcRenderer.send('set-winsize', { x: 1200, y: 700 })
|
ipcRenderer ? ipcRenderer .send('set-winsize', { x: 1200, y: 700 }) : ''
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|
|
@ -61,7 +61,7 @@ const rules = reactive({
|
||||||
password: [{ required: true, trigger: 'blur', message: '请输入您的密码' }]
|
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) => {
|
const submitForm = async (formEl) => {
|
||||||
|
|
|
@ -29,8 +29,7 @@ import uploaderState from '@/store/modules/uploader'
|
||||||
|
|
||||||
const sourceStore = useResoureStore()
|
const sourceStore = useResoureStore()
|
||||||
const isDialogOpen = ref(false)
|
const isDialogOpen = ref(false)
|
||||||
const { ipcRenderer } = window.electron || {}
|
|
||||||
// ipcRenderer.send('set-winsize',{x:1100,y: 700})
|
|
||||||
|
|
||||||
|
|
||||||
const openDialog = () => {
|
const openDialog = () => {
|
||||||
|
@ -47,26 +46,29 @@ const changeBook = (data) => {
|
||||||
}
|
}
|
||||||
// 节点点击
|
// 节点点击
|
||||||
const nodeClick = (data) => {
|
const nodeClick = (data) => {
|
||||||
getData(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 levelFirstId = node.id
|
let levelFirstId = node.id
|
||||||
let levelSecondId = node.parentNode ? node.parentNode.id : ''
|
let levelSecondId = node.parentNode ? node.parentNode.id : ''
|
||||||
sourceStore.query = {
|
sourceStore.query = {
|
||||||
textbookId,
|
|
||||||
levelFirstId,
|
levelFirstId,
|
||||||
levelSecondId,
|
levelSecondId,
|
||||||
...sourceStore.query
|
...sourceStore.query
|
||||||
}
|
}
|
||||||
|
sourceStore.query.textbookId = textbookId
|
||||||
sourceStore.nodeData = {
|
sourceStore.nodeData = {
|
||||||
textbookId,
|
textbookId,
|
||||||
levelFirstId,
|
levelFirstId,
|
||||||
levelSecondId,
|
levelSecondId,
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceStore.handleQuery()
|
sourceStore.handleQuery()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -48,6 +48,7 @@ export default defineStore('resource', {
|
||||||
loading: false,
|
loading: false,
|
||||||
//查询条件
|
//查询条件
|
||||||
query: {
|
query: {
|
||||||
|
textbookId: '',
|
||||||
fileSource: '平台',
|
fileSource: '平台',
|
||||||
//资源格式 mp3 ppt ...
|
//资源格式 mp3 ppt ...
|
||||||
fileSuffix: -1,
|
fileSuffix: -1,
|
||||||
|
|
Loading…
Reference in New Issue