Merge branch 'main' into lyc-dev
This commit is contained in:
commit
d1bb8d2b63
|
@ -244,6 +244,13 @@ app.on('ready', () => {
|
||||||
loginWindow.show()
|
loginWindow.show()
|
||||||
loginWindow.focus()
|
loginWindow.focus()
|
||||||
})
|
})
|
||||||
|
// 打印窗口
|
||||||
|
ipcMain.on('printPage', (event, printOptions) => {
|
||||||
|
//console.log("ipcMain-print-page")
|
||||||
|
mainWindow.webContents.print(printOptions, (success, failureReason) => {
|
||||||
|
if (!success) console.error(failureReason);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
//打开作业窗口
|
//打开作业窗口
|
||||||
ipcMain.on('openWindow', (e, data) => {
|
ipcMain.on('openWindow', (e, data) => {
|
||||||
|
|
|
@ -78,7 +78,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div v-if="(currentRow.worktype == '科学实验' || classWorkForm.worktype == '科学实验')&& currentRow.id>0" class="page-center">
|
<div v-if="(currentRow.worktype == '科学实验' || classWorkForm.worktype == '科学实验')&& currentRow.id>0" class="page-center">
|
||||||
<div class="experiment-homework">
|
<div class="experiment-homework">
|
||||||
<ExperimentQuestion :expObj="classWorkForm.fileHomeworkList&&classWorkForm.fileHomeworkList[0]" @clickExpObj="getExpObj" />
|
<ExperimentQuestion :expObj="classWorkForm.fileHomeworkList&&classWorkForm.fileHomeworkList[0]" @clickExpObj="getExpObj" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -161,6 +161,7 @@ const route = useRoute();
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const { proxy } = getCurrentInstance()
|
const { proxy } = getCurrentInstance()
|
||||||
const useClassTaskStores = useClassTaskStore();
|
const useClassTaskStores = useClassTaskStore();
|
||||||
|
const { ipcRenderer } = require('electron')
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
currentCourse: Object,
|
currentCourse: Object,
|
||||||
|
@ -841,6 +842,22 @@ const editWork = async (cform) =>{
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 测试, 未实装
|
||||||
|
const handlePrint = () => {
|
||||||
|
const printOptions = {
|
||||||
|
silent: false, // 是否静默打印
|
||||||
|
printBackground: true, // 是否打印背景颜色和图像
|
||||||
|
color: false, // 是否打印为黑白
|
||||||
|
marginsType: 0, // 边距类型,0: 默认边距,1: 无边距,2: 最小边距
|
||||||
|
pageSize: 'A4', // 纸张大小
|
||||||
|
// 其他选项可以根据需要配置
|
||||||
|
};
|
||||||
|
|
||||||
|
console.log("print-page-click");
|
||||||
|
ipcRenderer.send('printPage', printOptions);
|
||||||
|
};
|
||||||
|
|
||||||
//----
|
//----
|
||||||
|
|
||||||
|
|
||||||
|
@ -977,5 +994,8 @@ const editWork = async (cform) =>{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
::v-deep img {
|
||||||
|
display: inline-block !important;
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -22,13 +22,11 @@
|
||||||
|
|
||||||
<!-- 裁剪按钮-->
|
<!-- 裁剪按钮-->
|
||||||
<div class="btn">
|
<div class="btn">
|
||||||
<el-button style="margin-right: 20px">选择</el-button>
|
<label for="submit">
|
||||||
<input
|
<div class="lBut"><span>选择</span></div>
|
||||||
class="upload"
|
</label>
|
||||||
type="file"
|
<input class="upload" id="submit" accept=".png, .jpg, .jpeg" type="file" style="display: none;" @change="uploadImg" />
|
||||||
accept=".png, .jpg, .jpeg"
|
<!-- <el-button style="margin-right: 20px;cursor:pointer">选择</el-button> -->
|
||||||
@change="uploadImg"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<el-button @click="cancle">取消</el-button>
|
<el-button @click="cancle">取消</el-button>
|
||||||
<el-button @click="sureSava">提交</el-button>
|
<el-button @click="sureSava">提交</el-button>
|
||||||
|
@ -216,6 +214,7 @@ export default {
|
||||||
position: relative;
|
position: relative;
|
||||||
display: flex;
|
display: flex;
|
||||||
margin-top: 30px;
|
margin-top: 30px;
|
||||||
|
cursor: pointer;
|
||||||
> .upload {
|
> .upload {
|
||||||
display: block;
|
display: block;
|
||||||
width: 60px;
|
width: 60px;
|
||||||
|
@ -224,6 +223,7 @@ export default {
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -265,4 +265,22 @@ export default {
|
||||||
background-color: rgba(43, 43, 43, 0.7215686275);
|
background-color: rgba(43, 43, 43, 0.7215686275);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.lBut{
|
||||||
|
width: 87px;
|
||||||
|
height: 32px;
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 1.15;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
border-radius: 4px;
|
||||||
|
padding: 8px 10px;
|
||||||
|
margin-right: 10px;
|
||||||
|
transition: all 0.5s;
|
||||||
|
white-space: nowrap;
|
||||||
|
background-color: #409eff;
|
||||||
|
color: white;
|
||||||
|
border: 1px solid #409eff;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
Loading…
Reference in New Issue