修改窗口大小
This commit is contained in:
parent
b10b850b9a
commit
ac9032a84f
|
@ -8,8 +8,8 @@ File({ app, shell, BrowserWindow, ipcMain })
|
||||||
function createWindow() {
|
function createWindow() {
|
||||||
// Create the browser window.
|
// Create the browser window.
|
||||||
const mainWindow = new BrowserWindow({
|
const mainWindow = new BrowserWindow({
|
||||||
width: 1050,
|
width: 888,
|
||||||
height: 650,
|
height: 520,
|
||||||
show: false,
|
show: false,
|
||||||
frame: false,
|
frame: false,
|
||||||
autoHideMenuBar: true,
|
autoHideMenuBar: true,
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
|
|
||||||
const size = ref('default')
|
const size = ref('default')
|
||||||
// const size = computed(() => store.state.app.elementSize)
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
|
|
@ -14,6 +14,9 @@
|
||||||
import Header from './components/Header.vue'
|
import Header from './components/Header.vue'
|
||||||
import AppMain from './components/AppMain.vue'
|
import AppMain from './components/AppMain.vue'
|
||||||
import Uploader from './components/Uploader.vue'
|
import Uploader from './components/Uploader.vue'
|
||||||
|
|
||||||
|
const { ipcRenderer } = window.electron || {}
|
||||||
|
ipcRenderer.send('set-winsize', { x: 1200, y: 700 })
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|
|
@ -12,7 +12,7 @@ export const constantRoutes = [
|
||||||
{
|
{
|
||||||
path: '/',
|
path: '/',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
redirect: '/resource',
|
redirect: '/login',
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: '/resource',
|
path: '/resource',
|
||||||
|
|
|
@ -43,10 +43,10 @@ import { encrypt, decrypt } from '@/utils/jsencrypt'
|
||||||
import useUserStore from '@/store/modules/user'
|
import useUserStore from '@/store/modules/user'
|
||||||
import leftBg2 from '@/assets/images/login/left-bg2.png'
|
import leftBg2 from '@/assets/images/login/left-bg2.png'
|
||||||
|
|
||||||
|
const { ipcRenderer } = window.electron || {}
|
||||||
const formRef = ref()
|
const formRef = ref()
|
||||||
const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const { ipcRenderer } = window.electron || {}
|
|
||||||
const isMaxSize = ref(false)
|
const isMaxSize = ref(false)
|
||||||
const btnLoading = ref(false)
|
const btnLoading = ref(false)
|
||||||
//表单
|
//表单
|
||||||
|
@ -61,6 +61,8 @@ const rules = reactive({
|
||||||
password: [{ required: true, trigger: 'blur', message: '请输入您的密码' }]
|
password: [{ required: true, trigger: 'blur', message: '请输入您的密码' }]
|
||||||
})
|
})
|
||||||
|
|
||||||
|
ipcRenderer.send('set-winsize', { x: 888, y: 520 })
|
||||||
|
|
||||||
//登录
|
//登录
|
||||||
const submitForm = async (formEl) => {
|
const submitForm = async (formEl) => {
|
||||||
if (!formEl) return
|
if (!formEl) return
|
||||||
|
@ -101,7 +103,6 @@ const getCookie = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(()=>{
|
onMounted(()=>{
|
||||||
// ipcRenderer.send('set-winsize',{x:888,y: 520})
|
|
||||||
getCookie()
|
getCookie()
|
||||||
})
|
})
|
||||||
// 最小化
|
// 最小化
|
||||||
|
|
|
@ -13,8 +13,8 @@
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row class="resoure-btns">
|
<el-row class="resoure-btns">
|
||||||
<el-col :span="24" class="query-row flex">
|
<el-col :span="24" class="query-row flex">
|
||||||
<div class="flex row-left"> <el-select v-model="sourceStore.query.fileSuffix"
|
<div class="flex row-left"> <el-select v-model="sourceStore.query.fileSuffix" @change="sourceStore.changeSuffix"
|
||||||
style="width: 100px">
|
style="width: 110px">
|
||||||
<el-option v-for="item in sourceStore.resourceFormatList" :key="item.value" :label="item.label"
|
<el-option v-for="item in sourceStore.resourceFormatList" :key="item.value" :label="item.label"
|
||||||
:value="item.value" />
|
:value="item.value" />
|
||||||
</el-select>
|
</el-select>
|
||||||
|
|
|
@ -25,7 +25,6 @@ import ChooseTextbook from '@/components/choose-textbook/index.vue'
|
||||||
import ResoureSearch from './container/resoure-search.vue'
|
import ResoureSearch from './container/resoure-search.vue'
|
||||||
import ResoureList from './container/resoure-list.vue'
|
import ResoureList from './container/resoure-list.vue'
|
||||||
import uploadDialog from '@/components/upload-dialog/index.vue'
|
import uploadDialog from '@/components/upload-dialog/index.vue'
|
||||||
import MoveFile from '@/components/move-file/index.vue'
|
|
||||||
import uploaderState from '@/store/modules/uploader'
|
import uploaderState from '@/store/modules/uploader'
|
||||||
|
|
||||||
const sourceStore = useResoureStore()
|
const sourceStore = useResoureStore()
|
||||||
|
@ -54,17 +53,17 @@ const nodeClick = (data) => {
|
||||||
// 查询
|
// 查询
|
||||||
const getData = (data) => {
|
const getData = (data) => {
|
||||||
const { textBook, node } = data
|
const { textBook, node } = data
|
||||||
let textBookId = textBook.curBookId
|
let textbookId = textBook.curBookId
|
||||||
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,
|
textbookId,
|
||||||
levelFirstId,
|
levelFirstId,
|
||||||
levelSecondId,
|
levelSecondId,
|
||||||
...sourceStore.query
|
...sourceStore.query
|
||||||
}
|
}
|
||||||
sourceStore.nodeData = {
|
sourceStore.nodeData = {
|
||||||
textBookId,
|
textbookId,
|
||||||
levelFirstId,
|
levelFirstId,
|
||||||
levelSecondId,
|
levelSecondId,
|
||||||
}
|
}
|
||||||
|
@ -74,9 +73,9 @@ const getData = (data) => {
|
||||||
// 提交文件
|
// 提交文件
|
||||||
const submitFile = (data) => {
|
const submitFile = (data) => {
|
||||||
let fileList = toRaw(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 => {
|
fileList.forEach(item => {
|
||||||
fileData.fileShowName = item.fileData.fileShowName
|
fileData.fileShowName = item.fileData.fileShowName
|
||||||
fileData.fileFlag = item.fileData.fileFlag
|
fileData.fileFlag = item.fileData.fileFlag
|
||||||
|
|
|
@ -15,7 +15,7 @@ const resourceTypeList = [
|
||||||
const resourceFormatList = [
|
const resourceFormatList = [
|
||||||
{
|
{
|
||||||
label: '资源格式',
|
label: '资源格式',
|
||||||
value: ''
|
value: -1
|
||||||
},
|
},
|
||||||
...resourceFormat
|
...resourceFormat
|
||||||
]
|
]
|
||||||
|
@ -49,7 +49,9 @@ export default defineStore('resource', {
|
||||||
//查询条件
|
//查询条件
|
||||||
query: {
|
query: {
|
||||||
fileSource: '平台',
|
fileSource: '平台',
|
||||||
fileSuffix: '',
|
//资源格式 mp3 ppt ...
|
||||||
|
fileSuffix: -1,
|
||||||
|
// 资源类型 课件 素材 教案
|
||||||
fileFlag: '',
|
fileFlag: '',
|
||||||
fileRoot: '资源',
|
fileRoot: '资源',
|
||||||
orderByColumn: 'uploadTime',
|
orderByColumn: 'uploadTime',
|
||||||
|
@ -65,7 +67,11 @@ export default defineStore('resource', {
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
try {
|
try {
|
||||||
this.loading = true
|
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.total = res.total
|
||||||
this.result.list = res.rows
|
this.result.list = res.rows
|
||||||
})
|
})
|
||||||
|
@ -80,6 +86,10 @@ export default defineStore('resource', {
|
||||||
changeType(val) {
|
changeType(val) {
|
||||||
this.query.fileFlag = val
|
this.query.fileFlag = val
|
||||||
this.handleQuery()
|
this.handleQuery()
|
||||||
|
},
|
||||||
|
changeSuffix(val){
|
||||||
|
this.query.fileSuffix = val
|
||||||
|
this.handleQuery()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue