fix: BUG修改

This commit is contained in:
kun 2024-03-12 21:48:41 +08:00
parent 46c8f4e183
commit c9284dd84b
2 changed files with 51 additions and 4 deletions

View File

@ -7,18 +7,34 @@
<span :class="activeTab == 2 ? 'active-span' : ''" @click="changeActive(2)">质量控制要点</span>
</div>
<div class="text-content">
<div v-html="activeTab == 0?props.dataObj.dangerPointIdentification:activeTab == 1?props.dataObj.riskControlMeasure:activeTab == 2?props.dataObj.constructionKeyPoint:''"></div>
<div class="content-data" v-if="isShowContent" v-html="activeTab == 0?props.dataObj.dangerPointIdentification:activeTab == 1?props.dataObj.riskControlMeasure:activeTab == 2?props.dataObj.constructionKeyPoint:''"></div>
<div class="notoDta" v-else>
<img src="@/assets/images/noData.png" alt="" />
<p>暂无数据</p>
</div>
</div>
</div>
</div>
</template>
<script lang="ts" setup>
import { ref, onMounted } from "vue";
import { ref, onMounted, computed } from "vue";
import { GlobalStore } from "@/stores";
const store = GlobalStore();
const props = defineProps(["dataObj"]);
const activeTab = ref(0);
const isShowContent = computed(() => {
//
if(activeTab.value == 0 && !props.dataObj.dangerPointIdentification){
return false;
} else if(activeTab.value == 1 && !props.dataObj.riskControlMeasure){
return false;
} else if(activeTab.value == 2 && !props.dataObj.constructionKeyPoint){
return false;
} else {
return true
}
})
const changeActive = (activeIndex: any) => {
activeTab.value = activeIndex;
};
@ -61,7 +77,9 @@ onMounted(async () => {
}
}
.text-content{
div{
position: relative;
height: 500px;
.content-data{
font-size: 16px;
color: #fff;
height: 500px;
@ -69,6 +87,21 @@ onMounted(async () => {
margin-top: 20px;
line-height: 25px;
}
.notoDta {
top: 22%;
width: 30%;
left: 32%;
position: absolute;
img {
width: 40%;
margin: 0% 30%;
}
p {
color: #fff;
font-size: 14px;
text-align: center;
}
}
}
}
}

View File

@ -303,7 +303,7 @@ const activeBtn = (item: any) => {
}
//
isEdit.value = false;
console.log(detailData.value.videoList[0].serialNumber);
setVideoElement();
};
const boxStyle = (item: any) => {
if (item.isActive) {
@ -334,11 +334,25 @@ const getDataList = async () => {
newArray[0].isActive = true;
articleNewList.value = newArray;
detailData.value = newArray[0];
setVideoElement();
} else {
articleNewList.value = [];
detailData.value = {};
}
};
const setVideoElement = () => {
// 使
setTimeout(() => {
// video
var videos = document.getElementsByTagName("video");
// video
for (var i = 0; i < videos.length; i++) {
//
videos[i].style.width = "99.9%";
videos[i].style.height = "99.9%";
}
}, 1000);
}
const searchChange = (e: any) => {
getDataList();
};