修改窗口大小

This commit is contained in:
lyc 2024-07-17 15:18:53 +08:00
parent b10b850b9a
commit ac9032a84f
8 changed files with 29 additions and 17 deletions

View File

@ -8,8 +8,8 @@ File({ app, shell, BrowserWindow, ipcMain })
function createWindow() {
// Create the browser window.
const mainWindow = new BrowserWindow({
width: 1050,
height: 650,
width: 888,
height: 520,
show: false,
frame: false,
autoHideMenuBar: true,

View File

@ -8,7 +8,6 @@
import { ref } from 'vue'
const size = ref('default')
// const size = computed(() => store.state.app.elementSize)
</script>
<style>

View File

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

View File

@ -12,7 +12,7 @@ export const constantRoutes = [
{
path: '/',
component: Layout,
redirect: '/resource',
redirect: '/login',
children: [
{
path: '/resource',

View File

@ -43,10 +43,10 @@ import { encrypt, decrypt } from '@/utils/jsencrypt'
import useUserStore from '@/store/modules/user'
import leftBg2 from '@/assets/images/login/left-bg2.png'
const { ipcRenderer } = window.electron || {}
const formRef = ref()
const userStore = useUserStore()
const router = useRouter()
const { ipcRenderer } = window.electron || {}
const isMaxSize = ref(false)
const btnLoading = ref(false)
//
@ -61,6 +61,8 @@ const rules = reactive({
password: [{ required: true, trigger: 'blur', message: '请输入您的密码' }]
})
ipcRenderer.send('set-winsize', { x: 888, y: 520 })
//
const submitForm = async (formEl) => {
if (!formEl) return
@ -101,7 +103,6 @@ const getCookie = () => {
}
onMounted(()=>{
// ipcRenderer.send('set-winsize',{x:888,y: 520})
getCookie()
})
//

View File

@ -13,8 +13,8 @@
</el-row>
<el-row class="resoure-btns">
<el-col :span="24" class="query-row flex">
<div class="flex row-left"> <el-select v-model="sourceStore.query.fileSuffix"
style="width: 100px">
<div class="flex row-left"> <el-select v-model="sourceStore.query.fileSuffix" @change="sourceStore.changeSuffix"
style="width: 110px">
<el-option v-for="item in sourceStore.resourceFormatList" :key="item.value" :label="item.label"
:value="item.value" />
</el-select>

View File

@ -25,7 +25,6 @@ import ChooseTextbook from '@/components/choose-textbook/index.vue'
import ResoureSearch from './container/resoure-search.vue'
import ResoureList from './container/resoure-list.vue'
import uploadDialog from '@/components/upload-dialog/index.vue'
import MoveFile from '@/components/move-file/index.vue'
import uploaderState from '@/store/modules/uploader'
const sourceStore = useResoureStore()
@ -54,17 +53,17 @@ const nodeClick = (data) => {
//
const getData = (data) => {
const { textBook, node } = data
let textBookId = textBook.curBookId
let textbookId = textBook.curBookId
let levelFirstId = node.id
let levelSecondId = node.parentNode ? node.parentNode.id : ''
sourceStore.query = {
textBookId,
textbookId,
levelFirstId,
levelSecondId,
...sourceStore.query
}
sourceStore.nodeData = {
textBookId,
textbookId,
levelFirstId,
levelSecondId,
}
@ -74,9 +73,9 @@ const getData = (data) => {
//
const submitFile = (data) => {
let fileList = toRaw(data)
const { textBookId, levelFirstId, levelSecondId, fileSource, fileRoot } = sourceStore.query
const { textbookId, levelFirstId, levelSecondId, fileSource, fileRoot } = sourceStore.query
//
let fileData = { textBookId, levelFirstId, levelSecondId, fileSource, fileRoot }
let fileData = { textbookId, levelFirstId, levelSecondId, fileSource, fileRoot }
fileList.forEach(item => {
fileData.fileShowName = item.fileData.fileShowName
fileData.fileFlag = item.fileData.fileFlag

View File

@ -15,7 +15,7 @@ const resourceTypeList = [
const resourceFormatList = [
{
label: '资源格式',
value: ''
value: -1
},
...resourceFormat
]
@ -49,7 +49,9 @@ export default defineStore('resource', {
//查询条件
query: {
fileSource: '平台',
fileSuffix: '',
//资源格式 mp3 ppt ...
fileSuffix: -1,
// 资源类型 课件 素材 教案
fileFlag: '',
fileRoot: '资源',
orderByColumn: 'uploadTime',
@ -65,7 +67,11 @@ export default defineStore('resource', {
handleQuery() {
try {
this.loading = true
getSmarttalkPage(this.query).then((res) => {
let data = {...this.query}
if(data.fileSuffix == -1){
data.fileSuffix = ''
}
getSmarttalkPage(data).then((res) => {
this.result.total = res.total
this.result.list = res.rows
})
@ -80,6 +86,10 @@ export default defineStore('resource', {
changeType(val) {
this.query.fileFlag = val
this.handleQuery()
},
changeSuffix(val){
this.query.fileSuffix = val
this.handleQuery()
}
}
})