Commit 53cd059f by linjinhong

更改右边栏配置

parent f197473e
......@@ -36,6 +36,7 @@ async function createWindow() {
nodeIntegration: true,
},
});
// let newWindow = new BrowserWindow({
// fullscreen: false,
// width: 1000,
......@@ -166,6 +167,7 @@ async function createWindow() {
});
});
});
win.on("resize", () => {
const { width, height } = win.getBounds();
win.webContents.send("window-size", { width, height });
......@@ -186,7 +188,8 @@ app.on("activate", async () => {
app.on("ready", async () => {
await createWindow();
// 获取当前窗口的尺寸
const { width, height } = win.getBounds();
win.webContents.send("window-size", { width, height });
globalShortcut.register("F5", () => {
return false;
});
......
......@@ -259,8 +259,6 @@ export default {
}, 500);
}
} else {
console.log(260, res.data);
bus.$emit("busEmit", {
type: "sendFile",
value: res.data,
......
<script>
import VueDragResizeRotate from "@minogin/vue-drag-resize-rotate";
const { ipcRenderer } = require("electron");
import { grid } from "../data";
import ImgSetting from "./imgSetting.vue";
......@@ -35,6 +36,7 @@ export default {
proportion = 1.7;
} else if (height > 900 && height <= 1000) {
proportion = 1.5;
this.PreViewGrid.h;
} else {
proportion = 1;
}
......@@ -51,15 +53,6 @@ export default {
!this.grid[this.systemSetting.gridValue]
)
return { w: 0, h: 0, v: 1 };
console.log(35, this.grid);
console.log(
1111111,
this.grid[this.systemSetting.gridValue].w,
this.grid[this.systemSetting.gridValue].value,
this.grid[this.systemSetting.gridValue].h
);
return {
w: this.grid[this.systemSetting.gridValue].w,
v: this.grid[this.systemSetting.gridValue].value,
......@@ -67,7 +60,6 @@ export default {
};
},
gridSpacing() {
console.log(61, this.systemSetting);
const { unit, gridSpacing } = this.systemSetting;
if (!this.systemSetting || !Object.keys(this.systemSetting).length)
return { w: 0, h: 0 };
......@@ -147,6 +139,14 @@ export default {
selectImgList: [],
bus: 0,
grid,
PreViewGrid: {
label: "16×18",
value: 1,
row: 16,
col: 18,
h: 540,
w: 480,
},
showImgSetting: true,
printDialogShow: true,
parentHeight: 0,
......@@ -156,6 +156,7 @@ export default {
x: 0,
y: 0,
imgList: [],
viewImgList: [],
selectImgIndexList: [],
isView: false,
imgHistoryList: [[]],
......@@ -173,6 +174,8 @@ export default {
if (this.imgList.length > 0) {
this.$nextTick(() => {
let dom = document.getElementsByClassName("drr");
console.log("dom", dom);
this.imgList.forEach((el, i) => {
let dom_i = document.getElementsByClassName("drr")[i];
dom_i.style.zIndex =
......@@ -719,12 +722,14 @@ export default {
if (currentElement.closest(".container")) {
// 如果点击的元素不是 boxShaow,执行方法
if (!currentElement.closest(".boxShaow") && !this.isView) {
this.isView = !this.isView;
this.isView = true;
console.log(723, this.isView);
this.$store.commit("setIsPreView", this.isView);
}
}
if (currentElement.closest(".drawer")) {
this.isView = false;
}
this.$store.commit("setIsPreView", this.isView);
},
},
mounted() {
......@@ -750,8 +755,6 @@ export default {
break;
case "updateSystemSetting":
this.systemSetting = this.$dataStore.get("setting");
console.log(6684, this.systemSetting);
break;
case "uploadImage":
this.addFile(value, () => {
......@@ -762,7 +765,6 @@ export default {
this.imgList = [];
this.selectIndex = -1;
if (value.length > 0) {
console.log(111, value);
this.selectImgList = value;
this.selectImgIndex = 0;
this.getBackFile({ files: [value[0]], size }, (file) => {
......@@ -800,10 +802,24 @@ export default {
@close="close"
>
<template #content>
<!-- <div class="information-content">
<div class="title">
素材信息
<div class="information-content">
<div
style="display: flex;justify-content: space-between;flex-wrap: nowrap;"
>
<div class="title" style="flex: 1;">
素材信息
</div>
<div>
<el-button
type="primary"
size="small"
style="margin: 10px;"
@click="cutImgFn"
>裁切</el-button
>
</div>
</div>
<el-row class="main">
<el-col :span="6">
<div class="text-center">打印区域</div>
......@@ -818,16 +834,48 @@ export default {
</el-col>
<el-row class="border-row">
<el-col :span="6" class="text-center">A面</el-col>
<el-col :span="9" class="border-col">
<el-col
:span="6"
class="text-center"
style="align-items: stretch;flex-grow: 1"
>A面</el-col
>
<el-col
:span="9"
class="border-col"
style="align-items: stretch;flex-grow: 1"
>
<div class="img">
<img class="full-width" src="#" alt="" />
</div>
</el-col>
<el-col :span="9">
<div class="img" v-for="(it, i) in selectImgList" :key="i">
<img class="full-width" :src="it.productionFile" alt="" />
</div>
<div class="boxLine"></div>
<el-col
:span="9"
style="overflow: hidden;align-items: stretch;flex-grow: 1"
>
<el-checkbox-group
v-if="selectImgList.length"
v-model="checkList"
>
<el-checkbox
:label="selectImgList[0]"
:class="{
imgchecked: checkList.includes(selectImgList[0]),
}"
>
<div
class="img-item"
@click.stop.prevent="selectImg(selectImgList[0], 0)"
>
<img
style="width: 140px"
:src="selectImgList[0].productionFile"
/>
<span>{{ selectImgList[0].designId }}</span>
</div>
</el-checkbox>
</el-checkbox-group>
</el-col>
</el-row>
......@@ -838,10 +886,29 @@ export default {
<img class="full-width" src="#" alt="" />
</div>
</el-col>
<el-col :span="9">
<div class="img" v-for="(it, i) in selectImgList" :key="i">
<img class="full-width" :src="it.productionFile" alt="" />
</div>
<el-col :span="9" style="overflow: hidden;">
<el-checkbox-group
v-if="selectImgList.length > 1"
v-model="checkList"
>
<el-checkbox
:label="selectImgList[1]"
:class="{
imgchecked: checkList.includes(selectImgList[1]),
}"
>
<div
class="img-item"
@click.stop.prevent="selectImg(selectImgList[1], 1)"
>
<img
style="width: 140px"
:src="selectImgList[1].productionFile"
/>
<span>{{ selectImgList[1].designId }}</span>
</div>
</el-checkbox>
</el-checkbox-group>
</el-col>
</el-row>
</el-row>
......@@ -936,8 +1003,8 @@ export default {
<div>{{ detail.startStockingTime }}</div>
</div>
</div>
</div> -->
<div
</div>
<!-- <div
class="select-img"
v-if="selectImgList.length && $store.state.desktopDevice === 1"
>
......@@ -961,16 +1028,16 @@ export default {
</div>
</el-checkbox>
</el-checkbox-group>
<!-- <div
@click="selectImg(it, i)"
v-for="(it, i) in selectImgList"
:key="i"
class="img-item"
>
<img style="width: 140px;height: auto;" :src="it.productionFile" />
<span>{{ it.designId }}</span>
<div
@click="selectImg(it, i)"
v-for="(it, i) in selectImgList"
:key="i"
class="img-item"
>
<img style="width: 140px;height: auto;" :src="it.productionFile" />
<span>{{ it.designId }}</span>
</div>
</div> -->
</div>
</template>
</img-setting>
<div
......@@ -979,12 +1046,6 @@ export default {
:style="{ 'background-color': !isView ? '#77797a' : '#fff' }"
>
<div class="container">
<!-- <el-button
style="position: absolute;top: 0;left: 50%;z-index: 99;"
size="langer"
@click="changePic"
>切换视图</el-button
> -->
<div v-if="isView" id="img" style="background-color: #fff; ">
<div
id="line"
......@@ -1300,7 +1361,7 @@ img {
flex-direction: column;
align-items: center;
justify-content: center;
box-sizing: border-box;
span {
font-size: 14px;
margin: 5px 0;
......@@ -1352,6 +1413,7 @@ img {
}
.imgchecked {
border: 1px solid #409eff;
box-sizing: border-box;
}
</style>
<style lang="less" scoped>
......@@ -1382,7 +1444,7 @@ img {
.main {
margin: 5px;
border: 1px solid #ececec;
height: 100%;
.effectPic {
.img {
width: 100%;
......@@ -1423,6 +1485,7 @@ img {
border-bottom: 1px solid #ececec;
display: flex;
width: 100%;
height: 100%;
align-items: center;
}
.full-width {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment