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