|
@@ -29,26 +29,27 @@
|
|
|
</p>
|
|
|
</div>
|
|
|
<div style="display: flex;justify-content: flex-start;align-items: center;overflow-x: auto;"
|
|
|
- v-if="nowRunList.name || misList.length > 0">
|
|
|
- <div :class="setImg(nowRunList)" v-if="nowRunList.name" @click="startNow(nowRunList)">
|
|
|
+ v-if="nowRunList.length > 0 || misList.length > 0">
|
|
|
+ <div :class="setImg(item)" v-if="nowRunList.length > 0" v-for="(item, index) in nowRunList">
|
|
|
<div class="intBoxOne">
|
|
|
<p class="intOne">
|
|
|
- <span style="font-size: 18px;color: white;">{{ nowRunList.name }}</span>
|
|
|
+ <span style="font-size: 18px;color: white;">{{ item.name }}</span>
|
|
|
</p>
|
|
|
<p style="margin-left: 8px;">
|
|
|
<img style="width: 15px;height: 15px;float: left;padding-top:2px"
|
|
|
src="../../../assets/icon/white_flash.png" alt="" />
|
|
|
- <span style="font-size: 12px;color:white" class="commonSpan">{{ nowRunList.station_name }}</span>
|
|
|
+ <span style="font-size: 12px;color:white" class="commonSpan">{{ item.station_name }}</span>
|
|
|
</p>
|
|
|
<p style="margin-left: 8px;">
|
|
|
<img style="width: 15px;height: 15px;float: left;padding-top:2px"
|
|
|
src="../../../assets/icon/white_clock.png" alt="" />
|
|
|
- <span style="font-size: 12px;color:white" class="commonSpan">{{ nowRunList.ct }}</span>
|
|
|
+ <span style="font-size: 12px;color:white" class="commonSpan">{{ item.ct }}</span>
|
|
|
</p>
|
|
|
</div>
|
|
|
<!-- 点击检测 -->
|
|
|
<div class="setNow">
|
|
|
- <span style="font-size: 16px;color:white" class="setnowspan">检测中<em v-loading="emLoading"></em></span>
|
|
|
+ <span style="font-size: 16px;color:white" class="setnowspan" @click="startBefore(item, index)">检测中<em
|
|
|
+ v-loading="emLoading"></em></span>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="intBox" v-for="(item, index) in misList" :style="setImg(item, index)" @mouseover="intOver(index)"
|
|
@@ -152,7 +153,7 @@ export default {
|
|
|
let lookingTask = ref({}) //当前点击查看的任务对象
|
|
|
let taskModels = ref([]) //任务模型列表
|
|
|
let misList = ref([])//待检测任务列表
|
|
|
- let nowRunList = ref({})//正在检测任务列表
|
|
|
+ let nowRunList = ref([])//正在检测任务列表
|
|
|
let passList = ref([])//已完成检测任务列表
|
|
|
let currEditTaskModels = ref(null)
|
|
|
let emLoading = ref(true)
|
|
@@ -177,7 +178,6 @@ export default {
|
|
|
let models = res.data.models
|
|
|
if (models === null || models.length === 0) return
|
|
|
taskModels.value = models
|
|
|
- console.log(taskModels.value, 'task');
|
|
|
})
|
|
|
}
|
|
|
function startNow(row, num) {
|
|
@@ -254,7 +254,8 @@ export default {
|
|
|
return 0; // 不需要交换位置
|
|
|
}
|
|
|
});
|
|
|
- misList.value = sortedList;
|
|
|
+ misList.value = res.data;
|
|
|
+ console.log(misList.value, 'misList');
|
|
|
emit("haveBack", misList.value);
|
|
|
loading.close()
|
|
|
}
|
|
@@ -271,12 +272,12 @@ export default {
|
|
|
// 1为正在检测
|
|
|
task.getTask({ pageno: 1, pagesize: 10, state: 1 }).then(res => {
|
|
|
if (res.data == null) {
|
|
|
- nowRunList.value = {}
|
|
|
- lookingTask.value = {}
|
|
|
+ nowRunList.value = []
|
|
|
+ lookingTask.value = []
|
|
|
return
|
|
|
} else {
|
|
|
- nowRunList.value = res.data[0]
|
|
|
- lookingTask.value = res.data[0] //默认查看该任务信息
|
|
|
+ nowRunList.value = res.data
|
|
|
+ lookingTask.value = res.data //默认查看该任务信息
|
|
|
}
|
|
|
})
|
|
|
}
|