Merge branch 'master' of http://192.168.1.22:3000/frontend/pqs-9100_client
This commit is contained in:
@@ -32,175 +32,200 @@ const errordata = ref<ErrorSystem.ErrorSystemList[]>([
|
||||
|
||||
const errordetail = ref<ErrorSystem.Error_detail[]>([
|
||||
{
|
||||
measured: '电压偏差',
|
||||
col1: '电压偏差',
|
||||
col2: '电压偏差',
|
||||
deviceLevel: 'A',
|
||||
measurementType:'电压',
|
||||
condition: '10%~150%标称电压',
|
||||
maxErrorValue: '±0.1%Un'
|
||||
},
|
||||
{
|
||||
measured: '频率偏差',
|
||||
col1:'频率偏差',
|
||||
col2: '频率偏差',
|
||||
deviceLevel: 'A',
|
||||
measurementType:'频率',
|
||||
condition: '42.5~57.5 Hz',
|
||||
maxErrorValue: '±0.01Hz'
|
||||
},
|
||||
{
|
||||
measured: '三相不平衡度',
|
||||
col1:'三相不平衡度',
|
||||
col2: '三相不平衡度',
|
||||
deviceLevel: 'A',
|
||||
measurementType:'电压',
|
||||
condition: '0.5%~5%',
|
||||
maxErrorValue: '±0.15%'
|
||||
},
|
||||
{
|
||||
measured: '三相不平衡度',
|
||||
col1:'三相不平衡度',
|
||||
col2: '三相不平衡度',
|
||||
deviceLevel: 'A',
|
||||
measurementType:'电压',
|
||||
condition: '5%(不包含)~ 40%',
|
||||
maxErrorValue: '±0.3%'
|
||||
},
|
||||
{
|
||||
measured: '三相不平衡度',
|
||||
col1:'三相不平衡度',
|
||||
col2: '三相不平衡度',
|
||||
deviceLevel: 'A',
|
||||
measurementType:'电流',
|
||||
condition: '',
|
||||
maxErrorValue: '±1%'
|
||||
},
|
||||
{
|
||||
measured: '电压波动/电压幅值',
|
||||
col1:'电压波动',
|
||||
col2: '电压幅值',
|
||||
deviceLevel: 'A',
|
||||
measurementType:'电压',
|
||||
condition: '',
|
||||
maxErrorValue: '±0.2%Un'
|
||||
},
|
||||
{
|
||||
measured: '电压波动/持续时间',
|
||||
col1:'电压波动',
|
||||
col2: '持续时间',
|
||||
deviceLevel: 'A',
|
||||
measurementType:'时间',
|
||||
condition: '',
|
||||
maxErrorValue: '±1周波'
|
||||
},
|
||||
{
|
||||
measured: '闪变',
|
||||
col1:'闪变',
|
||||
col2: '闪变',
|
||||
deviceLevel: 'A',
|
||||
measurementType:'短时间闪变',
|
||||
condition: 'Pst:0.2~10',
|
||||
maxErrorValue: '±5%'
|
||||
},
|
||||
{
|
||||
measured: '谐波和间谐波',
|
||||
col1:'谐波和间谐波',
|
||||
col2: '谐波和间谐波',
|
||||
deviceLevel: 'A',
|
||||
measurementType:'电压',
|
||||
condition: 'Uh≥1%Un',
|
||||
maxErrorValue: '±5%Uh'
|
||||
},
|
||||
{
|
||||
measured: '谐波和间谐波',
|
||||
col1:'谐波和间谐波',
|
||||
col2: '谐波和间谐波',
|
||||
deviceLevel: 'A',
|
||||
measurementType:'电压',
|
||||
condition: 'Uh<1%Un',
|
||||
maxErrorValue: '±0.05%Un'
|
||||
},
|
||||
{
|
||||
measured: '谐波和间谐波',
|
||||
col1:'谐波和间谐波',
|
||||
col2: '谐波和间谐波',
|
||||
deviceLevel: 'A',
|
||||
measurementType:'电流',
|
||||
condition: 'In≥3%In',
|
||||
maxErrorValue: '±5%Ih'
|
||||
},
|
||||
{
|
||||
measured: '谐波和间谐波',
|
||||
col1:'谐波和间谐波',
|
||||
col2: '谐波和间谐波',
|
||||
deviceLevel: 'A',
|
||||
measurementType:'电流',
|
||||
condition: 'In<3%In',
|
||||
maxErrorValue: '±0.15%In'
|
||||
},
|
||||
{
|
||||
measured: '谐波和间谐波',
|
||||
col1:'谐波和间谐波',
|
||||
col2: '谐波和间谐波',
|
||||
deviceLevel: 'A',
|
||||
measurementType:'相角',
|
||||
condition: '',
|
||||
maxErrorValue: 'h≤5,±1°*h'
|
||||
},
|
||||
{
|
||||
measured: '谐波和间谐波',
|
||||
col1:'谐波和间谐波',
|
||||
col2: '谐波和间谐波',
|
||||
deviceLevel: 'A',
|
||||
measurementType:'相角',
|
||||
condition: '',
|
||||
maxErrorValue: 'h>5,±5°'
|
||||
},
|
||||
{
|
||||
measured: '谐波和间谐波',
|
||||
col1:'谐波和间谐波',
|
||||
col2: '谐波和间谐波',
|
||||
deviceLevel: 'A',
|
||||
measurementType:'功率',
|
||||
condition: 'Ph≥150W',
|
||||
maxErrorValue: '±1%Ph'
|
||||
},
|
||||
{
|
||||
measured: '谐波和间谐波',
|
||||
col1:'谐波和间谐波',
|
||||
col2: '谐波和间谐波',
|
||||
deviceLevel: 'A',
|
||||
measurementType:'功率',
|
||||
condition: 'Ph<150W',
|
||||
maxErrorValue: '±1.5W'
|
||||
},
|
||||
{
|
||||
measured: '高频次谐波',
|
||||
col1:'高频次谐波',
|
||||
col2: '高频次谐波',
|
||||
deviceLevel: 'A',
|
||||
measurementType:'电压',
|
||||
condition: 'Uh≥1%Un',
|
||||
maxErrorValue: '±5%Uh'
|
||||
},
|
||||
{
|
||||
measured: '高频次谐波',
|
||||
col1:'高频次谐波',
|
||||
col2: '高频次谐波',
|
||||
deviceLevel: 'A',
|
||||
measurementType:'电压',
|
||||
condition: 'Uh<1%Un',
|
||||
maxErrorValue: '±0.05%Un'
|
||||
},
|
||||
{
|
||||
measured: '高频次谐波',
|
||||
col1:'高频次谐波',
|
||||
col2: '高频次谐波',
|
||||
deviceLevel: 'A',
|
||||
measurementType:'电流',
|
||||
condition: 'In≥3%In',
|
||||
maxErrorValue: '±5%Ih'
|
||||
},
|
||||
{
|
||||
measured: '高频次谐波',
|
||||
col1:'高频次谐波',
|
||||
col2: '高频次谐波',
|
||||
deviceLevel: 'A',
|
||||
measurementType:'电流',
|
||||
condition: 'In<3%In',
|
||||
maxErrorValue: '±0.15%In'
|
||||
},
|
||||
{
|
||||
measured: '功率',
|
||||
col1:'功率',
|
||||
col2: '功率',
|
||||
deviceLevel: 'A',
|
||||
measurementType:'功率',
|
||||
condition: '',
|
||||
maxErrorValue: '±0.5%'
|
||||
},
|
||||
{
|
||||
measured: '电流',
|
||||
col1:'电流',
|
||||
col2: '电流',
|
||||
deviceLevel: 'A',
|
||||
measurementType:'电流',
|
||||
condition: 'I≥0.05In',
|
||||
maxErrorValue: '±0.5%'
|
||||
},
|
||||
{
|
||||
measured: '电流',
|
||||
col1:'电流',
|
||||
col2: '电流',
|
||||
deviceLevel: 'A',
|
||||
measurementType:'电流',
|
||||
condition: '0.01In≤I<0.05In',
|
||||
maxErrorValue: '±1%'
|
||||
},
|
||||
{
|
||||
measured: '电压暂降、电压暂升和短时中断/电压幅值',
|
||||
col1: '电压暂降、电压暂升和短时中断',
|
||||
col2: '电压幅值',
|
||||
deviceLevel: 'A',
|
||||
measurementType:'电压',
|
||||
condition: '',
|
||||
maxErrorValue: '±0.2%Un'
|
||||
},
|
||||
{
|
||||
measured: '电压暂降、电压暂升和短时中断/持续时间',
|
||||
col1: '电压暂降、电压暂升和短时中断',
|
||||
col2: '持续时间',
|
||||
deviceLevel: 'A',
|
||||
measurementType:'时间',
|
||||
condition: '',
|
||||
|
||||
@@ -15,7 +15,7 @@ export namespace TestSource {
|
||||
// 检测源接口
|
||||
export interface ResTestSource {
|
||||
id: string; //检测源ID
|
||||
name: string; //检测源名称(检测源类型 + 设备类型 + 数字自动生成)
|
||||
name?: string; //检测源名称(检测源类型 + 设备类型 + 数字自动生成)
|
||||
pattern: string;//检测源模式(字典表Code字段,数字、模拟、比对)
|
||||
type: string; //检测源类型(字典表Code字段,标准源、高精度设备)
|
||||
devType: string;//检测源设备类型(字典表Code字段)
|
||||
|
||||
@@ -116,10 +116,10 @@ export namespace Dict {
|
||||
storeFlag?:string ;//sts、di的是否存储 1:存储 0:不存 储;
|
||||
curSts?:number | null;//sts、do的当前值;
|
||||
ctlSts?:number;//do的是否可远程控制 1:是 0:否;
|
||||
maxNum?:number ;//设置最大值
|
||||
minNum?: number;//设置最小值
|
||||
maxNum?:number | null;//设置最大值
|
||||
minNum?: number| null;//设置最小值
|
||||
setValue?:string | null;//参数为enum可设置的所有值序列
|
||||
strlen?:number ;//参数string可设置字符串的长度上 限
|
||||
strlen?:number | null;//参数string可设置字符串的长度上 限
|
||||
defaultValue?:string | null; //参数缺省值、告警code值
|
||||
resourcesId?:string ; //报表数据来源(统计表表名)
|
||||
limitName?:string | null; //限值字段名称
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
/>
|
||||
|
||||
<!-- 表格主体 -->
|
||||
<div class='card table-main'>
|
||||
<div class='table-main' :class='{ card: showCard }' >
|
||||
<!-- 表格头部 操作按钮 -->
|
||||
<div class='table-header'>
|
||||
<div class='header-button-lf'>
|
||||
@@ -126,6 +126,7 @@ export interface ProTableProps {
|
||||
requestError?: (params: any) => void; // 表格 api 请求错误监听 ==> 非必传
|
||||
dataCallback?: (data: any) => any; // 返回数据的回调函数,可以对数据进行处理 ==> 非必传
|
||||
title?: string; // 表格标题 ==> 非必传
|
||||
showCard?: boolean; // 下个是否需要卡片
|
||||
pagination?: boolean; // 是否需要分页组件 ==> 非必传(默认为true)
|
||||
initParam?: any; // 初始化请求参数 ==> 非必传(默认为{})
|
||||
border?: boolean; // 是否带有纵向边框 ==> 非必传(默认为true)
|
||||
@@ -141,6 +142,7 @@ const props = withDefaults(defineProps<ProTableProps>(), {
|
||||
pagination: true,
|
||||
initParam: {},
|
||||
border: true,
|
||||
showCard: true,
|
||||
toolButton: true,
|
||||
rowKey: 'id',
|
||||
searchCol: () => ({ xs: 1, sm: 2, md: 2, lg: 3, xl: 4 }),
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class='icon-box'>
|
||||
<div class='icon-box' >
|
||||
<el-input
|
||||
ref='inputRef'
|
||||
v-model='valueIcon'
|
||||
@@ -13,7 +13,7 @@
|
||||
<el-button :icon='customIcons[iconValue]' />
|
||||
</template>
|
||||
</el-input>
|
||||
<el-dialog v-model='dialogVisible' :title='placeholder' top='50px' width='66%'>
|
||||
<el-dialog v-model='dialogVisible' :title='placeholder' top='5%' width='30%' >
|
||||
<el-input v-model='inputValue' placeholder='搜索图标' size='large' :prefix-icon='Icons.Search' />
|
||||
<el-scrollbar v-if='Object.keys(iconsList).length'>
|
||||
<div class='icon-list'>
|
||||
|
||||
@@ -18,13 +18,13 @@
|
||||
<!-- </el-button> -->
|
||||
<template #dropdown>
|
||||
<el-dropdown-menu>
|
||||
<el-dropdown-item @click="title = '模拟式模块'"
|
||||
<el-dropdown-item @click="handelOpen('模拟式')"
|
||||
>模拟式模块</el-dropdown-item
|
||||
>
|
||||
<el-dropdown-item @click="title = '数字式模块'"
|
||||
<el-dropdown-item @click="handelOpen('数字式')"
|
||||
>数字式模块</el-dropdown-item
|
||||
>
|
||||
<el-dropdown-item @click="title = '比对式模块'"
|
||||
<el-dropdown-item @click="handelOpen('比对式')"
|
||||
>比对式模块</el-dropdown-item
|
||||
>
|
||||
</el-dropdown-menu>
|
||||
@@ -39,13 +39,16 @@
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { ref, reactive, computed, onMounted, watch } from "vue";
|
||||
const title = ref("模拟式模块");
|
||||
import { useAuthStore } from "@/stores/modules/auth";
|
||||
import { useModeStore } from '@/stores/modules/mode'; // 引入模式 store
|
||||
|
||||
import { useRouter } from "vue-router";
|
||||
const title = ref("模拟式模块");
|
||||
const router = useRouter();
|
||||
const authStore = useAuthStore();
|
||||
const modeStore = useModeStore();
|
||||
watch(() => modeStore.currentMode, (newVal) => {
|
||||
//console.log('当前模式:', newVal);
|
||||
switch (newVal) {
|
||||
|
||||
onMounted(() => {
|
||||
switch (modeStore.currentMode) {
|
||||
case '模拟式':
|
||||
title.value = '模拟式模块';
|
||||
break;
|
||||
@@ -59,6 +62,13 @@ watch(() => modeStore.currentMode, (newVal) => {
|
||||
title.value = '模拟式模块';
|
||||
}
|
||||
});
|
||||
|
||||
const handelOpen = async (item: string) => {
|
||||
await authStore.setShowMenu();
|
||||
modeStore.setCurrentMode(item); // 将模式code存入 store
|
||||
router.push({ path: "/home/index" });
|
||||
};
|
||||
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
@import "./index.scss";
|
||||
|
||||
@@ -500,6 +500,18 @@
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.el-message-box__headerbtn{
|
||||
top: 5px;
|
||||
}
|
||||
.el-message-box__close{
|
||||
svg{
|
||||
color: #fff;
|
||||
}
|
||||
:hover{
|
||||
color: #409eff;
|
||||
}
|
||||
}
|
||||
.el-message-box__content{
|
||||
padding: 10px ;
|
||||
border-bottom: 1px solid #cccccc;
|
||||
@@ -507,4 +519,60 @@
|
||||
.el-message-box__btns {
|
||||
|
||||
padding: 10px;}
|
||||
}
|
||||
}
|
||||
|
||||
.form-one {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
.el-form-item {
|
||||
display: flex;
|
||||
width: 98%;
|
||||
margin-bottom: 15px !important;
|
||||
.el-form-item__content {
|
||||
flex: 1;
|
||||
.el-select,
|
||||
.el-cascader,
|
||||
.el-input__inner,
|
||||
.el-date-editor {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.form-two {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
.el-form-item {
|
||||
display: flex;
|
||||
width: 48%;
|
||||
.el-form-item__content {
|
||||
flex: 1;
|
||||
.el-select,
|
||||
.el-cascader,
|
||||
.el-input__inner,
|
||||
.el-date-editor {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.form-three {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
// justify-content: space-between;
|
||||
.el-form-item {
|
||||
display: flex;
|
||||
width: 32.3%;
|
||||
.el-form-item__content {
|
||||
flex: 1;
|
||||
.el-select,
|
||||
.el-cascader,
|
||||
.el-input__inner,
|
||||
.el-date-editor {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<el-dialog :title="dialogTitle" :model-value="dialogVisible" @close="close" v-bind="dialogMiddle">
|
||||
<el-form :model="formContent" ref='dialogFormRef' :rules='rules' >
|
||||
<el-form :model="formContent" ref='dialogFormRef' :rules='rules' class="form-two">
|
||||
<el-form-item label="上级菜单" prop="pid" :label-width="100">
|
||||
<el-tree-select
|
||||
v-model="displayPid"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<!-- 基础信息弹出框 -->
|
||||
<el-dialog v-model='dialogVisible' :title="dialogTitle" v-bind="dialogSmall" @close="close">
|
||||
<el-dialog v-model='dialogVisible' :title="dialogTitle" v-bind="dialogSmall" @close="close" >
|
||||
<div>
|
||||
<el-form :model="formContent"
|
||||
ref='dialogFormRef'
|
||||
|
||||
@@ -1,279 +1,283 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class = "test-dialog">
|
||||
<div class="test-dialog">
|
||||
|
||||
<div class="dialog-content">
|
||||
<div class="dialog-content">
|
||||
|
||||
<div class="right-title">
|
||||
<div class="right-title">
|
||||
<!-- <div>系数校准表</div> -->
|
||||
<div>当前源输出为:Ua=Ub=Uc=57.74V Ia=Ib=Ic=1A; 电压误差为:±0.1Un%; 电流误差为:±0.5%</div>
|
||||
<div>
|
||||
<el-button type="primary" loading v-if="activeIndex > 0 && activeIndex < activeTotalNum">通道系数已校准3台/共3台</el-button>
|
||||
<el-button type="primary" :disabled="true" v-if="activeIndex === activeTotalNum">通道系数已校准3台/共3台</el-button>
|
||||
<span style=" font-size: 18px;font-weight: 600;">
|
||||
设备已合格 <span style="color: #67C23A">{{ qualified }}</span> 台/共 <span style="color: green">{{ total }}</span>
|
||||
台
|
||||
</span>
|
||||
<!-- <el-button type="primary" loading
|
||||
v-if="activeIndex > 0 && activeIndex < activeTotalNum">通道系数已校准3台/共3台</el-button>
|
||||
<el-button type="primary" :disabled="true" v-if="activeIndex === activeTotalNum">通道系数已校准3台/共3台</el-button> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="right-content">
|
||||
<el-tabs type="border-card">
|
||||
<el-empty description="暂无数据,等待检测开始" v-if="activeIndex === 0"/>
|
||||
<el-tab-pane label="被检设备1" v-if="activeIndex > 0">
|
||||
<channelsTestTable
|
||||
:tableData="tableData1"
|
||||
></channelsTestTable>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="被检设备2" v-if="activeIndex > 1 ">
|
||||
<template #label>
|
||||
<span class="custom-tabs-label">
|
||||
<span>被检设备2</span>
|
||||
<el-icon><Failed /></el-icon>
|
||||
</span>
|
||||
</template>
|
||||
<channelsTestTable
|
||||
:tableData="tableData2"></channelsTestTable>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="被检设备3" v-if="activeIndex > 2 ">
|
||||
<channelsTestTable
|
||||
:tableData="tableData3"></channelsTestTable>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
<div class="right-content">
|
||||
<el-tabs type="border-card">
|
||||
<el-empty description="暂无数据,等待检测开始" v-if="activeIndex === 0" />
|
||||
<el-tab-pane label="被检设备1" v-if="activeIndex > 0">
|
||||
<channelsTestTable :tableData="tableData1"></channelsTestTable>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="被检设备2" v-if="activeIndex > 1">
|
||||
<template #label>
|
||||
<span class="custom-tabs-label">
|
||||
<span>被检设备2</span>
|
||||
<el-icon>
|
||||
<Failed />
|
||||
</el-icon>
|
||||
</span>
|
||||
</template>
|
||||
<channelsTestTable :tableData="tableData2"></channelsTestTable>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="被检设备3" v-if="activeIndex > 2">
|
||||
<channelsTestTable :tableData="tableData3"></channelsTestTable>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
<script lang="tsx" setup name="channelsTest">
|
||||
import { SuccessFilled,Failed } from '@element-plus/icons-vue'
|
||||
import { SuccessFilled, Failed } from '@element-plus/icons-vue'
|
||||
|
||||
const activeIndex = ref(0)
|
||||
const activeTotalNum = ref(3)
|
||||
|
||||
const qualified = ref(0)
|
||||
const total = ref(0)
|
||||
|
||||
const activities = [
|
||||
{
|
||||
content: '开始检测',
|
||||
timestamp: '2018-04-12 20:46',
|
||||
size: 'large',
|
||||
color: '#0bbd87',
|
||||
icon: SuccessFilled,
|
||||
},
|
||||
{
|
||||
content: 'GPS上送时刻',
|
||||
timestamp: '2018-04-03 20:46',
|
||||
hollow: true,
|
||||
},
|
||||
{
|
||||
content: '设备最早上送时刻',
|
||||
timestamp: '2018-04-03 20:46',
|
||||
hollow: true,
|
||||
},
|
||||
{
|
||||
content: '设备最晚上送时刻',
|
||||
timestamp: '2018-04-03 20:46',
|
||||
hollow: true,
|
||||
},
|
||||
{
|
||||
content: '检测结束',
|
||||
timestamp: '2018-04-03 20:46',
|
||||
hollow: true,
|
||||
},
|
||||
{
|
||||
content: '开始检测',
|
||||
timestamp: '2018-04-12 20:46',
|
||||
size: 'large',
|
||||
color: '#0bbd87',
|
||||
icon: SuccessFilled,
|
||||
},
|
||||
{
|
||||
content: 'GPS上送时刻',
|
||||
timestamp: '2018-04-03 20:46',
|
||||
hollow: true,
|
||||
},
|
||||
{
|
||||
content: '设备最早上送时刻',
|
||||
timestamp: '2018-04-03 20:46',
|
||||
hollow: true,
|
||||
},
|
||||
{
|
||||
content: '设备最晚上送时刻',
|
||||
timestamp: '2018-04-03 20:46',
|
||||
hollow: true,
|
||||
},
|
||||
{
|
||||
content: '检测结束',
|
||||
timestamp: '2018-04-03 20:46',
|
||||
hollow: true,
|
||||
},
|
||||
]
|
||||
const tableData1 = ref([
|
||||
{
|
||||
id: '1',
|
||||
updateTime: '2024-10-10 10:30:00',
|
||||
deviceName:'被检设备1',
|
||||
MonitorIdx: 1,
|
||||
Ua:1.0003,
|
||||
Ub:1.0003,
|
||||
Uc:0.0096,
|
||||
Ia:1.0003,
|
||||
Ib:1.0003,
|
||||
Ic:1.0008,
|
||||
Result: '合格',
|
||||
},
|
||||
{
|
||||
id: '2',
|
||||
updateTime: '2024-10-10 10:30:00',
|
||||
deviceName:'被检设备1',
|
||||
MonitorIdx: 2,
|
||||
Ua:1.0003,
|
||||
Ub:1.0003,
|
||||
Uc:0.0096,
|
||||
Ia:1.0003,
|
||||
Ib:1.0003,
|
||||
Ic:1.0008,
|
||||
Result: '合格',
|
||||
},
|
||||
{
|
||||
id: '3',
|
||||
updateTime: '2024-10-10 10:30:00',
|
||||
deviceName:'被检设备1',
|
||||
MonitorIdx: 3,
|
||||
Ua:1.0003,
|
||||
Ub:1.0003,
|
||||
Uc:0.0096,
|
||||
Ia:1.0003,
|
||||
Ib:1.0003,
|
||||
Ic:1.0008,
|
||||
Result: '合格',
|
||||
},
|
||||
{
|
||||
id: '4',
|
||||
updateTime: '2024-10-10 10:30:00',
|
||||
deviceName:'被检设备1',
|
||||
MonitorIdx: 4,
|
||||
Ua:1.0003,
|
||||
Ub:1.0003,
|
||||
Uc:0.0096,
|
||||
Ia:1.0003,
|
||||
Ib:1.0003,
|
||||
Ic:1.0008,
|
||||
Result: '合格',
|
||||
},
|
||||
])
|
||||
const tableData2 = ref([
|
||||
{
|
||||
id: '1',
|
||||
updateTime: '2024-10-10 10:30:00',
|
||||
deviceName:'被检设备2',
|
||||
MonitorIdx: 1,
|
||||
Ua:1.0003,
|
||||
Ub:1.0003,
|
||||
Uc:0.0096,
|
||||
Ia:1.0003,
|
||||
Ib:1.0003,
|
||||
Ic:1.0008,
|
||||
Result: '合格',
|
||||
},
|
||||
{
|
||||
id: '2',
|
||||
updateTime: '2024-10-10 10:30:00',
|
||||
deviceName:'被检设备2',
|
||||
MonitorIdx: 2,
|
||||
Ua:1.0003,
|
||||
Ub:1.0003,
|
||||
Uc:0.0096,
|
||||
Ia:1.0003,
|
||||
Ib:1.0003,
|
||||
Ic:1.0008,
|
||||
Result: '不合格',
|
||||
},
|
||||
{
|
||||
id: '3',
|
||||
updateTime: '2024-10-10 10:30:00',
|
||||
deviceName:'被检设备2',
|
||||
MonitorIdx: 3,
|
||||
Ua:1.0003,
|
||||
Ub:1.0003,
|
||||
Uc:0.0096,
|
||||
Ia:1.0003,
|
||||
Ib:1.0003,
|
||||
Ic:1.0008,
|
||||
Result: '合格',
|
||||
},
|
||||
{
|
||||
id: '4',
|
||||
updateTime: '2024-10-10 10:30:00',
|
||||
deviceName:'被检设备2',
|
||||
MonitorIdx: 4,
|
||||
Ua:1.0003,
|
||||
Ub:1.0003,
|
||||
Uc:0.0096,
|
||||
Ia:1.0003,
|
||||
Ib:1.0003,
|
||||
Ic:1.0008,
|
||||
Result: '不合格',
|
||||
},
|
||||
])
|
||||
const tableData3 = ref([
|
||||
{
|
||||
id: '1',
|
||||
updateTime: '2024-10-10 10:30:00',
|
||||
deviceName:'被检设备3',
|
||||
MonitorIdx: 1,
|
||||
Ua:1.0003,
|
||||
Ub:1.0003,
|
||||
Uc:0.0096,
|
||||
Ia:1.0003,
|
||||
Ib:1.0003,
|
||||
Ic:1.0008,
|
||||
Result: '合格',
|
||||
},
|
||||
{
|
||||
id: '2',
|
||||
updateTime: '2024-10-10 10:30:00',
|
||||
deviceName:'被检设备3',
|
||||
MonitorIdx: 2,
|
||||
Ua:1.0003,
|
||||
Ub:1.0003,
|
||||
Uc:0.0096,
|
||||
Ia:1.0003,
|
||||
Ib:1.0003,
|
||||
Ic:1.0008,
|
||||
Result: '合格',
|
||||
},
|
||||
{
|
||||
id: '3',
|
||||
updateTime: '2024-10-10 10:30:00',
|
||||
deviceName:'被检设备3',
|
||||
MonitorIdx: 3,
|
||||
Ua:1.0003,
|
||||
Ub:1.0003,
|
||||
Uc:0.0096,
|
||||
Ia:1.0003,
|
||||
Ib:1.0003,
|
||||
Ic:1.0008,
|
||||
Result: '合格',
|
||||
},
|
||||
{
|
||||
id: '4',
|
||||
updateTime: '2024-10-10 10:30:00',
|
||||
deviceName:'被检设备3',
|
||||
MonitorIdx: 4,
|
||||
Ua:1.0003,
|
||||
Ub:1.0003,
|
||||
Uc:0.0096,
|
||||
Ia:1.0003,
|
||||
Ib:1.0003,
|
||||
Ic:1.0008,
|
||||
Result: '合格',
|
||||
},
|
||||
])
|
||||
{
|
||||
id: '1',
|
||||
updateTime: '2024-10-10 10:30:00',
|
||||
deviceName: '被检设备1',
|
||||
MonitorIdx: 1,
|
||||
Ua: 1.0003,
|
||||
Ub: 1.0003,
|
||||
Uc: 0.0096,
|
||||
Ia: 1.0003,
|
||||
Ib: 1.0003,
|
||||
Ic: 1.0008,
|
||||
Result: '合格',
|
||||
},
|
||||
{
|
||||
id: '2',
|
||||
updateTime: '2024-10-10 10:30:00',
|
||||
deviceName: '被检设备1',
|
||||
MonitorIdx: 2,
|
||||
Ua: 1.0003,
|
||||
Ub: 1.0003,
|
||||
Uc: 0.0096,
|
||||
Ia: 1.0003,
|
||||
Ib: 1.0003,
|
||||
Ic: 1.0008,
|
||||
Result: '合格',
|
||||
},
|
||||
{
|
||||
id: '3',
|
||||
updateTime: '2024-10-10 10:30:00',
|
||||
deviceName: '被检设备1',
|
||||
MonitorIdx: 3,
|
||||
Ua: 1.0003,
|
||||
Ub: 1.0003,
|
||||
Uc: 0.0096,
|
||||
Ia: 1.0003,
|
||||
Ib: 1.0003,
|
||||
Ic: 1.0008,
|
||||
Result: '合格',
|
||||
},
|
||||
{
|
||||
id: '4',
|
||||
updateTime: '2024-10-10 10:30:00',
|
||||
deviceName: '被检设备1',
|
||||
MonitorIdx: 4,
|
||||
Ua: 1.0003,
|
||||
Ub: 1.0003,
|
||||
Uc: 0.0096,
|
||||
Ia: 1.0003,
|
||||
Ib: 1.0003,
|
||||
Ic: 1.0008,
|
||||
Result: '合格',
|
||||
},
|
||||
])
|
||||
const tableData2 = ref([
|
||||
{
|
||||
id: '1',
|
||||
updateTime: '2024-10-10 10:30:00',
|
||||
deviceName: '被检设备2',
|
||||
MonitorIdx: 1,
|
||||
Ua: 1.0003,
|
||||
Ub: 1.0003,
|
||||
Uc: 0.0096,
|
||||
Ia: 1.0003,
|
||||
Ib: 1.0003,
|
||||
Ic: 1.0008,
|
||||
Result: '合格',
|
||||
},
|
||||
{
|
||||
id: '2',
|
||||
updateTime: '2024-10-10 10:30:00',
|
||||
deviceName: '被检设备2',
|
||||
MonitorIdx: 2,
|
||||
Ua: 1.0003,
|
||||
Ub: 1.0003,
|
||||
Uc: 0.0096,
|
||||
Ia: 1.0003,
|
||||
Ib: 1.0003,
|
||||
Ic: 1.0008,
|
||||
Result: '不合格',
|
||||
},
|
||||
{
|
||||
id: '3',
|
||||
updateTime: '2024-10-10 10:30:00',
|
||||
deviceName: '被检设备2',
|
||||
MonitorIdx: 3,
|
||||
Ua: 1.0003,
|
||||
Ub: 1.0003,
|
||||
Uc: 0.0096,
|
||||
Ia: 1.0003,
|
||||
Ib: 1.0003,
|
||||
Ic: 1.0008,
|
||||
Result: '合格',
|
||||
},
|
||||
{
|
||||
id: '4',
|
||||
updateTime: '2024-10-10 10:30:00',
|
||||
deviceName: '被检设备2',
|
||||
MonitorIdx: 4,
|
||||
Ua: 1.0003,
|
||||
Ub: 1.0003,
|
||||
Uc: 0.0096,
|
||||
Ia: 1.0003,
|
||||
Ib: 1.0003,
|
||||
Ic: 1.0008,
|
||||
Result: '不合格',
|
||||
},
|
||||
])
|
||||
const tableData3 = ref([
|
||||
{
|
||||
id: '1',
|
||||
updateTime: '2024-10-10 10:30:00',
|
||||
deviceName: '被检设备3',
|
||||
MonitorIdx: 1,
|
||||
Ua: 1.0003,
|
||||
Ub: 1.0003,
|
||||
Uc: 0.0096,
|
||||
Ia: 1.0003,
|
||||
Ib: 1.0003,
|
||||
Ic: 1.0008,
|
||||
Result: '合格',
|
||||
},
|
||||
{
|
||||
id: '2',
|
||||
updateTime: '2024-10-10 10:30:00',
|
||||
deviceName: '被检设备3',
|
||||
MonitorIdx: 2,
|
||||
Ua: 1.0003,
|
||||
Ub: 1.0003,
|
||||
Uc: 0.0096,
|
||||
Ia: 1.0003,
|
||||
Ib: 1.0003,
|
||||
Ic: 1.0008,
|
||||
Result: '合格',
|
||||
},
|
||||
{
|
||||
id: '3',
|
||||
updateTime: '2024-10-10 10:30:00',
|
||||
deviceName: '被检设备3',
|
||||
MonitorIdx: 3,
|
||||
Ua: 1.0003,
|
||||
Ub: 1.0003,
|
||||
Uc: 0.0096,
|
||||
Ia: 1.0003,
|
||||
Ib: 1.0003,
|
||||
Ic: 1.0008,
|
||||
Result: '合格',
|
||||
},
|
||||
{
|
||||
id: '4',
|
||||
updateTime: '2024-10-10 10:30:00',
|
||||
deviceName: '被检设备3',
|
||||
MonitorIdx: 4,
|
||||
Ua: 1.0003,
|
||||
Ub: 1.0003,
|
||||
Uc: 0.0096,
|
||||
Ia: 1.0003,
|
||||
Ib: 1.0003,
|
||||
Ic: 1.0008,
|
||||
Result: '合格',
|
||||
},
|
||||
])
|
||||
const currentStepStatus = ref<'error' | 'finish' | 'wait' | 'success' | 'process'>('finish');
|
||||
|
||||
const props = defineProps({
|
||||
testStatus: {
|
||||
type: String,
|
||||
default: 'wait'
|
||||
}
|
||||
type: String,
|
||||
default: 'wait'
|
||||
}
|
||||
})
|
||||
const testStatus = toRef(props, 'testStatus');
|
||||
const ts = ref('');
|
||||
//监听goods_sn的变化
|
||||
watch(testStatus, function (newValue, oldValue) {
|
||||
ts.value = props.testStatus;
|
||||
if(ts.value==='start')
|
||||
{
|
||||
ts.value = 'process'
|
||||
ts.value = props.testStatus;
|
||||
if (ts.value === 'start') {
|
||||
ts.value = 'process'
|
||||
|
||||
let timer = setInterval(() => {
|
||||
if(activeIndex.value < activeTotalNum.value)
|
||||
activeIndex.value++
|
||||
else if(activeIndex.value === activeTotalNum.value)
|
||||
{
|
||||
clearInterval(timer)
|
||||
ts.value = 'success'
|
||||
let timer = setInterval(() => {
|
||||
if (activeIndex.value < activeTotalNum.value) {
|
||||
activeIndex.value++
|
||||
qualified.value = activeIndex.value
|
||||
}
|
||||
else
|
||||
{
|
||||
clearInterval(timer)
|
||||
ts.value = 'success'
|
||||
else if (activeIndex.value === activeTotalNum.value) {
|
||||
clearInterval(timer)
|
||||
ts.value = 'success'
|
||||
}
|
||||
|
||||
}, 1000);
|
||||
}
|
||||
else {
|
||||
clearInterval(timer)
|
||||
ts.value = 'success'
|
||||
}
|
||||
|
||||
total.value = activeTotalNum.value
|
||||
}, 1000);
|
||||
}
|
||||
})
|
||||
// watch(activeIndex, function (newValue, oldValue) {
|
||||
|
||||
@@ -333,33 +337,41 @@ if(ts.value==='start')
|
||||
const emit = defineEmits(['update:testStatus']);
|
||||
//监听sn
|
||||
watch(ts, function (newValue, oldValue) {
|
||||
//修改父组件
|
||||
emit('update:testStatus',ts.value)
|
||||
//修改父组件
|
||||
emit('update:testStatus', ts.value)
|
||||
})
|
||||
|
||||
</script>
|
||||
<style scoped>
|
||||
.right-title{
|
||||
display: flex;
|
||||
flex-direction: row; /* 横向排列 */
|
||||
justify-content: space-between;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.right-content{
|
||||
/* max-height: 400px; */
|
||||
}
|
||||
.right-title {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
/* 横向排列 */
|
||||
justify-content: space-between;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.custom-tabs-label .el-icon {
|
||||
.right-content {
|
||||
/* max-height: 400px; */
|
||||
}
|
||||
|
||||
.custom-tabs-label .el-icon {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.custom-tabs-label span {
|
||||
vertical-align: middle;
|
||||
margin-left: 4px;
|
||||
}
|
||||
.dialog-content{
|
||||
|
||||
.dialog-content {
|
||||
height: 472px;
|
||||
}
|
||||
|
||||
.el-tabs--border-card {
|
||||
height: 435px;
|
||||
height: 425px;
|
||||
}
|
||||
.el-icon svg {
|
||||
color: #ff7171;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<template>
|
||||
|
||||
<div class="table-container">
|
||||
<div class="table-container table-main">
|
||||
<el-table :data="tableData" :header-cell-style="{ textAlign: 'center' } " :cell-style="{ textAlign: 'center' }" style="width: 100%" >
|
||||
|
||||
<el-table-column prop="id" label="序号" width="70" />
|
||||
<el-table-column prop="updateTime" label="上送时刻" />
|
||||
<el-table-column prop="deviceName" label="设备名称" />
|
||||
<el-table-column prop="updateTime" label="上送时刻" width="180"/>
|
||||
<!-- <el-table-column prop="deviceName" label="设备名称" /> -->
|
||||
<el-table-column prop="MonitorIdx" label="监测点序号" />
|
||||
|
||||
<el-table-column label="电压通道" >
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -2,30 +2,20 @@
|
||||
<el-dialog title="数据查询" :model-value='visible' @close="handleCancel" width="1065px" draggable>
|
||||
<div class="data-check-dialog">
|
||||
<div class="data-check-title">
|
||||
<el-form :model='formContent'>
|
||||
<el-row :gutter="24" >
|
||||
<el-col :span="8">
|
||||
<el-form :model='formContent' label-width="auto" class="form-three ">
|
||||
<el-form-item label="检测脚本:" >
|
||||
<el-input v-model='testScriptName' :disabled="true"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="误差体系:" >
|
||||
<el-input v-model='errorSysName' :disabled="true"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="数据处理原则:" >
|
||||
<el-input v-model='dataRule' :disabled="true"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24" >
|
||||
<el-col :span="8">
|
||||
<el-form-item label="设备名称:" >
|
||||
<el-input v-model='deviceName' :disabled="true"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<!-- <el-col :span="8">
|
||||
<el-form-item label='复检次数:'>
|
||||
<el-select v-model="reCheckIdx">
|
||||
@@ -38,7 +28,6 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col> -->
|
||||
<el-col :span="8">
|
||||
<el-form-item label='通道号:'>
|
||||
<el-select v-model="monitorIdx">
|
||||
<el-option
|
||||
@@ -49,8 +38,6 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<div class="data-check-content">
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
|
||||
<div class="table-container">
|
||||
<el-table :data="tableData" stripe :header-cell-style="{ textAlign: 'center' } " :cell-style="{ textAlign: 'center' }" height="310px" style="width: 100%" >
|
||||
<div class="table-container table-main">
|
||||
<el-table :data="tableData" stripe border :header-cell-style="{ textAlign: 'center' } " :cell-style="{ textAlign: 'center' }" height="310px" style="width: 100%" >
|
||||
<el-table-column prop="id" label="序号" width="70" />
|
||||
<el-table-column prop="updateTime" label="数据时间" />
|
||||
<el-table-column prop="L1" label="L1(V)" />
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<template>
|
||||
|
||||
<div class="table-container">
|
||||
<div class="table-container table-main">
|
||||
|
||||
<el-table :data="tableData" max-height="300" :header-cell-style="{ textAlign: 'center' } " :cell-style="{ textAlign: 'center' }" style="width: 100%" >
|
||||
<el-table :data="tableData" height="310px" :header-cell-style="{ textAlign: 'center' } " :cell-style="{ textAlign: 'center' }" style="width: 100%" >
|
||||
|
||||
<el-table-column prop="id" label="序号" width="70" />
|
||||
<el-table-column prop="standardValue" label="标准值(V)" />
|
||||
@@ -102,7 +102,7 @@ text-align: center; /* 所有单元格文字居中 */
|
||||
}
|
||||
|
||||
.table-container {
|
||||
max-height: 400px; /* 根据需要调整高度 */
|
||||
/* max-height: 400px; */
|
||||
overflow-y: auto; /* 允许垂直滚动 */
|
||||
overflow-x: hidden; /* 隐藏水平滚动条 */
|
||||
}
|
||||
|
||||
@@ -40,8 +40,8 @@
|
||||
<!-- v-on:cell-click="handleClick" -->
|
||||
<!-- <el-table :key="tableKey" :data="tableData" :row-class-name="tableRowClassName" row-key="id" height="545px" :header-cell-style="{ background: '#003078', color: '#eee', textAlign: 'center' } " :cell-style="{ textAlign: 'center' }" style="width: 100%" border> -->
|
||||
<!-- <el-table :data="tableData" :row-class-name="tableRowClassName" row-key="id" height="545px" :header-cell-style="{ background: '#003078', color: '#eee', textAlign: 'center' } " style="width: 100%" border> -->
|
||||
<div class="dialog-content">
|
||||
<el-table :data="tableData" :cell-class-name="tableCell" row-key="id" height="545px" :header-cell-style="{ background: '#003078', color: '#eee', textAlign: 'center' } " style="width: 100%" border>
|
||||
<div class="dialog-content ">
|
||||
<el-table :data="tableData" :cell-class-name="tableCell" row-key="id" height="450px" :header-cell-style="{ background: '#003078', color: '#eee', textAlign: 'center' } " style="width: 100%" border>
|
||||
<el-table-column fixed prop="scriptItemName" label="检测项目" width="250px">
|
||||
<!-- <template #default="scope">
|
||||
<div :style="{ backgroundColor: '#003078' }">
|
||||
@@ -226,8 +226,8 @@
|
||||
</el-table-column> -->
|
||||
</el-table>
|
||||
</div>
|
||||
<div >
|
||||
<el-collapse model-value="0" accordion>
|
||||
<div style="height: 98px;">
|
||||
<el-collapse model-value="1" accordion>
|
||||
<el-collapse-item title="检测日志:" name="1">
|
||||
<div ref="scrollContainer" class="dialog-log">
|
||||
<p v-for="(item, index) in testLogList" :key="index" :style="{color:item.type==='error'?'#F56C6C':'var(--el-text-color-regular)'}">
|
||||
@@ -1925,7 +1925,7 @@ watch(ts, function (newValue, oldValue) {
|
||||
margin-bottom:10px;
|
||||
}
|
||||
.dialog-content{
|
||||
max-height: 545px;
|
||||
max-height: 450px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
@@ -1939,3 +1939,12 @@ watch(ts, function (newValue, oldValue) {
|
||||
|
||||
|
||||
</style>
|
||||
<style lang="scss" scoped>
|
||||
:deep(.el-button--small) {
|
||||
height: 20px !important;
|
||||
width: 20px !important;
|
||||
}
|
||||
:deep(.el-table--default td ){
|
||||
padding: 5px 0 !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class = "test-dialog">
|
||||
<div class="dialog-left">
|
||||
<el-steps direction="vertical" :active="activeIndex" :process-status="currentStepStatus" finish-status="success">
|
||||
<el-step title="开始检测" :description="startTime"/>
|
||||
<el-step title="GPS完成上送" :description="gpsTime"/>
|
||||
<el-step title="设备开始上送时刻" :description="devStartTime"/>
|
||||
<el-step title="设备最晚上送时刻" :description="devEndTime"/>
|
||||
<el-step title="检测完成" :description="finishTime"/>
|
||||
</el-steps>
|
||||
<div>
|
||||
<div class="test-dialog">
|
||||
<div class="dialog-left">
|
||||
<el-steps direction="vertical" :active="activeIndex" :process-status="currentStepStatus"
|
||||
finish-status="success">
|
||||
<el-step title="开始检测" :description="startTime" />
|
||||
<el-step title="GPS完成上送" :description="gpsTime" />
|
||||
<el-step title="设备开始上送时刻" :description="devStartTime" />
|
||||
<el-step title="设备最晚上送时刻" :description="devEndTime" />
|
||||
<el-step title="检测完成" :description="finishTime" />
|
||||
</el-steps>
|
||||
<!-- <el-timeline style="max-width: 600px">
|
||||
<el-timeline-item
|
||||
v-for="(activity, index) in activities"
|
||||
@@ -23,27 +24,26 @@
|
||||
{{ activity.content }}
|
||||
</el-timeline-item>
|
||||
</el-timeline> -->
|
||||
</div>
|
||||
<div class="dialog-right">
|
||||
<div class="right-title">
|
||||
<!-- <div>设备上送时刻表</div> -->
|
||||
<div>
|
||||
<el-button type="primary" loading v-if="activeIndex > 0 && activeIndex < activeTotalNum">设备已合格3台/共4台</el-button>
|
||||
<el-button type="primary" disabled="true" v-if="activeIndex === activeTotalNum">设备已合格3台/共4台</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dialog-right">
|
||||
<div class="right-title">
|
||||
<!-- <div>设备上送时刻表</div> -->
|
||||
<span style=" font-size: 18px;font-weight: 600;">
|
||||
设备已合格 <span style="color: #67C23A">{{ qualified }}</span> 台/共 <span style="color: green">4</span> 台
|
||||
</span>
|
||||
<div>
|
||||
<!-- <el-button type="primary" loading v-if="activeIndex > 0 && activeIndex < activeTotalNum">设备已合格3台/共4台</el-button>
|
||||
<el-button type="primary" disabled="true" v-if="activeIndex === activeTotalNum">设备已合格3台/共4台</el-button> -->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="right-content">
|
||||
<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 ref='proTable' :pagination='false' :toolButton='false' :showCard='false' :columns='columns'
|
||||
:data='deviceOperatorData' stripe :header-cell-style="{ textAlign: 'center' }"
|
||||
:cell-style="{ textAlign: 'center' }" style="width: 100%; height:435px" border>
|
||||
</ProTable>
|
||||
|
||||
<!-- <el-table :data="deviceOperatorData" stripe :header-cell-style="{ textAlign: 'center' } " :cell-style="{ textAlign: 'center' }" style="width: 100%" border>
|
||||
<!-- <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="updataTime" label="上送时刻" />
|
||||
<el-table-column prop="ErrorValue" label="守时误差(ms)" />
|
||||
@@ -51,12 +51,12 @@
|
||||
<template #default="scope">
|
||||
<el-tag :type="scope.row.Result === '合格' ? 'success' : 'danger'">{{ scope.row.Result }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table> -->
|
||||
</el-table-column>
|
||||
</el-table> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
<script lang="tsx" setup name="timeTest">
|
||||
@@ -78,6 +78,7 @@ interface Activity {
|
||||
color?: string;
|
||||
icon?: any;
|
||||
}
|
||||
const qualified = ref(0)
|
||||
const activities = ref<Activity[]>([
|
||||
{
|
||||
content: '开始检测',
|
||||
@@ -86,62 +87,62 @@ const activities = ref<Activity[]>([
|
||||
|
||||
|
||||
const deviceOperatorData = ref([
|
||||
{
|
||||
deviceName: '240001',
|
||||
updataTime: '—',
|
||||
ErrorValue:'—',
|
||||
Result: '—',
|
||||
},
|
||||
{
|
||||
deviceName: '240002',
|
||||
updataTime: '—',
|
||||
ErrorValue:'—',
|
||||
Result: '—',
|
||||
},
|
||||
{
|
||||
deviceName: '240003',
|
||||
updataTime: '—',
|
||||
ErrorValue:'—',
|
||||
Result: '—',
|
||||
},
|
||||
{
|
||||
deviceName: '240004',
|
||||
updataTime: '—',
|
||||
ErrorValue:'—',
|
||||
Result: '—',
|
||||
},
|
||||
])
|
||||
{
|
||||
deviceName: '240001',
|
||||
updataTime: '—',
|
||||
ErrorValue: '—',
|
||||
Result: '—',
|
||||
},
|
||||
{
|
||||
deviceName: '240002',
|
||||
updataTime: '—',
|
||||
ErrorValue: '—',
|
||||
Result: '—',
|
||||
},
|
||||
{
|
||||
deviceName: '240003',
|
||||
updataTime: '—',
|
||||
ErrorValue: '—',
|
||||
Result: '—',
|
||||
},
|
||||
{
|
||||
deviceName: '240004',
|
||||
updataTime: '—',
|
||||
ErrorValue: '—',
|
||||
Result: '—',
|
||||
},
|
||||
])
|
||||
|
||||
const deviceData = ref([
|
||||
{
|
||||
deviceName: '240001',
|
||||
updataTime: '2024-12-05 10:30:08.136',
|
||||
ErrorValue:'148',
|
||||
Result: '合格',
|
||||
},
|
||||
{
|
||||
deviceName: '240002',
|
||||
updataTime: '2024-12-05 10:30:08.136',
|
||||
ErrorValue:'136',
|
||||
Result: '合格',
|
||||
},
|
||||
{
|
||||
deviceName: '240003',
|
||||
updataTime: '2024-12-05 10:30:09.006',
|
||||
ErrorValue:'1006',
|
||||
Result: '不合格',
|
||||
},
|
||||
{
|
||||
deviceName: '240004',
|
||||
updataTime: '2024-12-05 10:30:08.736',
|
||||
ErrorValue:'736',
|
||||
Result: '合格',
|
||||
},
|
||||
])
|
||||
const deviceData = ref([
|
||||
{
|
||||
deviceName: '240001',
|
||||
updataTime: '2024-12-05 10:30:08.136',
|
||||
ErrorValue: '148',
|
||||
Result: '合格',
|
||||
},
|
||||
{
|
||||
deviceName: '240002',
|
||||
updataTime: '2024-12-05 10:30:08.136',
|
||||
ErrorValue: '136',
|
||||
Result: '合格',
|
||||
},
|
||||
{
|
||||
deviceName: '240003',
|
||||
updataTime: '2024-12-05 10:30:09.006',
|
||||
ErrorValue: '1006',
|
||||
Result: '不合格',
|
||||
},
|
||||
{
|
||||
deviceName: '240004',
|
||||
updataTime: '2024-12-05 10:30:08.736',
|
||||
ErrorValue: '736',
|
||||
Result: '合格',
|
||||
},
|
||||
])
|
||||
const currentStepStatus = ref<'error' | 'finish' | 'wait' | 'success' | 'process'>('finish');
|
||||
|
||||
const props = defineProps({
|
||||
testStatus: {
|
||||
const props = defineProps({
|
||||
testStatus: {
|
||||
type: String,
|
||||
default: 'wait'
|
||||
}
|
||||
@@ -171,42 +172,37 @@ const columns = reactive([
|
||||
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>
|
||||
)
|
||||
}
|
||||
},
|
||||
if (scope.row.Result === '不合格') {
|
||||
return (
|
||||
<el-tag type='danger'>{scope.row.Result}</el-tag>
|
||||
)
|
||||
}
|
||||
else {
|
||||
return (
|
||||
<span>{scope.row.Result}</span>
|
||||
)
|
||||
}
|
||||
},
|
||||
},
|
||||
])
|
||||
//监听testStatus的变化
|
||||
watch(testStatus, function (newValue, oldValue) {
|
||||
ts.value = props.testStatus;
|
||||
if(ts.value==='start')
|
||||
{
|
||||
if (ts.value === 'start') {
|
||||
ts.value = 'process'
|
||||
|
||||
let timer = setInterval(() => {
|
||||
if(activeIndex.value < activeTotalNum.value - 2)
|
||||
activeIndex.value++
|
||||
else if(activeIndex.value === activeTotalNum.value -2)
|
||||
{
|
||||
activeIndex.value++
|
||||
activeIndex.value++
|
||||
}
|
||||
else
|
||||
{
|
||||
clearInterval(timer)
|
||||
ts.value = 'success'
|
||||
}
|
||||
}, 1000);
|
||||
if (activeIndex.value < activeTotalNum.value - 2)
|
||||
activeIndex.value++
|
||||
else if (activeIndex.value === activeTotalNum.value - 2) {
|
||||
activeIndex.value++
|
||||
activeIndex.value++
|
||||
}
|
||||
else {
|
||||
clearInterval(timer)
|
||||
ts.value = 'success'
|
||||
}
|
||||
}, 1000);
|
||||
}
|
||||
})
|
||||
|
||||
@@ -224,101 +220,105 @@ function formatDateTime(date) {
|
||||
|
||||
watch(activeIndex, function (newValue, oldValue) {
|
||||
|
||||
if(activeIndex.value === 1)
|
||||
{
|
||||
startTime.value = formatDateTime(new Date());
|
||||
if (activeIndex.value === 1) {
|
||||
startTime.value = formatDateTime(new Date());
|
||||
|
||||
// activities.value.length = 0;
|
||||
// activities.value.push({
|
||||
// content: '开始检测',
|
||||
// timestamp: '2018-04-12 20:46',
|
||||
// size: 'large',
|
||||
// color: '#0bbd87',
|
||||
// icon: SuccessFilled,
|
||||
// });
|
||||
}
|
||||
if(activeIndex.value === 2)
|
||||
{
|
||||
gpsTime.value = formatDateTime(new Date());
|
||||
// activities.value.push({
|
||||
// content: 'GPS上送时刻',
|
||||
// timestamp: '2018-04-03 20:46',
|
||||
// color: '#0bbd87',
|
||||
// icon: SuccessFilled,
|
||||
// size: 'large',
|
||||
// });
|
||||
}
|
||||
if(activeIndex.value === 3)
|
||||
{
|
||||
// activities.value.push({
|
||||
// content: '设备最早上送时刻',
|
||||
// timestamp: '2018-04-03 20:46',
|
||||
// color: '#0bbd87',
|
||||
// icon: SuccessFilled,
|
||||
// size: 'large',
|
||||
// });
|
||||
devStartTime.value = formatDateTime(new Date());
|
||||
deviceOperatorData.value.length = 0;
|
||||
deviceOperatorData.value = deviceData.value;
|
||||
}
|
||||
if(activeIndex.value > 3)
|
||||
{
|
||||
devEndTime.value = formatDateTime(new Date());
|
||||
finishTime.value = formatDateTime(new Date());
|
||||
// activities.value.length = 0;
|
||||
// activities.value.push({
|
||||
// content: '开始检测',
|
||||
// timestamp: '2018-04-12 20:46',
|
||||
// size: 'large',
|
||||
// color: '#0bbd87',
|
||||
// icon: SuccessFilled,
|
||||
// });
|
||||
}
|
||||
if (activeIndex.value === 2) {
|
||||
gpsTime.value = formatDateTime(new Date());
|
||||
// activities.value.push({
|
||||
// content: 'GPS上送时刻',
|
||||
// timestamp: '2018-04-03 20:46',
|
||||
// color: '#0bbd87',
|
||||
// icon: SuccessFilled,
|
||||
// size: 'large',
|
||||
// });
|
||||
}
|
||||
if (activeIndex.value === 3) {
|
||||
// activities.value.push({
|
||||
// content: '设备最早上送时刻',
|
||||
// timestamp: '2018-04-03 20:46',
|
||||
// color: '#0bbd87',
|
||||
// icon: SuccessFilled,
|
||||
// size: 'large',
|
||||
// });
|
||||
devStartTime.value = formatDateTime(new Date());
|
||||
deviceOperatorData.value.length = 0;
|
||||
deviceOperatorData.value = deviceData.value;
|
||||
qualified.value = 3
|
||||
}
|
||||
if (activeIndex.value > 3) {
|
||||
devEndTime.value = formatDateTime(new Date());
|
||||
finishTime.value = formatDateTime(new Date());
|
||||
|
||||
// activities.value.push({
|
||||
// content: '设备最晚上送时刻',
|
||||
// timestamp: '2018-04-03 20:46',
|
||||
// color: '#0bbd87',
|
||||
// icon: SuccessFilled,
|
||||
// size: 'large',
|
||||
// });
|
||||
// activities.value.push({
|
||||
// content: '检测结束',
|
||||
// timestamp: '2018-04-03 20:46',
|
||||
// color: '#0bbd87',
|
||||
// icon: SuccessFilled,
|
||||
// size: 'large',
|
||||
// });
|
||||
}
|
||||
// activities.value.push({
|
||||
// content: '设备最晚上送时刻',
|
||||
// timestamp: '2018-04-03 20:46',
|
||||
// color: '#0bbd87',
|
||||
// icon: SuccessFilled,
|
||||
// size: 'large',
|
||||
// });
|
||||
// activities.value.push({
|
||||
// content: '检测结束',
|
||||
// timestamp: '2018-04-03 20:46',
|
||||
// color: '#0bbd87',
|
||||
// icon: SuccessFilled,
|
||||
// size: 'large',
|
||||
// });
|
||||
}
|
||||
})
|
||||
const emit = defineEmits(['update:testStatus']);
|
||||
//监听sn
|
||||
watch(ts, function (newValue, oldValue) {
|
||||
//修改父组件
|
||||
emit('update:testStatus',ts.value)
|
||||
emit('update:testStatus', ts.value)
|
||||
})
|
||||
|
||||
</script>
|
||||
<style scoped>
|
||||
.test-dialog {
|
||||
display: flex;
|
||||
|
||||
.test-dialog{
|
||||
display: flex;
|
||||
|
||||
flex-direction: row; /* 横向排列 */
|
||||
/* margin-top: 20px; */
|
||||
/* min-height: 300px; */
|
||||
height: 472px;
|
||||
/* .dialog-left{
|
||||
flex-direction: row;
|
||||
/* 横向排列 */
|
||||
/* margin-top: 20px; */
|
||||
/* min-height: 300px; */
|
||||
height: 472px;
|
||||
/* .dialog-left{
|
||||
margin-right: 20px;
|
||||
} */
|
||||
}
|
||||
.dialog-left{
|
||||
margin-left: 20px;
|
||||
width: 20%;
|
||||
}
|
||||
.dialog-right{
|
||||
margin-top: 25px;
|
||||
margin-left: 20px;
|
||||
width: 80%;
|
||||
}
|
||||
.right-title{
|
||||
display: flex;
|
||||
flex-direction: row; /* 横向排列 */
|
||||
justify-content: flex-end;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
/* width: 100%;
|
||||
|
||||
.dialog-left {
|
||||
margin-left: 20px;
|
||||
width: 20%;
|
||||
}
|
||||
|
||||
.dialog-right {
|
||||
/* margin-top: 25px;
|
||||
margin-left: 20px; */
|
||||
width: 80%;
|
||||
}
|
||||
|
||||
.right-title {
|
||||
height: 32px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
/* 横向排列 */
|
||||
justify-content: flex-end;
|
||||
/* margin-bottom: 10px; */
|
||||
|
||||
}
|
||||
|
||||
/* width: 100%;
|
||||
height: auto;
|
||||
background: #fff;
|
||||
border-radius: 4px;
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
<el-row :gutter="24" >
|
||||
<el-col :span="8">
|
||||
<el-form-item label='生产厂商' prop='manufacturer' :label-width="100">
|
||||
<el-form-item label='设备厂家' prop='manufacturer' :label-width="100">
|
||||
<el-select v-model="formContent.manufacturer" clearable placeholder="请选择生产厂商">
|
||||
<el-option
|
||||
v-for="item in dictStore.getDictData('Dev_Manufacturers')"
|
||||
@@ -52,18 +52,18 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="生产日期" prop="createDate" :label-width="100">
|
||||
<el-form-item label="出厂日期" prop="createDate" :label-width="100">
|
||||
<el-date-picker
|
||||
v-model="formContent.createDate"
|
||||
placeholder="请选择生产日期"
|
||||
placeholder="请选择出厂日期"
|
||||
:disabled-date="disabledDate"
|
||||
/>
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="出厂编号" prop="createId" :label-width="100">
|
||||
<el-input v-model="formContent.createId" placeholder="请输入出厂编号"/>
|
||||
<el-form-item label="设备序列号" prop="createId" :label-width="100">
|
||||
<el-input v-model="formContent.createId" placeholder="请输入设备序列号"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
@@ -80,7 +80,7 @@ const columns = reactive<ColumnProps<Device.ResPqDev>[]>([
|
||||
},
|
||||
{
|
||||
prop: 'createDate',
|
||||
label: '生产日期',
|
||||
label: '出厂日期',
|
||||
minWidth: 200,
|
||||
search: {
|
||||
span: 2,
|
||||
@@ -116,7 +116,7 @@ const columns = reactive<ColumnProps<Device.ResPqDev>[]>([
|
||||
},
|
||||
{
|
||||
prop: 'manufacturer',
|
||||
label: '生产厂商',
|
||||
label: '设备厂家',
|
||||
enum: dictStore.getDictData('Dev_Manufacturers'),
|
||||
search: { el: 'select', props: { filterable: true }, order: 1 },
|
||||
fieldNames: { label: 'name', value: 'id' },
|
||||
|
||||
@@ -4,13 +4,17 @@
|
||||
<div class="table-container">
|
||||
<el-table :data="errorData"
|
||||
height="500"
|
||||
:header-cell-style="{ textAlign: 'center',backgroundColor: '#003078',color: '#fff' } "
|
||||
:header-cell-style="rowClass"
|
||||
:cell-style="{ textAlign: 'center' }"
|
||||
style="width: 100%"
|
||||
:span-method="spanMethod"
|
||||
border
|
||||
class="custom-table">
|
||||
<el-table-column prop="measured" label="被测量" />
|
||||
class="custom-table"
|
||||
>
|
||||
<el-table-column label="被测量">
|
||||
<el-table-column prop="col1"/>
|
||||
<el-table-column prop="col2"/>
|
||||
</el-table-column>
|
||||
<el-table-column prop="deviceLevel" label="检测装置级别" />
|
||||
<el-table-column prop="measurementType" label="测量类型" />
|
||||
<el-table-column prop="condition" label="测量条件" />
|
||||
@@ -57,6 +61,17 @@ interface SpanMethodProps {
|
||||
columnIndex: number
|
||||
}
|
||||
|
||||
const rowClass = ({row, column, rowIndex, columnIndex}) => {
|
||||
let res = {
|
||||
textAlign: 'center', backgroundColor: '#003078', color: '#fff'
|
||||
}
|
||||
if (rowIndex === 1) {
|
||||
res = {...res, display: 'none'}
|
||||
return res
|
||||
}
|
||||
return res
|
||||
}
|
||||
|
||||
const spanMethod = ({
|
||||
row,
|
||||
column,
|
||||
@@ -65,7 +80,7 @@ const spanMethod = ({
|
||||
}: SpanMethodProps) => {
|
||||
|
||||
if (columnIndex === 0 ) { // 检查是否为第一列
|
||||
|
||||
|
||||
if (rowIndex === 2 ||rowIndex === 21) { // 检查是否为第三行
|
||||
return {
|
||||
rowspan: 2, // 合并行数
|
||||
|
||||
@@ -74,9 +74,9 @@ const columns = ref<ColumnProps<ErrorSystem.ErrorSystemList>[]>([
|
||||
// 打开 drawer(新增、编辑)
|
||||
const openDialog = (titleType: string, row: Partial<ErrorSystem.ErrorSystemList> = {}) => {
|
||||
if(titleType == 'view'){
|
||||
//errorStandardPopup.value?.open(row.name, row)
|
||||
errorStandardPopup.value?.open(row.name, row)
|
||||
}else{
|
||||
//errorSystemPopup.value?.open(titleType, row)
|
||||
errorSystemPopup.value?.open(titleType, row)
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class='table-box'>
|
||||
<div class='table-box' >
|
||||
<ProTable
|
||||
ref='proTable'
|
||||
ref='proTable'
|
||||
:columns='columns'
|
||||
:pagination="false"
|
||||
:toolButton="false"
|
||||
@@ -11,18 +11,18 @@
|
||||
>
|
||||
<!-- 表格 header 按钮 -->
|
||||
<template #tableHeader='scope'>
|
||||
<el-button v-auth.testSource="'add'" type='primary' :icon='CirclePlus' @click="openDialog('add')">新增
|
||||
<el-button :disabled="isDisable" v-auth.testSource="'add'" type='primary' :icon='CirclePlus' @click="openDialog('add')">新增
|
||||
</el-button>
|
||||
<el-button v-auth.testSource="'delete'" type='danger' :icon='Delete'
|
||||
plain :disabled='!scope.isSelected' @click='batchDelete(scope.selectedListIds)'>
|
||||
plain :disabled='isDisable || !scope.isSelected' @click='batchDelete(scope.selectedListIds)'>
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
<!-- 表格操作 -->
|
||||
<template #operation='scope'>
|
||||
<el-button type="primary" link :icon='CopyDocument' @click="copyRow(scope.row)">复制</el-button>
|
||||
<el-button type='primary' link :icon='EditPen' @click="openDialog('edit', scope.row)">编辑</el-button>
|
||||
<el-button type='primary' link :icon='Delete' @click='handleDelete(scope.row.id)'>删除</el-button>
|
||||
<!-- <el-button type="primary" link :icon='CopyDocument' @click="copyRow(scope.row)">复制</el-button> -->
|
||||
<el-button :disabled="isDisable" type='primary' link :icon='EditPen' @click="openDialog('edit', scope.row)">编辑</el-button>
|
||||
<el-button :disabled="isDisable" type='primary' link :icon='Delete' @click='handleDelete(scope.row.id)'>删除</el-button>
|
||||
</template>
|
||||
</ProTable>
|
||||
|
||||
@@ -40,16 +40,23 @@ import ParameterPopup from '@/views/machine/testSource/components/parameterPopup
|
||||
import {reactive, ref, watch} from 'vue'
|
||||
import {generateUUID} from "@/styles";
|
||||
import {defineEmits} from "vue/dist/vue";
|
||||
import {ElMessage} from "element-plus";
|
||||
import { ElMessage } from 'element-plus'
|
||||
|
||||
const parameterPopup = ref()
|
||||
const dictStore = useDictStore()
|
||||
// ProTable 实例
|
||||
const proTable = ref<ProTableInstance>()
|
||||
const tableData = ref<any[]>([])
|
||||
const props = defineProps<{
|
||||
parameterStr: string;
|
||||
}>();
|
||||
const props = defineProps({
|
||||
parameterStr: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
isDisable: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
});
|
||||
|
||||
const emit = defineEmits(['change-parameter'])
|
||||
|
||||
@@ -106,7 +113,14 @@ const getTreeData = (data: TestSource.ParameterType[]): TestSource.ParameterType
|
||||
}
|
||||
|
||||
const columns = reactive<ColumnProps<any>[]>([
|
||||
{type: 'selection', fixed: 'left', width: 70},
|
||||
{type: 'selection', fixed: 'left', width: 70,
|
||||
selectable(row, index) {
|
||||
if (props.isDisable) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
},
|
||||
{type: 'index', fixed: 'left', width: 70, label: '序号'},
|
||||
{
|
||||
prop: 'sourceParamType',
|
||||
@@ -184,6 +198,8 @@ const getParameter = (data: TestSource.ParameterType) => {
|
||||
return;
|
||||
}
|
||||
let index = originalParameterArr.findIndex(item => item.id === data.id)
|
||||
|
||||
|
||||
if (index === -1) {
|
||||
data.id = generateUUID()
|
||||
// 新增
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<el-dialog :title="dialogTitle" v-model='dialogVisible' @close="close" v-bind="dialogBig" >
|
||||
<el-dialog :title="dialogTitle" v-model='dialogVisible' @close="close" v-bind="dialogBig">
|
||||
<div >
|
||||
<el-form :model="formContent" ref='dialogFormRef' :rules='rules' >
|
||||
<el-form :model="formContent" ref='dialogFormRef' :rules='rules' :disabled="tableIsDisable">
|
||||
<el-row :gutter="24">
|
||||
<!-- <el-col :span="8">-->
|
||||
<!-- <el-form-item label="检测源名称" prop="name" >-->
|
||||
@@ -36,11 +36,11 @@
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
<ParameterTable :parameterStr="formContent.parameter" @change-parameter="changeParameter" ref="parameterTable"/>
|
||||
<ParameterTable :parameterStr="formContent.parameter" @change-parameter="changeParameter" ref="parameterTable" :is-disable="tableIsDisable"/>
|
||||
<template #footer>
|
||||
<div>
|
||||
<el-button @click='close()'>取 消</el-button>
|
||||
<el-button type="primary" @click='save()'>保存</el-button>
|
||||
<el-button :disabled="tableIsDisable" @click='close()'>取 消</el-button>
|
||||
<el-button :disabled="tableIsDisable" type="primary" @click='save()'>保存</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
@@ -61,14 +61,13 @@ const dictStore = useDictStore()
|
||||
const mode = ref()
|
||||
const modeId = ref()
|
||||
const parameterTable = ref()
|
||||
|
||||
const tableIsDisable = ref(true)
|
||||
|
||||
function useMetaInfo() {
|
||||
const dialogVisible = ref(false)
|
||||
const titleType = ref('add')
|
||||
const formContent = ref<TestSource.ResTestSource>({
|
||||
id: '',
|
||||
name: '',
|
||||
pattern: modeId.value,
|
||||
parameter: '',
|
||||
type: '',
|
||||
@@ -83,7 +82,6 @@ const {dialogVisible, titleType, formContent} = useMetaInfo()
|
||||
const resetFormContent = () => {
|
||||
formContent.value = {
|
||||
id: '',
|
||||
name: '',
|
||||
pattern: modeId.value,
|
||||
parameter: '',
|
||||
type: '',
|
||||
@@ -93,8 +91,20 @@ const resetFormContent = () => {
|
||||
}
|
||||
|
||||
let dialogTitle = computed(() => {
|
||||
return titleType.value === 'add' ? '新增检测源' : '编辑检测源'
|
||||
})
|
||||
switch (titleType.value) {
|
||||
case 'add':
|
||||
tableIsDisable.value = false
|
||||
return '新增检测源';
|
||||
case 'edit':
|
||||
tableIsDisable.value = false
|
||||
return '编辑检测源';
|
||||
case 'view':
|
||||
tableIsDisable.value = true
|
||||
return '查看检测源';
|
||||
default:
|
||||
return ''; // 默认情况,可选
|
||||
}
|
||||
});
|
||||
|
||||
let dictTypeCode = computed(() => {
|
||||
return 'S_Dev_Type_' + dictStore.getDictData('Pattern').find(item => item.id === modeId.value)?.code
|
||||
@@ -121,6 +131,7 @@ const close = () => {
|
||||
const save = () => {
|
||||
try {
|
||||
dialogFormRef.value?.validate(async (valid: boolean) => {
|
||||
console.log("11111111111111111")
|
||||
if (valid) {
|
||||
if (formContent.value.id) {
|
||||
await updateTestSource(formContent.value);
|
||||
@@ -157,7 +168,7 @@ const open = async (sign: string, data: TestSource.ResTestSource, currentMode: s
|
||||
dialogFormRef.value?.resetFields()
|
||||
}
|
||||
|
||||
const changeParameter = (parameterArr) => {
|
||||
const changeParameter = (parameterArr: any) => {
|
||||
formContent.value.parameter = JSON.stringify(parameterArr)
|
||||
}
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
</template>
|
||||
<!-- 表格操作 -->
|
||||
<template #operation='scope'>
|
||||
<el-button type='primary' link :icon='View' @click="openDialog('view', scope.row)">查看</el-button>
|
||||
<el-button v-auth.testSource="'edit'" type='primary' link :icon='EditPen' @click="openDialog('edit', scope.row)">编辑</el-button>
|
||||
<el-button v-auth.testSource="'delete'" type='primary' link :icon='Delete' @click='handleDelete(scope.row)'>删除</el-button>
|
||||
</template>
|
||||
@@ -57,7 +58,8 @@
|
||||
|
||||
// 表格配置项
|
||||
const columns = reactive<ColumnProps<TestSource.ResTestSource>[]>([
|
||||
{ type: 'selection', fixed: 'left', width: 70 },
|
||||
{ type: 'selection', fixed: 'left', width: 70 ,
|
||||
},
|
||||
{ type: 'index', fixed: 'left', width: 70, label: '序号' },
|
||||
{
|
||||
prop: 'name',
|
||||
|
||||
@@ -277,6 +277,7 @@ function getScriptName(id: string) {
|
||||
}
|
||||
|
||||
function getErrSysName(id: string) {
|
||||
|
||||
return testErrSystDataList.find(item => item.id == id)?.label
|
||||
}
|
||||
|
||||
|
||||
@@ -268,14 +268,13 @@ import {dialogBig} from '@/utils/elementBind'
|
||||
import {type Dict} from '@/api/system/dictionary/interface'
|
||||
import {ElMessage, type FormItemRule} from 'element-plus'
|
||||
import {addDictPq, updateDictPq} from '@/api/system/dictionary/dictPq'
|
||||
import {computed, type Ref, ref} from 'vue';
|
||||
import {computed, reactive, type Ref, ref} from 'vue';
|
||||
import {useDictStore} from '@/stores/modules/dict'
|
||||
|
||||
import selectCheckBox from "@/views/system/dictionary/dictPq/components/selectCheckBox.vue";
|
||||
const dictStore = useDictStore()
|
||||
const selectedStatMethods = ref<string[]>([])
|
||||
// 定义弹出组件元信息
|
||||
const dialogFormRef = ref()
|
||||
|
||||
function useMetaInfo() {
|
||||
const dialogVisible = ref(false)
|
||||
const titleType = ref('add')
|
||||
@@ -288,8 +287,8 @@ function useMetaInfo() {
|
||||
phase: '',
|
||||
unit: '',
|
||||
type: 'Number',
|
||||
harmStart: '',
|
||||
harmEnd: '',
|
||||
harmStart: null,
|
||||
harmEnd: null,
|
||||
systemType: '',
|
||||
resourcesId: '',
|
||||
classId: '',
|
||||
@@ -299,15 +298,15 @@ function useMetaInfo() {
|
||||
sort: 100,
|
||||
defaultValue: '',
|
||||
eventType: '',
|
||||
maxNum: '',
|
||||
minNum: '',
|
||||
maxNum: null,
|
||||
minNum: null,
|
||||
setValue: '',
|
||||
strlen: '',
|
||||
strlen: null,
|
||||
tranRule: '',
|
||||
curSts: '',
|
||||
curSts: null,
|
||||
primaryFormula: '',
|
||||
ctlSts: 0,
|
||||
storeFlag: 0,
|
||||
storeFlag: '',
|
||||
tranFlag: 0,
|
||||
state: 1,
|
||||
})
|
||||
|
||||
@@ -0,0 +1,121 @@
|
||||
<template>
|
||||
|
||||
<el-select
|
||||
v-model="menusTitle"
|
||||
multiple
|
||||
collapse-tags
|
||||
collapse-tags-tooltip
|
||||
:placeholder="props.placeholder"
|
||||
clearable
|
||||
@clear="clearData"
|
||||
:popper-append-to-body="false"
|
||||
>
|
||||
<!-- @change="changeSelectMenu" -->
|
||||
<el-checkbox v-model="checkedAll" @change="selectAll">全选</el-checkbox>
|
||||
<el-option
|
||||
v-for="(item, index) in menuList"
|
||||
:key="item[props.id]"
|
||||
:value="item[props.id]"
|
||||
>
|
||||
<el-checkbox
|
||||
:label="item[props.label]"
|
||||
size="large"
|
||||
@change="changeCheckBox(item, index)"
|
||||
:checked="isChecked(item, index)"
|
||||
v-model="checkBoxObj[index]"
|
||||
/>
|
||||
</el-option>
|
||||
</el-select>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, reactive, defineProps, defineEmits } from "vue";
|
||||
const props = defineProps({
|
||||
list: { type: Array, required: true },
|
||||
id: { type: String, required: true },
|
||||
label: { type: String, required: true },
|
||||
modelValue: { type: Array },
|
||||
placeholder: { type: String, default: "选择" },
|
||||
});
|
||||
const emit = defineEmits(["update:modelValue"]);
|
||||
const value = ref("");
|
||||
const checkedAll = ref("false");
|
||||
const menus = ref([]);
|
||||
const menuList = props.list;
|
||||
const checkBoxObj = ref({});
|
||||
menuList.forEach((res, index) => {
|
||||
checkBoxObj.value[index] = false;
|
||||
});
|
||||
const menusTitle = ref([]);
|
||||
const changeSelectMenu = (val) => {};
|
||||
const selectAll = (value) => {
|
||||
menus.value = [];
|
||||
menusTitle.value = [];
|
||||
if (value) {
|
||||
menuList.forEach((item, index) => {
|
||||
menus.value.push(item[props.id]);
|
||||
menusTitle.value.push(item[props.label]);
|
||||
checkBoxObj.value[index] = true;
|
||||
});
|
||||
} else {
|
||||
menus.value = [];
|
||||
menusTitle.value = [];
|
||||
menuList.forEach((item, index) => {
|
||||
checkBoxObj.value[index] = false;
|
||||
});
|
||||
}
|
||||
emit("update:modelValue", menus.value);
|
||||
};
|
||||
const isChecked = (item) => {
|
||||
return menus.value.indexOf(item[props.id]) > -1;
|
||||
};
|
||||
const changeCheckBox = (item, index) => {
|
||||
let i = menus.value.indexOf(item[props.id]);
|
||||
if (i == -1) {
|
||||
menus.value.push(item[props.id]);
|
||||
menusTitle.value.push(item[props.label]);
|
||||
} else {
|
||||
menus.value.splice(i, 1);
|
||||
menusTitle.value.splice(i, 1);
|
||||
}
|
||||
if (menus.value.length == menuList.length) {
|
||||
checkedAll.value = true;
|
||||
} else {
|
||||
checkedAll.value = false;
|
||||
}
|
||||
emit("update:modelValue", menus.value);
|
||||
};
|
||||
const clearData = () => {
|
||||
menus.value = [];
|
||||
menusTitle.value = [];
|
||||
emit("update:modelValue", menus.value);
|
||||
checkedAll.value = false;
|
||||
menuList.forEach((item, index) => {
|
||||
checkBoxObj.value[index] = false;
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.el-select-dropdown {
|
||||
.el-checkbox {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding-left: 20px;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.el-select-dropdown__item {
|
||||
// background-color: red !important;
|
||||
padding: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
.el-select-dropdown.is-multiple .el-select-dropdown__item.is-selected::after{
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user