This commit is contained in:
caozehui
2024-12-27 14:29:21 +08:00
parent c6836cad06
commit 3d9ba8b1cb
2 changed files with 13 additions and 9 deletions

View File

@@ -110,7 +110,7 @@
<!-- <template #header>--> <!-- <template #header>-->
<!-- <div style="background: #003078 !important; color: #fff !important; font-size: 18px;">检测项进度</div>--> <!-- <div style="background: #003078 !important; color: #fff !important; font-size: 18px;">检测项进度</div>-->
<!-- </template>--> <!-- </template>-->
<div ref="scrollContainerRef"> <div ref="scrollContainerRef" style="height: 100%; overflow-y: auto;">
<p v-for="(item, index) in testLogList" <p v-for="(item, index) in testLogList"
:key="index" :key="index"
:style="{color:item.type==='error'?'#F56C6C': item.type==='warning'?'#e6a23c':'var(--el-text-color-regular)'}"> :style="{color:item.type==='error'?'#F56C6C': item.type==='warning'?'#e6a23c':'var(--el-text-color-regular)'}">
@@ -603,7 +603,6 @@ const updateCheckResult = (data: CheckData.ScriptChnItem) => {
const scrollToBottom = () => { const scrollToBottom = () => {
if (scrollContainerRef.value) { if (scrollContainerRef.value) {
scrollContainerRef.value.scrollTop = scrollContainerRef.value.scrollHeight; scrollContainerRef.value.scrollTop = scrollContainerRef.value.scrollHeight;
console.log(scrollContainerRef.value.scrollTop)
} }
}; };

View File

@@ -148,17 +148,18 @@ const detectionOptions = ref([
const preTestRef = ref(null); const preTestRef = ref(null);
const testRef = ref(null); const testRef = ref(null);
const devIdArr = ref([]) // const devIdArr = ref([])
const planId = ref('') // const planId = ref('')
// 打开弹窗,可能是新增,也可能是编辑 // 打开弹窗,可能是新增,也可能是编辑
const open = (selection: Device.ResPqDev[],title: string,time:boolean) => { const open = (selection: Device.ResPqDev[],title: string,time:boolean) => {
const checkStates = selection.map(item => item.checkState); const checkStates = selection.map(item => item.checkState);
devIdArr.value = selection.map(item => item.id); // devIdArr.value = selection.map(item => item.id);
planId.value =selection[0].planId // planId.value =selection[0].planId
console.log('wwwwwwwwwwwwwwwww',selection) // console.log('wwwwwwwwwwwwwwwww',selection)
const allCheckStatesEqual = new Set(checkStates).size <= 1; const allCheckStatesEqual = new Set(checkStates).size <= 1;
@@ -213,7 +214,10 @@ const detectionOptions = ref([
const handleSubmit = () => { const handleSubmit = () => {
skipDisabled.value = true skipDisabled.value = true
console.log('=============',stepsActiveIndex.value) console.log('=============',stepsActiveIndex.value)
let deviceIds = checkStore.devices.map((item) => item.deviceId) let deviceIds = checkStore.devices.map((item) => item.deviceId)
let planId = checkStore.planId
switch (stepsActiveIndex.value) { switch (stepsActiveIndex.value) {
case 0: case 0:
preTestStatus.value = 'start' preTestStatus.value = 'start'
@@ -226,8 +230,9 @@ const detectionOptions = ref([
})*/ })*/
startPreTest({ startPreTest({
userPageId: "cdf", userPageId: "cdf",
devIds:devIdArr.value, devIds:deviceIds,
planId:planId.value planId:planId,
operateType:'0' // '0'为预检测、1为正式检测
}).then(res=>{ }).then(res=>{