|
@@ -1,17 +1,6 @@
|
|
|
<template>
|
|
|
- <div class="video_area">
|
|
|
- <div
|
|
|
- v-show="data.property.sn_position.includes('top')"
|
|
|
- class="top"
|
|
|
- :style="getJustifyContentStyle(data.property.sn_position)"
|
|
|
- >
|
|
|
- {{ data.property.serial_number }}
|
|
|
- </div>
|
|
|
- <div
|
|
|
- v-show="data.property.sn_position.includes('left')"
|
|
|
- class="left"
|
|
|
- :style="getJustifyContentStyle(data.property.sn_position)"
|
|
|
- >
|
|
|
+ <div class="video_area" :style="getAreaStyle()">
|
|
|
+ <div class="sn-position" :style="getJustifyContentStyle()">
|
|
|
{{ data.property.serial_number }}
|
|
|
</div>
|
|
|
<div class="main">
|
|
@@ -50,20 +39,6 @@
|
|
|
</ul>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div
|
|
|
- v-show="data.property.sn_position.includes('right')"
|
|
|
- class="right"
|
|
|
- :style="getJustifyContentStyle(data.property.sn_position)"
|
|
|
- >
|
|
|
- {{ data.property.serial_number }}
|
|
|
- </div>
|
|
|
- <div
|
|
|
- v-show="data.property.sn_position.includes('bottom')"
|
|
|
- class="bottom"
|
|
|
- :style="getJustifyContentStyle(data.property.sn_position)"
|
|
|
- >
|
|
|
- {{ data.property.serial_number }}
|
|
|
- </div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -108,17 +83,47 @@ export default {
|
|
|
this.curVideoIndex = this.data.file_id_list.length - 1;
|
|
|
}
|
|
|
},
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 得到序号外部样式
|
|
|
+ */
|
|
|
+ getAreaStyle() {
|
|
|
+ const position = this.data.property.sn_position;
|
|
|
+ let grid = '';
|
|
|
+
|
|
|
+ if (position.includes('right')) {
|
|
|
+ grid = `"main position" / 1fr auto`;
|
|
|
+ } else if (position.includes('left')) {
|
|
|
+ grid = `"position main" / auto 1fr`;
|
|
|
+ } else if (position.includes('top')) {
|
|
|
+ grid = `"position" auto "main" 1fr`;
|
|
|
+ } else if (position.includes('bottom')) {
|
|
|
+ grid = `"main" 1fr "position" auto`;
|
|
|
+ }
|
|
|
+
|
|
|
+ return {
|
|
|
+ grid,
|
|
|
+ };
|
|
|
+ },
|
|
|
+
|
|
|
/**
|
|
|
- * 得到位置样式
|
|
|
- * @param {string} position 位置
|
|
|
+ * 得到序号位置样式
|
|
|
*/
|
|
|
- getJustifyContentStyle(position) {
|
|
|
+ getJustifyContentStyle() {
|
|
|
+ const position = this.data.property.sn_position;
|
|
|
+ let placeSelf = '';
|
|
|
+
|
|
|
if (position.includes('start')) {
|
|
|
- return 'justify-content: start';
|
|
|
+ placeSelf = 'flex-start';
|
|
|
} else if (position.includes('end')) {
|
|
|
- return 'justify-content: end';
|
|
|
+ placeSelf = 'flex-end';
|
|
|
+ } else {
|
|
|
+ placeSelf = 'center';
|
|
|
}
|
|
|
- return 'justify-content: center';
|
|
|
+
|
|
|
+ return {
|
|
|
+ placeSelf,
|
|
|
+ };
|
|
|
},
|
|
|
},
|
|
|
};
|
|
@@ -127,14 +132,14 @@ export default {
|
|
|
<style lang="scss" scoped>
|
|
|
.video_area {
|
|
|
display: grid;
|
|
|
- grid:
|
|
|
- 'top top top'
|
|
|
- 'left main right'
|
|
|
- 'bottom bottom bottom';
|
|
|
- grid-template-columns: 1fr 28fr 1fr;
|
|
|
- width: 100%;
|
|
|
-
|
|
|
- > div {
|
|
|
+ gap: 6px;
|
|
|
+ padding: 8px;
|
|
|
+
|
|
|
+ .sn-position {
|
|
|
+ grid-area: position;
|
|
|
+ }
|
|
|
+
|
|
|
+ > .main {
|
|
|
display: flex;
|
|
|
margin: 4px auto;
|
|
|
|
|
@@ -143,16 +148,6 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- .top {
|
|
|
- grid-area: top;
|
|
|
- width: 92%;
|
|
|
- }
|
|
|
-
|
|
|
- .left {
|
|
|
- flex-direction: column;
|
|
|
- grid-area: left;
|
|
|
- }
|
|
|
-
|
|
|
.main {
|
|
|
grid-area: main;
|
|
|
width: 100%;
|
|
@@ -171,9 +166,11 @@ export default {
|
|
|
display: flex;
|
|
|
column-gap: 3%;
|
|
|
width: 100%;
|
|
|
+ height: 100%;
|
|
|
|
|
|
:deep .el-carousel {
|
|
|
- width: 90%;
|
|
|
+ flex: 1;
|
|
|
+ width: 75%;
|
|
|
background-color: #d9d9d9;
|
|
|
|
|
|
&__container {
|
|
@@ -181,6 +178,7 @@ export default {
|
|
|
max-height: 500px;
|
|
|
padding: 2px;
|
|
|
margin: 0 auto;
|
|
|
+ overflow: auto;
|
|
|
}
|
|
|
|
|
|
&__item {
|
|
@@ -192,21 +190,11 @@ export default {
|
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
|
row-gap: 20px;
|
|
|
- width: 25%;
|
|
|
+ width: 23%;
|
|
|
max-height: 500px;
|
|
|
overflow: auto;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- .right {
|
|
|
- flex-direction: column;
|
|
|
- grid-area: right;
|
|
|
- }
|
|
|
-
|
|
|
- .bottom {
|
|
|
- grid-area: bottom;
|
|
|
- width: 92%;
|
|
|
- }
|
|
|
}
|
|
|
</style>
|