|
@@ -5,7 +5,14 @@
|
|
|
<div class="step">
|
|
|
<span>步骤{{ stepI + 1 }}</span>
|
|
|
</div>
|
|
|
- <div class="do" v-if="worksStudent[stepI] && worksStudent[stepI].length > 6">收缩</div>
|
|
|
+ <div
|
|
|
+ class="do"
|
|
|
+ v-if="isCloseList[stepI] && worksStudent[stepI] && worksStudent[stepI].length > 4"
|
|
|
+ @click="contract(stepI)"
|
|
|
+ :class="{ close: isCloseList[stepI] && isCloseList[stepI].isClose == '1' }"
|
|
|
+ >
|
|
|
+ {{ isCloseList[stepI].isClose == '1' ? '展开' : '收缩' }}
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div class="tool-box" v-if="tools[step.tool[0]]">
|
|
|
<div class="tool-img"><img :src="tools[step.tool[0]].img" /></div>
|
|
@@ -17,7 +24,14 @@
|
|
|
>
|
|
|
<div class="title">作业预览</div>
|
|
|
<div class="works">
|
|
|
- <Works class="work" v-for="(work, workI) in worksStudent[stepI]" :key="stepI + '-' + workI" :work="work">
|
|
|
+ <Works
|
|
|
+ class="work"
|
|
|
+ v-for="(work, workI) in isCloseList[stepI].isClose == 0
|
|
|
+ ? worksStudent[stepI]
|
|
|
+ : worksStudent[stepI].slice(0, 4)"
|
|
|
+ :key="stepI + '-' + workI"
|
|
|
+ :work="work"
|
|
|
+ >
|
|
|
</Works>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -637,6 +651,14 @@ export default {
|
|
|
.catch(err => {
|
|
|
console.log(err)
|
|
|
})
|
|
|
+ },
|
|
|
+ contract(i) {
|
|
|
+ if (this.isCloseList[i].isClose === 0) {
|
|
|
+ this.isCloseList[i].isClose = 1
|
|
|
+ } else {
|
|
|
+ this.isCloseList[i].isClose = 0
|
|
|
+ }
|
|
|
+ this.$forceUpdate()
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
@@ -649,18 +671,18 @@ export default {
|
|
|
.sb-container {
|
|
|
width: 100%;
|
|
|
box-sizing: border-box;
|
|
|
- padding: 0 0.3rem;
|
|
|
+ padding: 0 15px;
|
|
|
.steps-box {
|
|
|
width: 100%;
|
|
|
border-bottom: 1px solid rgb(239, 239, 239);
|
|
|
- padding: 0.3rem 0;
|
|
|
+ padding: 15px 0;
|
|
|
.step-title {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
justify-content: space-between;
|
|
|
height: 0.8rem;
|
|
|
.step {
|
|
|
- font-size: 0.45rem;
|
|
|
+ font-size: 18px;
|
|
|
font-weight: bold;
|
|
|
display: flex;
|
|
|
height: 100%;
|
|
@@ -674,6 +696,28 @@ export default {
|
|
|
background-image: linear-gradient(180deg, #2c5cbd, #a1cff4);
|
|
|
}
|
|
|
}
|
|
|
+ .do {
|
|
|
+ font-size: 14px;
|
|
|
+ color: #b9b9b9;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ cursor: pointer;
|
|
|
+ &::after {
|
|
|
+ content: '';
|
|
|
+ width: 5px;
|
|
|
+ height: 5px;
|
|
|
+ border-top: 2px solid #b9b9b9;
|
|
|
+ border-left: 2px solid #b9b9b9;
|
|
|
+ transform: rotate(-135deg);
|
|
|
+ transition: all 0.5s;
|
|
|
+ margin-left: 5px;
|
|
|
+ }
|
|
|
+ &.close {
|
|
|
+ &::after {
|
|
|
+ transform: rotate(-45deg);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
.tool-box {
|
|
@@ -694,13 +738,14 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
.tool-name {
|
|
|
+ font-size: 14px;
|
|
|
margin-top: 5px;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
.works-box {
|
|
|
.title {
|
|
|
- font-size: 0.35rem;
|
|
|
+ font-size: 14px;
|
|
|
color: #858585;
|
|
|
}
|
|
|
.works {
|
|
@@ -714,7 +759,7 @@ export default {
|
|
|
.no-works-box {
|
|
|
margin-top: 10px;
|
|
|
.title {
|
|
|
- font-size: 0.35rem;
|
|
|
+ font-size: 14px;
|
|
|
color: #858585;
|
|
|
}
|
|
|
.no-works-box-students {
|