微调
This commit is contained in:
@@ -216,7 +216,7 @@ const dictData: Dict[] = [
|
|||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
id: "0",
|
id: "0",
|
||||||
label: 'FLUKE6100A电能功率标准源',
|
label: 'FLUKE.6100A电能功率标准源',
|
||||||
code: 0,
|
code: 0,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -236,7 +236,7 @@ const dictData: Dict[] = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "4",
|
id: "4",
|
||||||
label: 'PQV-520电能质量检测装置',
|
label: 'PQV-520便携式电能质量监测装置',
|
||||||
code: 4,
|
code: 4,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -489,4 +489,22 @@
|
|||||||
font-size: 12px !important;
|
font-size: 12px !important;
|
||||||
// color: var(--ba-bg-color-overlay) !important;
|
// color: var(--ba-bg-color-overlay) !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.el-message-box{
|
||||||
|
padding: 0px !important;
|
||||||
|
.el-message-box__header{
|
||||||
|
background-color: var(--el-color-primary);
|
||||||
|
.el-message-box__title{
|
||||||
|
color: #fff;
|
||||||
|
padding: 10px 10px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
.el-message-box__content{
|
||||||
|
padding: 10px ;
|
||||||
|
border-bottom: 1px solid #cccccc;
|
||||||
|
}
|
||||||
|
.el-message-box__btns {
|
||||||
|
|
||||||
|
padding: 10px;}
|
||||||
|
}
|
||||||
@@ -346,7 +346,7 @@ emit('update:testStatus',ts.value)
|
|||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
.right-content{
|
.right-content{
|
||||||
max-height: 400px;
|
/* max-height: 400px; */
|
||||||
}
|
}
|
||||||
|
|
||||||
.custom-tabs-label .el-icon {
|
.custom-tabs-label .el-icon {
|
||||||
@@ -356,4 +356,10 @@ emit('update:testStatus',ts.value)
|
|||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
margin-left: 4px;
|
margin-left: 4px;
|
||||||
}
|
}
|
||||||
|
.dialog-content{
|
||||||
|
height: 472px;
|
||||||
|
}
|
||||||
|
.el-tabs--border-card {
|
||||||
|
height: 435px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,131 +1,130 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-tabs type="border-card">
|
<el-tabs type="border-card">
|
||||||
<el-tab-pane label="预检测项目">
|
<el-tab-pane label="预检测项目">
|
||||||
<div class="form-grid">
|
<div class="form-grid">
|
||||||
<el-checkbox
|
<el-checkbox v-for="(item, index) in detectionOptions" v-model="item.selected" :key="index"
|
||||||
v-for="(item, index) in detectionOptions"
|
:label="item.name"></el-checkbox>
|
||||||
v-model="item.selected"
|
<!-- disabled="true" -->
|
||||||
:key="index"
|
</div>
|
||||||
:label="item.name"
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
></el-checkbox
|
|
||||||
>
|
|
||||||
<!-- disabled="true" -->
|
|
||||||
</div>
|
|
||||||
</el-tab-pane>
|
|
||||||
</el-tabs>
|
|
||||||
|
|
||||||
<div class = "test-dialog">
|
<div class="test-dialog">
|
||||||
<div class="dialog-left">
|
<div class="dialog-left">
|
||||||
<el-steps direction="vertical" :active="activeIndex" :process-status="currentStepStatus" finish-status="success">
|
<el-steps direction="vertical" :active="activeIndex" :process-status="currentStepStatus"
|
||||||
<el-step title="源通讯校验" />
|
finish-status="success">
|
||||||
<el-step title="设备通讯校验" />
|
<el-step title="源通讯校验" />
|
||||||
<el-step title="协议校验" />
|
<el-step title="设备通讯校验" />
|
||||||
<el-step title="相序校验" />
|
<el-step title="协议校验" />
|
||||||
<el-step title="检测完成" />
|
<el-step title="相序校验" />
|
||||||
</el-steps>
|
<el-step title="检测完成" />
|
||||||
</div>
|
</el-steps>
|
||||||
<div class="dialog-right">
|
</div>
|
||||||
|
<div class="dialog-right">
|
||||||
<el-collapse v-model="collapseActiveName" accordion>
|
<el-collapse v-model="collapseActiveName" accordion>
|
||||||
<el-collapse-item title="源通讯校验" name="1">
|
<el-collapse-item title="源通讯校验" name="1">
|
||||||
<div class = "div-log">
|
<div class="div-log">
|
||||||
<p v-for="(item, index) in step1InitLog" :key="index" :style="{color:item.type==='error'?'#F56C6C':'var(--el-text-color-regular)'}">
|
<p v-for="(item, index) in step1InitLog" :key="index"
|
||||||
{{ item.log }} <br />
|
:style="{ color: item.type === 'error' ? '#F56C6C' : 'var(--el-text-color-regular)' }">
|
||||||
</p>
|
{{ item.log }} <br />
|
||||||
</div>
|
</p>
|
||||||
</el-collapse-item>
|
</div>
|
||||||
<el-collapse-item title="设备通讯校验" name="2">
|
</el-collapse-item>
|
||||||
<div class = "div-log">
|
<el-collapse-item title="设备通讯校验" name="2">
|
||||||
<p v-for="(item, index) in step2InitLog" :key="index" :style="{color:item.type==='error'?'#F56C6C':'var(--el-text-color-regular)'}">
|
<div class="div-log">
|
||||||
{{ item.log }} <br />
|
<p v-for="(item, index) in step2InitLog" :key="index"
|
||||||
</p>
|
:style="{ color: item.type === 'error' ? '#F56C6C' : 'var(--el-text-color-regular)' }">
|
||||||
</div>
|
{{ item.log }} <br />
|
||||||
</el-collapse-item>
|
</p>
|
||||||
<el-collapse-item title="协议校验" name="3">
|
</div>
|
||||||
<div class = "div-log">
|
</el-collapse-item>
|
||||||
<p v-for="(item, index) in step3InitLog" :key="index" :style="{color:item.type==='error'?'#F56C6C':'var(--el-text-color-regular)'}">
|
<el-collapse-item title="协议校验" name="3">
|
||||||
{{ item.log }} <br />
|
<div class="div-log">
|
||||||
</p>
|
<p v-for="(item, index) in step3InitLog" :key="index"
|
||||||
</div>
|
:style="{ color: item.type === 'error' ? '#F56C6C' : 'var(--el-text-color-regular)' }">
|
||||||
</el-collapse-item>
|
{{ item.log }} <br />
|
||||||
<el-collapse-item title="相序校验" name="4">
|
</p>
|
||||||
<div class = "div-log">
|
</div>
|
||||||
<p v-for="(item, index) in step4InitLog" :key="index" :style="{color:item.type==='error'?'#F56C6C':'var(--el-text-color-regular)'}">
|
</el-collapse-item>
|
||||||
{{ item.log }} <br />
|
<el-collapse-item title="相序校验" name="4">
|
||||||
</p>
|
<div class="div-log">
|
||||||
</div>
|
<p v-for="(item, index) in step4InitLog" :key="index"
|
||||||
</el-collapse-item>
|
:style="{ color: item.type === 'error' ? '#F56C6C' : 'var(--el-text-color-regular)' }">
|
||||||
|
{{ item.log }} <br />
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</el-collapse-item>
|
||||||
</el-collapse>
|
</el-collapse>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
<script lang="tsx" setup name="preTest">
|
<script lang="tsx" setup name="preTest">
|
||||||
const step1InitLog = ref([
|
const step1InitLog = ref([
|
||||||
{
|
{
|
||||||
type: 'info',
|
type: 'info',
|
||||||
log:'暂无数据,等待检测开始',
|
log: '暂无数据,等待检测开始',
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
|
|
||||||
const step1Log = ref([
|
const step1Log = ref([
|
||||||
{
|
{
|
||||||
type: 'info',
|
type: 'info',
|
||||||
log:'源通讯校验成功',
|
log: '源通讯校验成功',
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
|
|
||||||
const step2InitLog = ref([
|
const step2InitLog = ref([
|
||||||
{
|
{
|
||||||
type: 'info',
|
type: 'info',
|
||||||
log:'暂无数据,等待检测开始',
|
log: '暂无数据,等待检测开始',
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
|
|
||||||
const step2Log = ref([
|
const step2Log = ref([
|
||||||
{
|
{
|
||||||
type: 'info',
|
type: 'info',
|
||||||
log:'被检设备:240001通讯校验成功',
|
log: '被检设备:240001通讯校验成功',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'info',
|
type: 'info',
|
||||||
log:'被检设备:240002通讯校验成功',
|
log: '被检设备:240002通讯校验成功',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'info',
|
type: 'info',
|
||||||
log:'被检设备:240003通讯校验成功',
|
log: '被检设备:240003通讯校验成功',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'info',
|
type: 'info',
|
||||||
log:'被检设备:240004通讯校验成功',
|
log: '被检设备:240004通讯校验成功',
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
|
|
||||||
const step3InitLog = ref([
|
const step3InitLog = ref([
|
||||||
{
|
{
|
||||||
type: 'info',
|
type: 'info',
|
||||||
log:'暂无数据,等待检测开始',
|
log: '暂无数据,等待检测开始',
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
|
|
||||||
const step3Log = ref([
|
const step3Log = ref([
|
||||||
{
|
{
|
||||||
type: 'info',
|
type: 'info',
|
||||||
log:'被检设备:240001协议校验成功',
|
log: '被检设备:240001协议校验成功',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'info',
|
type: 'info',
|
||||||
log:'被检设备:240002协议校验成功',
|
log: '被检设备:240002协议校验成功',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'info',
|
type: 'info',
|
||||||
log:'被检设备:240003协议校验成功',
|
log: '被检设备:240003协议校验成功',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'info',
|
type: 'info',
|
||||||
log:'被检设备:240004协议校验成功',
|
log: '被检设备:240004协议校验成功',
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
|
|
||||||
@@ -133,26 +132,26 @@ const step3Log = ref([
|
|||||||
const step4InitLog = ref([
|
const step4InitLog = ref([
|
||||||
{
|
{
|
||||||
type: 'info',
|
type: 'info',
|
||||||
log:'暂无数据,等待检测开始',
|
log: '暂无数据,等待检测开始',
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
|
|
||||||
const step4Log = ref([
|
const step4Log = ref([
|
||||||
{
|
{
|
||||||
type: 'info',
|
type: 'info',
|
||||||
log:'被检设备:240001相序校验成功',
|
log: '被检设备:240001相序校验成功',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'info',
|
type: 'info',
|
||||||
log:'被检设备:240002相序校验成功',
|
log: '被检设备:240002相序校验成功',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'info',
|
type: 'info',
|
||||||
log:'被检设备:240003相序校验成功',
|
log: '被检设备:240003相序校验成功',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'info',
|
type: 'info',
|
||||||
log:'被检设备:240004相序校验成功',
|
log: '被检设备:240004相序校验成功',
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
|
|
||||||
@@ -181,16 +180,16 @@ const detectionOptions = ref([
|
|||||||
name: "相序校验",//判断装置的接线是否正确
|
name: "相序校验",//判断装置的接线是否正确
|
||||||
selected: true,
|
selected: true,
|
||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
// id: 4,
|
// id: 4,
|
||||||
// name: "守时校验",//判断装置24小时内的守时误差是否小于1s
|
// name: "守时校验",//判断装置24小时内的守时误差是否小于1s
|
||||||
// selected: true,
|
// selected: true,
|
||||||
// },
|
// },
|
||||||
// {
|
// {
|
||||||
// id: 5,
|
// id: 5,
|
||||||
// name: "通道系数校准",//通过私有协议与装置进行通讯,校准三相电压电流的通道系数
|
// name: "通道系数校准",//通过私有协议与装置进行通讯,校准三相电压电流的通道系数
|
||||||
// selected: true,
|
// selected: true,
|
||||||
// },
|
// },
|
||||||
// {
|
// {
|
||||||
// id: 6,
|
// id: 6,
|
||||||
// name: "实时数据比对",
|
// name: "实时数据比对",
|
||||||
@@ -203,8 +202,8 @@ const detectionOptions = ref([
|
|||||||
|
|
||||||
const currentStepStatus = ref<'error' | 'finish' | 'wait' | 'success' | 'process'>('finish');
|
const currentStepStatus = ref<'error' | 'finish' | 'wait' | 'success' | 'process'>('finish');
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
testStatus: {
|
testStatus: {
|
||||||
type: String,
|
type: String,
|
||||||
default: 'wait'
|
default: 'wait'
|
||||||
}
|
}
|
||||||
@@ -214,54 +213,47 @@ const ts = ref('');
|
|||||||
|
|
||||||
watch(activeIndex, function (newValue, oldValue) {
|
watch(activeIndex, function (newValue, oldValue) {
|
||||||
|
|
||||||
if(activeIndex.value === 1)
|
if (activeIndex.value === 1) {
|
||||||
{
|
|
||||||
step1InitLog.value.length = 0;
|
step1InitLog.value.length = 0;
|
||||||
step1InitLog.value = step1Log.value;
|
step1InitLog.value = step1Log.value;
|
||||||
}
|
}
|
||||||
if(activeIndex.value === 2)
|
if (activeIndex.value === 2) {
|
||||||
{
|
|
||||||
step2InitLog.value.length = 0;
|
step2InitLog.value.length = 0;
|
||||||
step2InitLog.value = step2Log.value;
|
step2InitLog.value = step2Log.value;
|
||||||
}
|
}
|
||||||
if(activeIndex.value === 3)
|
if (activeIndex.value === 3) {
|
||||||
{
|
|
||||||
step3InitLog.value.length = 0;
|
step3InitLog.value.length = 0;
|
||||||
step3InitLog.value = step3Log.value;
|
step3InitLog.value = step3Log.value;
|
||||||
}
|
}
|
||||||
if(activeIndex.value > 3)
|
if (activeIndex.value > 3) {
|
||||||
{
|
|
||||||
step4InitLog.value.length = 0;
|
step4InitLog.value.length = 0;
|
||||||
step4InitLog.value = step4Log.value;
|
step4InitLog.value = step4Log.value;
|
||||||
}
|
}
|
||||||
if(activeIndex.value < activeTotalNum.value - 2)
|
if (activeIndex.value < activeTotalNum.value - 2)
|
||||||
collapseActiveName.value = (newValue+1).toString()
|
collapseActiveName.value = (newValue + 1).toString()
|
||||||
else
|
else
|
||||||
collapseActiveName.value = (activeTotalNum.value - 1).toString()
|
collapseActiveName.value = (activeTotalNum.value - 1).toString()
|
||||||
})
|
})
|
||||||
|
|
||||||
//监听goods_sn的变化
|
//监听goods_sn的变化
|
||||||
watch(testStatus, function (newValue, oldValue) {
|
watch(testStatus, function (newValue, oldValue) {
|
||||||
ts.value = props.testStatus;
|
ts.value = props.testStatus;
|
||||||
if(ts.value==='start')
|
if (ts.value === 'start') {
|
||||||
{
|
|
||||||
ts.value = 'process'
|
ts.value = 'process'
|
||||||
|
|
||||||
let timer = setInterval(() => {
|
let timer = setInterval(() => {
|
||||||
if(activeIndex.value < activeTotalNum.value - 2)
|
if (activeIndex.value < activeTotalNum.value - 2)
|
||||||
activeIndex.value++
|
activeIndex.value++
|
||||||
else if(activeIndex.value === activeTotalNum.value -2)
|
else if (activeIndex.value === activeTotalNum.value - 2) {
|
||||||
{
|
activeIndex.value++
|
||||||
activeIndex.value++
|
activeIndex.value++
|
||||||
activeIndex.value++
|
}
|
||||||
}
|
else {
|
||||||
else
|
clearInterval(timer)
|
||||||
{
|
ts.value = 'success'
|
||||||
clearInterval(timer)
|
}
|
||||||
ts.value = 'success'
|
|
||||||
}
|
}, 1500);
|
||||||
|
|
||||||
}, 1500);
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -269,52 +261,61 @@ const emit = defineEmits(['update:testStatus']);
|
|||||||
//监听sn
|
//监听sn
|
||||||
watch(ts, function (newValue, oldValue) {
|
watch(ts, function (newValue, oldValue) {
|
||||||
//修改父组件
|
//修改父组件
|
||||||
emit('update:testStatus',ts.value)
|
emit('update:testStatus', ts.value)
|
||||||
})
|
})
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
.test-dialog {
|
||||||
|
height: 350px;
|
||||||
|
display: flex;
|
||||||
|
|
||||||
.test-dialog{
|
flex-direction: row;
|
||||||
height: 350px;
|
/* 横向排列 */
|
||||||
display: flex;
|
margin-top: 20px;
|
||||||
|
/* .dialog-left{
|
||||||
flex-direction: row; /* 横向排列 */
|
|
||||||
margin-top: 20px;
|
|
||||||
/* .dialog-left{
|
|
||||||
margin-right: 20px;
|
margin-right: 20px;
|
||||||
} */
|
} */
|
||||||
}
|
}
|
||||||
.dialog-left{
|
|
||||||
width: 15%;
|
|
||||||
margin-left: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* .dialog-left :deep(.test-head-steps){
|
.dialog-left {
|
||||||
|
width: 15%;
|
||||||
|
margin-left: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* .dialog-left :deep(.test-head-steps){
|
||||||
height: 80px;
|
height: 80px;
|
||||||
/* margin-bottom: 10px;
|
/* margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* .dialog-left :deep(.el-step__title) {
|
/* .dialog-left :deep(.el-step__title) {
|
||||||
font-size: 18px !important; /* 设置标题字体大小
|
font-size: 18px !important; /* 设置标题字体大小
|
||||||
} */
|
} */
|
||||||
|
|
||||||
/* .dialog-left :deep(.el-step__icon-inner) {
|
/* .dialog-left :deep(.el-step__icon-inner) {
|
||||||
font-size: 24px !important;
|
font-size: 24px !important;
|
||||||
} */
|
} */
|
||||||
|
|
||||||
.dialog-right{
|
.dialog-right {
|
||||||
margin-left: 20px;
|
margin-left: 20px;
|
||||||
width: 80%;
|
width: 80%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
.dialog-right :deep(.el-collapse-item__header) {
|
|
||||||
font-size: 16px;
|
.dialog-right :deep(.el-collapse-item__header) {
|
||||||
}
|
font-size: 16px;
|
||||||
|
}
|
||||||
.div-log{
|
|
||||||
height: 100px;
|
.div-log {
|
||||||
padding-left: 10px;
|
height: 145px;
|
||||||
}
|
overflow-y: auto;
|
||||||
|
padding-left: 10px;
|
||||||
|
|
||||||
|
p {
|
||||||
|
margin: 5px 0;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -631,6 +631,7 @@ let testType = "test";//检测还是复检
|
|||||||
const handleSelectionChange = (selection: any[]) => {
|
const handleSelectionChange = (selection: any[]) => {
|
||||||
|
|
||||||
devNum = selection.length;
|
devNum = selection.length;
|
||||||
|
devChannelsNum = 0;
|
||||||
for (let i = 0; i < selection.length; i++) {
|
for (let i = 0; i < selection.length; i++) {
|
||||||
devChannelsNum += selection[i].dev_Chns;
|
devChannelsNum += selection[i].dev_Chns;
|
||||||
}
|
}
|
||||||
@@ -923,19 +924,15 @@ const handleTest = (val:string) => {
|
|||||||
},
|
},
|
||||||
)
|
)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
ElMessage.success(val);
|
ElMessage.success('不合格项复检');
|
||||||
dialogTitle.value = val;
|
dialogTitle.value = val;
|
||||||
dialogFormVisible.value = true; // 打开对话框
|
dialogFormVisible.value = true; // 打开对话框
|
||||||
|
})
|
||||||
|
.catch((action: Action) => {
|
||||||
|
ElMessage.success('全部复检');
|
||||||
|
dialogTitle.value = val;
|
||||||
|
dialogFormVisible.value = true; // 打开对话框
|
||||||
})
|
})
|
||||||
// .catch((action: Action) => {
|
|
||||||
// ElMessage({
|
|
||||||
// type: 'info',
|
|
||||||
// message:
|
|
||||||
// action === 'cancel'
|
|
||||||
// ? '以当前数据为主完成数据覆盖'
|
|
||||||
// : '取消本次导入操作',
|
|
||||||
// })
|
|
||||||
// })
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -966,7 +963,7 @@ const handleTest = (val:string) => {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if(val==='归档')
|
if(val==='批量归档')
|
||||||
{
|
{
|
||||||
const loading = ElLoading.service({
|
const loading = ElLoading.service({
|
||||||
lock: true,
|
lock: true,
|
||||||
@@ -975,7 +972,7 @@ const handleTest = (val:string) => {
|
|||||||
})
|
})
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
loading.close()
|
loading.close()
|
||||||
ElMessage.success("批量归档成功");
|
ElMessage.success("归档成功");
|
||||||
}, 2000)
|
}, 2000)
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -3,11 +3,11 @@
|
|||||||
<div class = "test-dialog">
|
<div class = "test-dialog">
|
||||||
<div class="dialog-left">
|
<div class="dialog-left">
|
||||||
<el-steps direction="vertical" :active="activeIndex" :process-status="currentStepStatus" finish-status="success">
|
<el-steps direction="vertical" :active="activeIndex" :process-status="currentStepStatus" finish-status="success">
|
||||||
<el-step title="开始检测" description="2018-04-12 20:46"/>
|
<el-step title="开始检测" :description="startTime"/>
|
||||||
<el-step title="GPS完成上送" description="2018-04-12 20:46"/>
|
<el-step title="GPS完成上送" :description="gpsTime"/>
|
||||||
<el-step title="设备开始上送时刻" description="2018-04-12 20:46"/>
|
<el-step title="设备开始上送时刻" :description="devStartTime"/>
|
||||||
<el-step title="设备最晚上送时刻" description="2018-04-12 20:46"/>
|
<el-step title="设备最晚上送时刻" :description="devEndTime"/>
|
||||||
<el-step title="检测完成" description="2018-04-12 20:46"/>
|
<el-step title="检测完成" :description="finishTime"/>
|
||||||
</el-steps>
|
</el-steps>
|
||||||
<!-- <el-timeline style="max-width: 600px">
|
<!-- <el-timeline style="max-width: 600px">
|
||||||
<el-timeline-item
|
<el-timeline-item
|
||||||
@@ -33,7 +33,17 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="right-content">
|
<div class="right-content">
|
||||||
<el-table :data="deviceOperatorData" stripe :header-cell-style="{ textAlign: 'center' } " :cell-style="{ textAlign: 'center' }" style="width: 100%" border>
|
<ProTable
|
||||||
|
ref='proTable'
|
||||||
|
:pagination = 'false'
|
||||||
|
:toolButton = 'false'
|
||||||
|
:columns='columns'
|
||||||
|
:data='deviceOperatorData'
|
||||||
|
stripe :header-cell-style="{ textAlign: 'center' } " :cell-style="{ textAlign: 'center' }" style="width: 100%; height:390px" border
|
||||||
|
>
|
||||||
|
</ProTable>
|
||||||
|
|
||||||
|
<!-- <el-table :data="deviceOperatorData" stripe :header-cell-style="{ textAlign: 'center' } " :cell-style="{ textAlign: 'center' }" style="width: 100%" border>
|
||||||
<el-table-column prop="deviceName" label="设备名" />
|
<el-table-column prop="deviceName" label="设备名" />
|
||||||
<el-table-column prop="updataTime" label="上送时刻" />
|
<el-table-column prop="updataTime" label="上送时刻" />
|
||||||
<el-table-column prop="ErrorValue" label="守时误差(ms)" />
|
<el-table-column prop="ErrorValue" label="守时误差(ms)" />
|
||||||
@@ -42,7 +52,7 @@
|
|||||||
<el-tag :type="scope.row.Result === '合格' ? 'success' : 'danger'">{{ scope.row.Result }}</el-tag>
|
<el-tag :type="scope.row.Result === '合格' ? 'success' : 'danger'">{{ scope.row.Result }}</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -54,6 +64,11 @@ import { SuccessFilled } from '@element-plus/icons-vue'
|
|||||||
|
|
||||||
const activeIndex = ref(0)
|
const activeIndex = ref(0)
|
||||||
const activeTotalNum = ref(5)
|
const activeTotalNum = ref(5)
|
||||||
|
const startTime = ref('')
|
||||||
|
const gpsTime = ref('')
|
||||||
|
const devStartTime = ref('')
|
||||||
|
const devEndTime = ref('')
|
||||||
|
const finishTime = ref('')
|
||||||
|
|
||||||
interface Activity {
|
interface Activity {
|
||||||
content: string;
|
content: string;
|
||||||
@@ -72,25 +87,25 @@ const activities = ref<Activity[]>([
|
|||||||
|
|
||||||
const deviceOperatorData = ref([
|
const deviceOperatorData = ref([
|
||||||
{
|
{
|
||||||
deviceName: '被检设备1',
|
deviceName: '240001',
|
||||||
updataTime: '—',
|
updataTime: '—',
|
||||||
ErrorValue:'—',
|
ErrorValue:'—',
|
||||||
Result: '—',
|
Result: '—',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
deviceName: '被检设备2',
|
deviceName: '240002',
|
||||||
updataTime: '—',
|
updataTime: '—',
|
||||||
ErrorValue:'—',
|
ErrorValue:'—',
|
||||||
Result: '—',
|
Result: '—',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
deviceName: '被检设备3',
|
deviceName: '240003',
|
||||||
updataTime: '—',
|
updataTime: '—',
|
||||||
ErrorValue:'—',
|
ErrorValue:'—',
|
||||||
Result: '—',
|
Result: '—',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
deviceName: '被检设备4',
|
deviceName: '240004',
|
||||||
updataTime: '—',
|
updataTime: '—',
|
||||||
ErrorValue:'—',
|
ErrorValue:'—',
|
||||||
Result: '—',
|
Result: '—',
|
||||||
@@ -99,26 +114,26 @@ const deviceOperatorData = ref([
|
|||||||
|
|
||||||
const deviceData = ref([
|
const deviceData = ref([
|
||||||
{
|
{
|
||||||
deviceName: '被检设备1',
|
deviceName: '240001',
|
||||||
updataTime: '10:30:08.136',
|
updataTime: '2024-12-05 10:30:08.136',
|
||||||
ErrorValue:'148',
|
ErrorValue:'148',
|
||||||
Result: '合格',
|
Result: '合格',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
deviceName: '被检设备2',
|
deviceName: '240002',
|
||||||
updataTime: '10:30:08.136',
|
updataTime: '2024-12-05 10:30:08.136',
|
||||||
ErrorValue:'136',
|
ErrorValue:'136',
|
||||||
Result: '合格',
|
Result: '合格',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
deviceName: '被检设备3',
|
deviceName: '240003',
|
||||||
updataTime: '10:30:09.006',
|
updataTime: '2024-12-05 10:30:09.006',
|
||||||
ErrorValue:'1006',
|
ErrorValue:'1006',
|
||||||
Result: '不合格',
|
Result: '不合格',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
deviceName: '被检设备4',
|
deviceName: '240004',
|
||||||
updataTime: '10:30:08.736',
|
updataTime: '2024-12-05 10:30:08.736',
|
||||||
ErrorValue:'736',
|
ErrorValue:'736',
|
||||||
Result: '合格',
|
Result: '合格',
|
||||||
},
|
},
|
||||||
@@ -133,6 +148,44 @@ const currentStepStatus = ref<'error' | 'finish' | 'wait' | 'success' | 'process
|
|||||||
})
|
})
|
||||||
const testStatus = toRef(props, 'testStatus');
|
const testStatus = toRef(props, 'testStatus');
|
||||||
const ts = ref('');
|
const ts = ref('');
|
||||||
|
|
||||||
|
// 表格配置项
|
||||||
|
const columns = reactive([
|
||||||
|
{ type: 'index', fixed: 'left', width: 70, label: '序号' },
|
||||||
|
{
|
||||||
|
prop: 'deviceName',
|
||||||
|
label: '设备名称',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'updataTime',
|
||||||
|
label: '上送时刻',
|
||||||
|
width: 230,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'ErrorValue',
|
||||||
|
label: '守时误差',
|
||||||
|
width: 100,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'Result',
|
||||||
|
label: '检测结果',
|
||||||
|
width: 100,
|
||||||
|
render: (scope) => {
|
||||||
|
if(scope.row.Result === '不合格')
|
||||||
|
{
|
||||||
|
return (
|
||||||
|
<el-tag type='danger'>{ scope.row.Result }</el-tag>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return (
|
||||||
|
<span>{ scope.row.Result }</span>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
])
|
||||||
//监听testStatus的变化
|
//监听testStatus的变化
|
||||||
watch(testStatus, function (newValue, oldValue) {
|
watch(testStatus, function (newValue, oldValue) {
|
||||||
ts.value = props.testStatus;
|
ts.value = props.testStatus;
|
||||||
@@ -156,58 +209,77 @@ watch(testStatus, function (newValue, oldValue) {
|
|||||||
}, 1000);
|
}, 1000);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
function formatDateTime(date) {
|
||||||
|
const year = date.getFullYear();
|
||||||
|
const month = String(date.getMonth() + 1).padStart(2, '0');
|
||||||
|
const day = String(date.getDate()).padStart(2, '0');
|
||||||
|
const hours = String(date.getHours()).padStart(2, '0');
|
||||||
|
const minutes = String(date.getMinutes()).padStart(2, '0');
|
||||||
|
const seconds = String(date.getSeconds()).padStart(2, '0');
|
||||||
|
const milliseconds = String(date.getMilliseconds()).padStart(3, '0');
|
||||||
|
|
||||||
|
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}.${milliseconds}`;
|
||||||
|
}
|
||||||
|
|
||||||
watch(activeIndex, function (newValue, oldValue) {
|
watch(activeIndex, function (newValue, oldValue) {
|
||||||
|
|
||||||
if(activeIndex.value === 1)
|
if(activeIndex.value === 1)
|
||||||
{
|
{
|
||||||
activities.value.length = 0;
|
startTime.value = formatDateTime(new Date());
|
||||||
activities.value.push({
|
|
||||||
content: '开始检测',
|
// activities.value.length = 0;
|
||||||
timestamp: '2018-04-12 20:46',
|
// activities.value.push({
|
||||||
size: 'large',
|
// content: '开始检测',
|
||||||
color: '#0bbd87',
|
// timestamp: '2018-04-12 20:46',
|
||||||
icon: SuccessFilled,
|
// size: 'large',
|
||||||
});
|
// color: '#0bbd87',
|
||||||
|
// icon: SuccessFilled,
|
||||||
|
// });
|
||||||
}
|
}
|
||||||
if(activeIndex.value === 2)
|
if(activeIndex.value === 2)
|
||||||
{
|
{
|
||||||
activities.value.push({
|
gpsTime.value = formatDateTime(new Date());
|
||||||
content: 'GPS上送时刻',
|
// activities.value.push({
|
||||||
timestamp: '2018-04-03 20:46',
|
// content: 'GPS上送时刻',
|
||||||
color: '#0bbd87',
|
// timestamp: '2018-04-03 20:46',
|
||||||
icon: SuccessFilled,
|
// color: '#0bbd87',
|
||||||
size: 'large',
|
// icon: SuccessFilled,
|
||||||
});
|
// size: 'large',
|
||||||
|
// });
|
||||||
}
|
}
|
||||||
if(activeIndex.value === 3)
|
if(activeIndex.value === 3)
|
||||||
{
|
{
|
||||||
activities.value.push({
|
// activities.value.push({
|
||||||
content: '设备最早上送时刻',
|
// content: '设备最早上送时刻',
|
||||||
timestamp: '2018-04-03 20:46',
|
// timestamp: '2018-04-03 20:46',
|
||||||
color: '#0bbd87',
|
// color: '#0bbd87',
|
||||||
icon: SuccessFilled,
|
// icon: SuccessFilled,
|
||||||
size: 'large',
|
// size: 'large',
|
||||||
});
|
// });
|
||||||
|
devStartTime.value = formatDateTime(new Date());
|
||||||
deviceOperatorData.value.length = 0;
|
deviceOperatorData.value.length = 0;
|
||||||
deviceOperatorData.value = deviceData.value;
|
deviceOperatorData.value = deviceData.value;
|
||||||
}
|
}
|
||||||
if(activeIndex.value > 3)
|
if(activeIndex.value > 3)
|
||||||
{
|
{
|
||||||
activities.value.push({
|
devEndTime.value = formatDateTime(new Date());
|
||||||
content: '设备最晚上送时刻',
|
finishTime.value = formatDateTime(new Date());
|
||||||
timestamp: '2018-04-03 20:46',
|
|
||||||
color: '#0bbd87',
|
// activities.value.push({
|
||||||
icon: SuccessFilled,
|
// content: '设备最晚上送时刻',
|
||||||
size: 'large',
|
// timestamp: '2018-04-03 20:46',
|
||||||
});
|
// color: '#0bbd87',
|
||||||
activities.value.push({
|
// icon: SuccessFilled,
|
||||||
content: '检测结束',
|
// size: 'large',
|
||||||
timestamp: '2018-04-03 20:46',
|
// });
|
||||||
color: '#0bbd87',
|
// activities.value.push({
|
||||||
icon: SuccessFilled,
|
// content: '检测结束',
|
||||||
size: 'large',
|
// timestamp: '2018-04-03 20:46',
|
||||||
});
|
// color: '#0bbd87',
|
||||||
|
// icon: SuccessFilled,
|
||||||
|
// size: 'large',
|
||||||
|
// });
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
const emit = defineEmits(['update:testStatus']);
|
const emit = defineEmits(['update:testStatus']);
|
||||||
@@ -224,8 +296,9 @@ watch(ts, function (newValue, oldValue) {
|
|||||||
display: flex;
|
display: flex;
|
||||||
|
|
||||||
flex-direction: row; /* 横向排列 */
|
flex-direction: row; /* 横向排列 */
|
||||||
margin-top: 20px;
|
/* margin-top: 20px; */
|
||||||
min-height: 300px;
|
/* min-height: 300px; */
|
||||||
|
height: 472px;
|
||||||
/* .dialog-left{
|
/* .dialog-left{
|
||||||
margin-right: 20px;
|
margin-right: 20px;
|
||||||
} */
|
} */
|
||||||
|
|||||||
@@ -353,9 +353,9 @@ const resizeObserver = new ResizeObserver(entries => {
|
|||||||
chartsWidth.value = entry.contentRect.width;
|
chartsWidth.value = entry.contentRect.width;
|
||||||
console.log('Charts Info Width:', chartsWidth.value);
|
console.log('Charts Info Width:', chartsWidth.value);
|
||||||
|
|
||||||
pieRef1.value.reSize(chartsWidth.value * 0.95,145,true);
|
pieRef1.value.reSize(chartsWidth.value * 0.95,180,true);
|
||||||
pieRef2.value.reSize(chartsWidth.value * 0.95,145,true);
|
pieRef2.value.reSize(chartsWidth.value * 0.95,180,true);
|
||||||
pieRef3.value.reSize(chartsWidth.value * 0.95,145,true);
|
pieRef3.value.reSize(chartsWidth.value * 0.95,180,true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -631,4 +631,12 @@ onUnmounted(() => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
:deep(.el-collapse-item__conten){
|
||||||
|
// background-color:#f6f6f6;
|
||||||
|
padding-bottom: 0px !important;
|
||||||
|
}
|
||||||
|
:deep(.el-collapse-item__content ){
|
||||||
|
// background-color:#f6f6f6;
|
||||||
|
padding-bottom: 0px !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ const columns = reactive<ColumnProps<Device.ResPqDev>[]>([
|
|||||||
{ type: 'index', fixed: 'left', width: 70, label: '序号' },
|
{ type: 'index', fixed: 'left', width: 70, label: '序号' },
|
||||||
{
|
{
|
||||||
prop: 'name',
|
prop: 'name',
|
||||||
label: '设备名称',
|
label: '名称',
|
||||||
search: { el: 'input' },
|
search: { el: 'input' },
|
||||||
minWidth: 200,
|
minWidth: 200,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ const columns = ref<ColumnProps<ErrorSystem.ErrorSystemList>[]>([
|
|||||||
{ type: 'index', fixed: 'left', width: 70, label: '序号' },
|
{ type: 'index', fixed: 'left', width: 70, label: '序号' },
|
||||||
{
|
{
|
||||||
prop: 'name',
|
prop: 'name',
|
||||||
label: '误差体系名称',
|
label: '名称',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'standardName',
|
prop: 'standardName',
|
||||||
|
|||||||
@@ -83,8 +83,8 @@ function useMetaInfo() {
|
|||||||
const formContent = reactive<TestSource.ParameterType>({
|
const formContent = reactive<TestSource.ParameterType>({
|
||||||
id: "",
|
id: "",
|
||||||
sourceParamType: "",
|
sourceParamType: "",
|
||||||
sourceParamDesc: "",
|
|
||||||
sourceParamValue: "",
|
sourceParamValue: "",
|
||||||
|
sourceParamDesc: "",
|
||||||
sort: 100,
|
sort: 100,
|
||||||
pId: "0",
|
pId: "0",
|
||||||
})
|
})
|
||||||
@@ -115,8 +115,8 @@ const resetFormContent = () => {
|
|||||||
Object.assign(formContent, {
|
Object.assign(formContent, {
|
||||||
id: "",
|
id: "",
|
||||||
sourceParamType: "",
|
sourceParamType: "",
|
||||||
sourceParamDesc: "",
|
|
||||||
sourceParamValue: "",
|
sourceParamValue: "",
|
||||||
|
sourceParamDesc: "",
|
||||||
sort: 100,
|
sort: 100,
|
||||||
pId: "0",
|
pId: "0",
|
||||||
})
|
})
|
||||||
@@ -140,7 +140,6 @@ const save = () => {
|
|||||||
let newUpdateParameter = toRaw({...formContent})
|
let newUpdateParameter = toRaw({...formContent})
|
||||||
delete newUpdateParameter.children
|
delete newUpdateParameter.children
|
||||||
emit('get-parameter', newUpdateParameter)
|
emit('get-parameter', newUpdateParameter)
|
||||||
ElMessage.success({message: `${dialogTitle.value}成功!`})
|
|
||||||
close()
|
close()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -193,6 +193,10 @@ const copyRow = (row) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const getParameter = (data: TestSource.ParameterType) => {
|
const getParameter = (data: TestSource.ParameterType) => {
|
||||||
|
if (originalParameterArr.some(item => item.sourceParamType == data.sourceParamType)) {
|
||||||
|
ElMessage.error({message: '参数类型已存在!'})
|
||||||
|
return;
|
||||||
|
}
|
||||||
let index = originalParameterArr.findIndex(item => item.id === data.id)
|
let index = originalParameterArr.findIndex(item => item.id === data.id)
|
||||||
|
|
||||||
|
|
||||||
@@ -200,9 +204,11 @@ const getParameter = (data: TestSource.ParameterType) => {
|
|||||||
data.id = generateUUID()
|
data.id = generateUUID()
|
||||||
// 新增
|
// 新增
|
||||||
originalParameterArr.push(data)
|
originalParameterArr.push(data)
|
||||||
|
ElMessage.success({message: '新增成功!'})
|
||||||
} else {
|
} else {
|
||||||
// 编辑
|
// 编辑
|
||||||
originalParameterArr[index] = data
|
originalParameterArr[index] = data
|
||||||
|
ElMessage.success({message: '编辑成功!'})
|
||||||
}
|
}
|
||||||
emit('change-parameter', originalParameterArr)
|
emit('change-parameter', originalParameterArr)
|
||||||
tableData.value = getTreeData(originalParameterArr)
|
tableData.value = getTreeData(originalParameterArr)
|
||||||
@@ -210,7 +216,6 @@ const getParameter = (data: TestSource.ParameterType) => {
|
|||||||
|
|
||||||
//清空数据
|
//清空数据
|
||||||
const clearData = () => {
|
const clearData = () => {
|
||||||
//console.log('clearData')
|
|
||||||
originalParameterArr = []
|
originalParameterArr = []
|
||||||
tableData.value = []
|
tableData.value = []
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user