Merge branch 'master' of http://192.168.1.22:3000/frontend/pqs-9100_client
This commit is contained in:
@@ -48,7 +48,7 @@ const data = [
|
||||
{
|
||||
id: '1', //装置序号ID
|
||||
name: '240001', //设备名称
|
||||
dev_Type: 'PQS882A',//设备类型
|
||||
dev_Type: 'PQS-882A',//设备类型
|
||||
dev_Chns: 1, //设备通道数
|
||||
check_Result: '未检测', //检测结果
|
||||
report_State: '未生成', //报告状态
|
||||
@@ -59,7 +59,7 @@ const data = [
|
||||
{
|
||||
id: '2', //装置序号ID
|
||||
name: '240002', //设备名称
|
||||
dev_Type: 'PQS882B4',//设备类型
|
||||
dev_Type: 'PQS-882B4',//设备类型
|
||||
dev_Chns: 4, //设备通道数
|
||||
check_Result: '未检测', //检测结果
|
||||
report_State: '未生成', //报告状态
|
||||
@@ -70,7 +70,7 @@ const data = [
|
||||
{
|
||||
id: '3', //装置序号ID
|
||||
name: '240003', //设备名称
|
||||
dev_Type: 'PQS882B4',//设备类型
|
||||
dev_Type: 'PQS-882B4',//设备类型
|
||||
dev_Chns: 4, //设备通道数
|
||||
check_Result: '未检测', //检测结果
|
||||
report_State: '未生成', //报告状态
|
||||
@@ -81,7 +81,7 @@ const data = [
|
||||
{
|
||||
id: '4', //装置序号ID
|
||||
name: '240004', //设备名称
|
||||
dev_Type: 'PQS882A',//设备类型
|
||||
dev_Type: 'PQS-882A',//设备类型
|
||||
dev_Chns: 1, //设备通道数
|
||||
check_Result: '未检测', //检测结果
|
||||
report_State: '未生成', //报告状态
|
||||
@@ -92,20 +92,20 @@ const data = [
|
||||
{
|
||||
id: '5', //装置序号ID
|
||||
name: '240005', //设备名称
|
||||
dev_Type: 'PQS882A',//设备类型
|
||||
dev_Type: 'PQS-882A',//设备类型
|
||||
dev_Chns: 1, //设备通道数
|
||||
check_Result: '有不合格项', //检测结果
|
||||
check_Result: '不合格', //检测结果
|
||||
report_State: '未生成', //报告状态
|
||||
document_State: '未归档', //归档状态
|
||||
check_State:'检测完成',//检测状态
|
||||
reCheck_Num: 0, //复检次数
|
||||
reCheck_Num: 1, //复检次数
|
||||
},
|
||||
{
|
||||
id: '6', //装置序号ID
|
||||
name: '240006', //设备名称
|
||||
dev_Type: 'PQS882B4',//设备类型
|
||||
dev_Type: 'PQS-882B4',//设备类型
|
||||
dev_Chns: 4, //设备通道数
|
||||
check_Result: '有不合格项', //检测结果
|
||||
check_Result: '不合格', //检测结果
|
||||
report_State: '未生成', //报告状态
|
||||
document_State: '未归档', //归档状态
|
||||
check_State:'检测完成',//检测状态
|
||||
@@ -114,9 +114,9 @@ const data = [
|
||||
{
|
||||
id: '7', //装置序号ID
|
||||
name: '240007', //设备名称
|
||||
dev_Type: 'PQS882A',//设备类型
|
||||
dev_Type: 'PQS-882A',//设备类型
|
||||
dev_Chns: 1, //设备通道数
|
||||
check_Result: '全部合格', //检测结果
|
||||
check_Result: '合格', //检测结果
|
||||
report_State: '未生成', //报告状态
|
||||
document_State: '未归档', //归档状态
|
||||
check_State:'检测完成',//检测状态
|
||||
@@ -125,20 +125,20 @@ const data = [
|
||||
{
|
||||
id: '8', //装置序号ID
|
||||
name: '240008', //设备名称
|
||||
dev_Type: 'PQS882B4',//设备类型
|
||||
dev_Type: 'PQS-882B4',//设备类型
|
||||
dev_Chns: 4, //设备通道数
|
||||
check_Result: '全部合格', //检测结果
|
||||
check_Result: '合格', //检测结果
|
||||
report_State: '未生成', //报告状态
|
||||
document_State: '未归档', //归档状态
|
||||
check_State:'检测完成',//检测状态
|
||||
reCheck_Num: 0, //复检次数
|
||||
reCheck_Num: 1, //复检次数
|
||||
},
|
||||
{
|
||||
id: '9', //装置序号ID
|
||||
name: '240009', //设备名称
|
||||
dev_Type: 'PQS882B4',//设备类型
|
||||
dev_Type: 'PQS-882B4',//设备类型
|
||||
dev_Chns: 4, //设备通道数
|
||||
check_Result: '有不合格项', //检测结果
|
||||
check_Result: '不合格', //检测结果
|
||||
report_State: '已生成', //报告状态
|
||||
document_State: '未归档', //归档状态
|
||||
check_State:'检测完成',//检测状态
|
||||
@@ -147,9 +147,9 @@ const data = [
|
||||
{
|
||||
id: '10', //装置序号ID
|
||||
name: '240010', //设备名称
|
||||
dev_Type: 'PQS882A',//设备类型
|
||||
dev_Type: 'PQS-882A',//设备类型
|
||||
dev_Chns: 1, //设备通道数
|
||||
check_Result: '全部合格', //检测结果
|
||||
check_Result: '合格', //检测结果
|
||||
report_State: '已生成', //报告状态
|
||||
document_State: '未归档', //归档状态
|
||||
check_State:'检测完成',//检测状态
|
||||
@@ -158,9 +158,9 @@ const data = [
|
||||
{
|
||||
id: '11', //装置序号ID
|
||||
name: '240011', //设备名称
|
||||
dev_Type: 'PQS882A',//设备类型
|
||||
dev_Type: 'PQS-882A',//设备类型
|
||||
dev_Chns: 1, //设备通道数
|
||||
check_Result: '全部合格', //检测结果
|
||||
check_Result: '合格', //检测结果
|
||||
report_State: '已生成', //报告状态
|
||||
document_State: '已归档', //归档状态
|
||||
check_State:'检测完成',//检测状态
|
||||
@@ -169,9 +169,9 @@ const data = [
|
||||
{
|
||||
id: '12', //装置序号ID
|
||||
name: '240012', //设备名称
|
||||
dev_Type: 'PQS882B4',//设备类型
|
||||
dev_Type: 'PQS-882B4',//设备类型
|
||||
dev_Chns: 4, //设备通道数
|
||||
check_Result: '全部合格', //检测结果
|
||||
check_Result: '合格', //检测结果
|
||||
report_State: '已生成', //报告状态
|
||||
document_State: '已归档', //归档状态
|
||||
check_State:'检测完成',//检测状态
|
||||
@@ -180,7 +180,7 @@ const data = [
|
||||
{
|
||||
id: '13', //装置序号ID
|
||||
name: '240013', //设备名称
|
||||
dev_Type: 'PQS882A',//设备类型
|
||||
dev_Type: 'PQS-882A',//设备类型
|
||||
dev_Chns: 1, //设备通道数
|
||||
check_Result: '未检测', //检测结果
|
||||
report_State: '未生成', //报告状态
|
||||
@@ -191,7 +191,7 @@ const data = [
|
||||
{
|
||||
id: '14', //装置序号ID
|
||||
name: '240014', //设备名称
|
||||
dev_Type: 'PQS882A',//设备类型
|
||||
dev_Type: 'PQS-882A',//设备类型
|
||||
dev_Chns: 1, //设备通道数
|
||||
check_Result: '未检测', //检测结果
|
||||
report_State: '未生成', //报告状态
|
||||
@@ -202,7 +202,7 @@ const data = [
|
||||
{
|
||||
id: '15', //装置序号ID
|
||||
name: '240013', //设备名称
|
||||
dev_Type: 'PQS882A',//设备类型
|
||||
dev_Type: 'PQS-882A',//设备类型
|
||||
dev_Chns: 1, //设备通道数
|
||||
check_Result: '未检测', //检测结果
|
||||
report_State: '未生成', //报告状态
|
||||
@@ -213,7 +213,7 @@ const data = [
|
||||
{
|
||||
id: '16', //装置序号ID
|
||||
name: '240014', //设备名称
|
||||
dev_Type: 'PQS882A',//设备类型
|
||||
dev_Type: 'PQS-882A',//设备类型
|
||||
dev_Chns: 1, //设备通道数
|
||||
check_Result: '未检测', //检测结果
|
||||
report_State: '未生成', //报告状态
|
||||
@@ -224,7 +224,7 @@ const data = [
|
||||
{
|
||||
id: '17', //装置序号ID
|
||||
name: '240017', //设备名称
|
||||
dev_Type: 'PQS882A',//设备类型
|
||||
dev_Type: 'PQS-882A',//设备类型
|
||||
dev_Chns: 1, //设备通道数
|
||||
check_Result: '未检测', //检测结果
|
||||
report_State: '未生成', //报告状态
|
||||
@@ -235,7 +235,7 @@ const data = [
|
||||
{
|
||||
id: '18', //装置序号ID
|
||||
name: '240018', //设备名称
|
||||
dev_Type: 'PQS882A',//设备类型
|
||||
dev_Type: 'PQS-882A',//设备类型
|
||||
dev_Chns: 1, //设备通道数
|
||||
check_Result: '未检测', //检测结果
|
||||
report_State: '未生成', //报告状态
|
||||
@@ -246,7 +246,7 @@ const data = [
|
||||
{
|
||||
id: '19', //装置序号ID
|
||||
name: '240019', //设备名称
|
||||
dev_Type: 'PQS882A',//设备类型
|
||||
dev_Type: 'PQS-882A',//设备类型
|
||||
dev_Chns: 1, //设备通道数
|
||||
check_Result: '未检测', //检测结果
|
||||
report_State: '未生成', //报告状态
|
||||
@@ -257,7 +257,7 @@ const data = [
|
||||
{
|
||||
id: '20', //装置序号ID
|
||||
name: '240020', //设备名称
|
||||
dev_Type: 'PQS882A',//设备类型
|
||||
dev_Type: 'PQS-882A',//设备类型
|
||||
dev_Chns: 1, //设备通道数
|
||||
check_Result: '未检测', //检测结果
|
||||
report_State: '未生成', //报告状态
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
{
|
||||
"id": 4,
|
||||
"pid": 1,
|
||||
"name": "邯郸220kV团城站电能质量检测"
|
||||
"name": "邯郸220kV团城站电能质量检测11111111111111111111111111"
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
|
||||
@@ -49,7 +49,21 @@ const init = () => {
|
||||
text: customData.value.title,
|
||||
left: customData.value.textAlign,
|
||||
},
|
||||
legend: legendData.value,
|
||||
legend:legendData.value,
|
||||
// legend: {
|
||||
// icon: legendData.value.icon, // 图例项的icon,类型包括 circle(圆形),rect(正方形),//roundRect(圆角正方形),triangle(三角形),diamond(菱形),//pin(大头针行),arrow(箭头形),none(无图例项的icon)
|
||||
// orient: "vertical", //图例排列方向
|
||||
// left: legendData.value.left, //可选属性left,right,top,bottom,可选属性值 left,right,top,bottom,px,百分比,数值,
|
||||
// itemGap: 1, // 设置图例项之间的间隔为20
|
||||
// formatter: function (name) {
|
||||
|
||||
// const item = props.chartsData.filter(item=>item.name==name)
|
||||
// console.log(item)
|
||||
// if(item)
|
||||
// return item[0].value;
|
||||
|
||||
// },
|
||||
// },
|
||||
tooltip: {
|
||||
show: true,
|
||||
trigger: "item",
|
||||
@@ -61,6 +75,12 @@ const init = () => {
|
||||
type: "pie",
|
||||
radius: customData.value.isRing ? ["55", "75"] : "80%",
|
||||
data: props.chartsData,
|
||||
formatter: function (name) {
|
||||
const item = props.chartsData.filter(item=>item.name==name)
|
||||
console.log(item)
|
||||
if(item)
|
||||
return item[0].value;
|
||||
},
|
||||
center: ["55%", "50%"], // 设置饼图的中心位置
|
||||
// padAngle: 2,
|
||||
minAngle: 15, //最小角度
|
||||
@@ -75,11 +95,14 @@ const init = () => {
|
||||
label: {
|
||||
normal: {
|
||||
show: true,
|
||||
position: "inside",
|
||||
position: "outside",
|
||||
textStyle: {
|
||||
color: "#fff",
|
||||
//color: "#fff",
|
||||
fontSize: 12,
|
||||
},
|
||||
formatter: function (data) {
|
||||
return data.value
|
||||
}
|
||||
},
|
||||
},
|
||||
itemStyle: {
|
||||
|
||||
@@ -441,7 +441,7 @@
|
||||
|
||||
.dialog-small {
|
||||
.el-dialog__body {
|
||||
max-height: 260px;
|
||||
max-height: 320px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<el-form-item label="编码" prop="code" :label-width="100">
|
||||
<el-input v-model="formContent.code" />
|
||||
</el-form-item>
|
||||
<el-form-item label="图标" prop="icon" :label-width="100">
|
||||
<el-form-item v-if="!formContent.type" label="图标" prop="icon" :label-width="100">
|
||||
<IconSelect
|
||||
v-model="formContent.icon"
|
||||
:iconValue="formContent.icon"
|
||||
@@ -27,10 +27,10 @@
|
||||
placeholder="选择一个图标"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="路由地址" prop="path" :label-width="100">
|
||||
<el-form-item v-if="!formContent.type" label="路由地址" prop="path" :label-width="100">
|
||||
<el-input v-model="formContent.path" />
|
||||
</el-form-item>
|
||||
<el-form-item label="组件地址" prop="component" :label-width="100">
|
||||
<el-form-item v-if="!formContent.type" label="组件地址" prop="component" :label-width="100">
|
||||
<el-input v-model="formContent.component" />
|
||||
</el-form-item>
|
||||
<el-form-item label="排序" prop="sort" :label-width="100">
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-tabs type="border-card">
|
||||
<el-tab-pane label="预检测项目:">
|
||||
<el-tab-pane label="预检测项目">
|
||||
<div class="form-grid">
|
||||
<el-checkbox
|
||||
v-for="(item, index) in detectionOptions"
|
||||
@@ -87,19 +87,19 @@ const step2InitLog = ref([
|
||||
const step2Log = ref([
|
||||
{
|
||||
type: 'info',
|
||||
log:'被检设备1通讯校验成功',
|
||||
log:'被检设备:240001通讯校验成功',
|
||||
},
|
||||
{
|
||||
type: 'info',
|
||||
log:'被检设备2通讯校验成功',
|
||||
log:'被检设备:240002通讯校验成功',
|
||||
},
|
||||
{
|
||||
type: 'info',
|
||||
log:'被检设备3通讯校验成功',
|
||||
log:'被检设备:240003通讯校验成功',
|
||||
},
|
||||
{
|
||||
type: 'info',
|
||||
log:'被检设备4通讯校验成功',
|
||||
log:'被检设备:240004通讯校验成功',
|
||||
},
|
||||
])
|
||||
|
||||
@@ -113,19 +113,19 @@ const step3InitLog = ref([
|
||||
const step3Log = ref([
|
||||
{
|
||||
type: 'info',
|
||||
log:'被检设备1协议校验成功',
|
||||
log:'被检设备:240001协议校验成功',
|
||||
},
|
||||
{
|
||||
type: 'info',
|
||||
log:'被检设备2协议校验成功',
|
||||
log:'被检设备:240002协议校验成功',
|
||||
},
|
||||
{
|
||||
type: 'info',
|
||||
log:'被检设备3协议校验成功',
|
||||
log:'被检设备:240003协议校验成功',
|
||||
},
|
||||
{
|
||||
type: 'info',
|
||||
log:'被检设备4协议校验成功',
|
||||
log:'被检设备:240004协议校验成功',
|
||||
},
|
||||
])
|
||||
|
||||
@@ -140,19 +140,19 @@ const step4InitLog = ref([
|
||||
const step4Log = ref([
|
||||
{
|
||||
type: 'info',
|
||||
log:'被检设备1相序校验成功',
|
||||
log:'被检设备:240001相序校验成功',
|
||||
},
|
||||
{
|
||||
type: 'info',
|
||||
log:'被检设备2相序校验成功',
|
||||
log:'被检设备:240002相序校验成功',
|
||||
},
|
||||
{
|
||||
type: 'info',
|
||||
log:'被检设备3相序校验成功',
|
||||
log:'被检设备:240003相序校验成功',
|
||||
},
|
||||
{
|
||||
type: 'info',
|
||||
log:'被检设备4相序校验成功',
|
||||
log:'被检设备:240004相序校验成功',
|
||||
},
|
||||
])
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
:init-param="initParam"
|
||||
:data-callback="dataCallback"
|
||||
@drag-sort="sortTable"
|
||||
|
||||
:default-sort="{ prop: 'check_State', order: 'ascending' }"
|
||||
:stripe="true"
|
||||
:pagination = "false"
|
||||
:key="tableKey"
|
||||
@@ -18,17 +18,18 @@
|
||||
<!-- 表格 header 按钮 -->
|
||||
<template #tableHeader="scope">
|
||||
<el-form :model="form" :inline="true">
|
||||
<el-form-item label="关键字搜索">
|
||||
<el-input v-model="form.search" placeholder="输入设备名称或类型搜索"></el-input>
|
||||
<el-form-item label="关键字">
|
||||
<el-input v-model="form.search" placeholder="请输入设备名称、类型"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="检测状态" v-if="form.activeTabs != 3 && form.activeTabs != 5">
|
||||
<el-select v-model="form.checkStatus" clearable>
|
||||
<el-option
|
||||
v-for="(item, index) in checkStatusList"
|
||||
v-for="(item, index) in checkResultList"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
:disabled="item.disabled"
|
||||
:key="index"
|
||||
v-show="shouldShowOption(item)"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@@ -40,6 +41,7 @@
|
||||
:value="item.value"
|
||||
:disabled="item.disabled"
|
||||
:key="index"
|
||||
v-show="shouldShowOption(item)"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@@ -51,6 +53,7 @@
|
||||
:value="item.value"
|
||||
:disabled="item.disabled"
|
||||
:key="index"
|
||||
v-show="shouldShowOption(item)"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@@ -72,20 +75,22 @@
|
||||
<el-button :icon="Delete" @click="handleRefresh"
|
||||
>重置</el-button
|
||||
>
|
||||
|
||||
<!-- :disabled='!scope.isSelected' -->
|
||||
<el-button
|
||||
type="primary"
|
||||
:icon="Clock"
|
||||
@click="handleTest('手动检测')"
|
||||
v-if="form.activeTabs === 0"
|
||||
:disabled='!scope.isSelected'
|
||||
>手动检测</el-button
|
||||
>
|
||||
|
||||
<!-- :disabled='!scope.isSelected' -->
|
||||
<el-button
|
||||
type="primary"
|
||||
:icon="ChatLineRound"
|
||||
@click="handleTest('自动检测')"
|
||||
v-if="form.activeTabs === 0"
|
||||
:disabled='!scope.isSelected'
|
||||
>自动检测</el-button
|
||||
>
|
||||
<el-button type="primary" :icon="ChatLineSquare" @click="handleTest('不合格项复检')" v-if="form.activeTabs === 2"
|
||||
@@ -95,15 +100,18 @@
|
||||
>全部复检</el-button
|
||||
>
|
||||
|
||||
<!-- :disabled='!scope.isSelected' -->
|
||||
<el-button type="primary" :icon="Download" @click="handleTest('批量下载')" v-if="form.activeTabs === 3"
|
||||
>报告下载</el-button
|
||||
>
|
||||
<!-- :disabled='!scope.isSelected' -->
|
||||
<el-button type="primary" :icon="Postcard" @click="handleTest('批量生成')" v-if="form.activeTabs === 3"
|
||||
>报告生成</el-button
|
||||
>
|
||||
|
||||
<el-button type="primary" :icon="Download" :disabled='!scope.isSelected' @click="handleTest('批量下载')" v-if="form.activeTabs === 3"
|
||||
>批量下载</el-button
|
||||
>
|
||||
<el-button type="primary" :icon="Postcard" :disabled='!scope.isSelected' @click="handleTest('批量生成')" v-if="form.activeTabs === 3"
|
||||
>批量生成</el-button
|
||||
>
|
||||
<el-button type="primary" :icon="Notebook" :disabled="!scope.isSelected || scope.selectedList.filter((item) => item.check_State === '检测完成').length === 0" @click="handleTest('批量归档')" v-if="form.activeTabs === 0"
|
||||
>批量归档</el-button
|
||||
<!-- :disabled="!scope.isSelected || scope.selectedList.filter((item) => item.check_State === '检测完成').length === 0" -->
|
||||
<el-button type="primary" :icon="Notebook" @click="handleTest('批量归档')" v-if="form.activeTabs === 0"
|
||||
>归档</el-button
|
||||
>
|
||||
<el-button type="primary" :icon="CirclePlus" @click="addDevice('设备新增')" v-if="form.activeTabs === 0"
|
||||
>设备新增</el-button
|
||||
@@ -154,7 +162,7 @@
|
||||
>数据查看</el-button
|
||||
> -->
|
||||
<el-button
|
||||
type="primary"
|
||||
:type="scope.row.check_State === '检测完成' ? 'primary' : 'info'"
|
||||
link
|
||||
:icon="Notebook"
|
||||
@click="openDrawer('归档', scope.row)"
|
||||
@@ -237,6 +245,9 @@ import dataCheckChangeErrSysPopup from "./dataCheckChangeErrSysPopup.vue";
|
||||
|
||||
import { reactive, ref } from "vue";
|
||||
|
||||
let devNum = 0;//当前选取的被检设备数量
|
||||
let devChannelsNum = 0;//当前选择的被检设备通道总数
|
||||
let devTestedNum = 0;//当前选择的已完成检测的被检设备数量
|
||||
const tableKey = ref(0);
|
||||
const router = useRouter();
|
||||
const value1 = ref("");
|
||||
@@ -257,13 +268,20 @@ const dialogForm = ref<any>({
|
||||
enable:1,
|
||||
state:1,
|
||||
});
|
||||
const shouldShowOption = (item) => {
|
||||
console.log(item,12345)
|
||||
return !item.disabled;
|
||||
};
|
||||
//console.log(window.innerHeight, "+++++++++");
|
||||
tableHeight.value = window.innerHeight - 600;
|
||||
//const deviceData = deviceDataList.plan_devicedata
|
||||
const deviceData = ref([]);
|
||||
deviceData.value = deviceDataList.plan_devicedata.filter((item) => item.document_State === "未归档")
|
||||
const operationShow = ref(false);
|
||||
const documentStateShow = ref(false);
|
||||
const checkStateShow = ref(true);
|
||||
const operationMinWidth = ref(200);
|
||||
const selectionShow = ref(true);
|
||||
|
||||
//下拉框数据
|
||||
//检测状态数据
|
||||
@@ -315,71 +333,17 @@ let checkResultList = reactive([
|
||||
disabled: false,
|
||||
},
|
||||
{
|
||||
label: "有不合格项",
|
||||
label: "不合格",
|
||||
value: 1,
|
||||
disabled: false,
|
||||
},
|
||||
{
|
||||
label: "全部合格",
|
||||
label: "合格",
|
||||
value: 2,
|
||||
disabled: false,
|
||||
},
|
||||
]);
|
||||
//绑定状态数组
|
||||
// const deviceBindStatusList = [
|
||||
// {
|
||||
// label: "未绑定",
|
||||
// value: 0,
|
||||
// disabled: true,
|
||||
// },
|
||||
// {
|
||||
// label: "已绑定",
|
||||
// value: 1,
|
||||
// disabled: true,
|
||||
// },
|
||||
// ];
|
||||
// //设备类型数组
|
||||
// const deviceTypeList = [
|
||||
// {
|
||||
// label: "PQS882A",
|
||||
// value: 0,
|
||||
// },
|
||||
// {
|
||||
// label: "PQS882B4",
|
||||
// value: 1,
|
||||
// },
|
||||
// {
|
||||
// label: "PQS882B5",
|
||||
// value: 2,
|
||||
// },
|
||||
// {
|
||||
// label: "PQS882B6",
|
||||
// value: 3,
|
||||
// },
|
||||
// {
|
||||
// label: "PQS882B7",
|
||||
// value: 4,
|
||||
// },
|
||||
// {
|
||||
// label: "PQS882B8",
|
||||
// value: 5,
|
||||
// },
|
||||
// ];
|
||||
// //制造厂商数组
|
||||
// const manufacturerList = [
|
||||
// {
|
||||
// label: "南京灿能电力",
|
||||
// value: 0,
|
||||
// },
|
||||
// {
|
||||
// label: "南瑞继保",
|
||||
// value: 1,
|
||||
// },
|
||||
// {
|
||||
// label: "中电",
|
||||
// value: 2,
|
||||
// },
|
||||
// ];
|
||||
|
||||
//查询条件
|
||||
const form: any = ref({
|
||||
activeTabs: 0, //功能选择
|
||||
@@ -427,13 +391,13 @@ const getTableList = (params: any) => {
|
||||
};
|
||||
|
||||
// 表格配置项
|
||||
const columns = reactive<ColumnProps<Device.ResPqDev>[]>([
|
||||
{ type: 'selection', fixed: 'left', width: 70 },
|
||||
const columns = reactive([
|
||||
{ type: 'selection', fixed: 'left', width: 70, isShow:selectionShow },
|
||||
{ type: 'index', fixed: 'left', width: 70, label: '序号' },
|
||||
{
|
||||
prop: 'name',
|
||||
label: '设备名称',
|
||||
minWidth: 120,
|
||||
minWidth: 220,
|
||||
},
|
||||
{
|
||||
prop: 'dev_Type',
|
||||
@@ -448,21 +412,42 @@ const columns = reactive<ColumnProps<Device.ResPqDev>[]>([
|
||||
},
|
||||
{
|
||||
prop: 'reCheck_Num',
|
||||
label: '复检次数',
|
||||
label: '检测次数',
|
||||
minWidth: 100,
|
||||
sortable:true,
|
||||
// <template #header>
|
||||
// <span>检测次数</span>
|
||||
// <el-tooltip content = "最大检测次数为3次,超过会强制归档" placement="top" style="align-items: bottom;">
|
||||
// <el-icon><InfoFilled /></el-icon>
|
||||
// </el-tooltip>
|
||||
// </template>
|
||||
},
|
||||
{
|
||||
prop: 'check_State',
|
||||
label: '检测状态',
|
||||
minWidth: 100,
|
||||
sortable:true,
|
||||
isShow:checkStateShow,
|
||||
},
|
||||
{
|
||||
prop: 'check_Result',
|
||||
label: '检测结果',
|
||||
minWidth: 100,
|
||||
sortable:true,
|
||||
render: (scope) => {
|
||||
if(scope.row.check_Result === '不合格')
|
||||
{
|
||||
return (
|
||||
<el-tag type='danger'>{ scope.row.check_Result }</el-tag>
|
||||
)
|
||||
}
|
||||
else
|
||||
{
|
||||
return (
|
||||
<span>{ scope.row.check_Result }</span>
|
||||
)
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
prop: 'report_State',
|
||||
@@ -475,6 +460,7 @@ const columns = reactive<ColumnProps<Device.ResPqDev>[]>([
|
||||
label: '归档状态',
|
||||
minWidth: 100,
|
||||
sortable:true,
|
||||
isShow: documentStateShow,
|
||||
},
|
||||
{ prop: 'operation', label: '操作', fixed: 'right', minWidth: 200 ,isShow: operationShow},
|
||||
])
|
||||
@@ -641,9 +627,16 @@ const resetSearchForm = () => {
|
||||
};
|
||||
};
|
||||
let testType = "test";//检测还是复检
|
||||
|
||||
const handleSelectionChange = (selection: any[]) => {
|
||||
|
||||
const result = selection.filter((item) => item.check_Result != "有不合格项")
|
||||
devNum = selection.length;
|
||||
for (let i = 0; i < selection.length; i++) {
|
||||
devChannelsNum += selection[i].dev_Chns;
|
||||
}
|
||||
|
||||
devTestedNum = selection.filter((item) => item.check_State === '检测完成').length;
|
||||
const result = selection.filter((item) => item.check_Result != "不合格")
|
||||
if(result.length > 0)
|
||||
{
|
||||
testType= "test";
|
||||
@@ -652,7 +645,6 @@ const handleSelectionChange = (selection: any[]) => {
|
||||
{
|
||||
testType= "reTest";
|
||||
}
|
||||
console.log(selection);
|
||||
}
|
||||
|
||||
//查询
|
||||
@@ -757,6 +749,9 @@ function tableHeaderInit(val: number) {
|
||||
columns[columns.length - 1].minWidth = 100;
|
||||
tableKey.value ++;
|
||||
operationShow.value = true;
|
||||
documentStateShow.value = false;
|
||||
checkStateShow.value = true;
|
||||
selectionShow.value = true;
|
||||
break;
|
||||
case 2://设备复检
|
||||
// form.value.checkStatus = 2;//检测状态默认为检测完成
|
||||
@@ -780,6 +775,9 @@ function tableHeaderInit(val: number) {
|
||||
columns[columns.length - 1].minWidth = 180;
|
||||
tableKey.value += 1;
|
||||
operationShow.value = true;
|
||||
documentStateShow.value = true;
|
||||
checkStateShow.value = false;
|
||||
selectionShow.value = true;
|
||||
break;
|
||||
case 4://设备归档
|
||||
// form.value.checkStatus = 2;//检测状态默认为检测完成
|
||||
@@ -793,13 +791,20 @@ function tableHeaderInit(val: number) {
|
||||
columns[columns.length - 1].minWidth = 100;
|
||||
tableKey.value ++;
|
||||
operationShow.value = true;
|
||||
documentStateShow.value = true;
|
||||
checkStateShow.value = false;
|
||||
selectionShow.value = true;
|
||||
break;
|
||||
case 5://数据查询
|
||||
disablecheckResultList("未检测")
|
||||
disableCheckReportStatus("未检测")
|
||||
columns[columns.length - 1].minWidth = 250;
|
||||
tableKey.value += 1;
|
||||
operationShow.value = true;
|
||||
documentStateShow.value = true;
|
||||
checkStateShow.value = false;
|
||||
selectionShow.value = false;
|
||||
columns[0].isShow = false;
|
||||
tableKey.value += 1;
|
||||
break;
|
||||
}
|
||||
console.log("test",columns);
|
||||
@@ -808,6 +813,12 @@ console.log("test",columns);
|
||||
|
||||
tableHeaderInit(0)
|
||||
function refreshStatusList(){
|
||||
// devNum = 0;
|
||||
// devChannelsNum = 0;
|
||||
// devTestedNum = 0;
|
||||
devNum = 0;
|
||||
devChannelsNum = 0;
|
||||
devTestedNum = 0;
|
||||
checkStatusList.map((item: any, index: any) => {
|
||||
if (item.disabled) {
|
||||
item.disabled = false;
|
||||
@@ -856,12 +867,49 @@ const addDevice = (val:string) => {
|
||||
path: "/machine/device",
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
const handleTest = (val:string) => {
|
||||
|
||||
if(devNum == 0)
|
||||
{
|
||||
ElMessageBox.confirm(
|
||||
'请先选择被检设备',
|
||||
'提示',
|
||||
{
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
}
|
||||
)
|
||||
return
|
||||
}
|
||||
if(val==='手动检测'||val==='自动检测'||val==='不合格项复检'||val==='全部复检' )
|
||||
{
|
||||
if(devNum > 6)
|
||||
{
|
||||
ElMessageBox.confirm(
|
||||
'每次检测最多只能选择6台设备,请重新选择',
|
||||
'提示',
|
||||
{
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
}
|
||||
)
|
||||
return
|
||||
}
|
||||
if(devChannelsNum > 20)
|
||||
{
|
||||
ElMessageBox.confirm(
|
||||
'每次检测最多只能检测20个设备通道,请重新选择',
|
||||
'提示',
|
||||
{
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
}
|
||||
)
|
||||
return
|
||||
}
|
||||
if(testType === "reTest")
|
||||
{
|
||||
ElMessageBox.confirm(
|
||||
@@ -895,16 +943,30 @@ const handleTest = (val:string) => {
|
||||
dialogTitle.value = val;
|
||||
dialogFormVisible.value = true; // 打开对话框
|
||||
}
|
||||
|
||||
return
|
||||
|
||||
}
|
||||
|
||||
if(devTestedNum == 0)
|
||||
{
|
||||
ElMessageBox.confirm(
|
||||
'请先选择检测完成状态的被检设备',
|
||||
'提示',
|
||||
{
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
}
|
||||
)
|
||||
return
|
||||
}
|
||||
if(val==='批量生成')
|
||||
{
|
||||
reportDialogVisible.value = true;
|
||||
reportDialogVisible.value = true;
|
||||
return
|
||||
}
|
||||
|
||||
if(val==='批量归档')
|
||||
if(val==='归档')
|
||||
{
|
||||
const loading = ElLoading.service({
|
||||
lock: true,
|
||||
|
||||
@@ -85,7 +85,7 @@ defineExpose({ getTreeData })
|
||||
<style lang='scss' scoped>
|
||||
.plan_tree {
|
||||
// width: 200px;
|
||||
// height: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 5px;
|
||||
@@ -112,12 +112,15 @@ defineExpose({ getTreeData })
|
||||
}
|
||||
|
||||
.tree_container {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
overflow-x: auto;
|
||||
|
||||
.el-tree {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
width: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
<el-collapse-item title="检测进度展示" name="1"> -->
|
||||
<div class="container_pieShow">
|
||||
<el-collapse model-value="1" accordion @change="handleCollapseChange">
|
||||
<el-collapse-item title="    检测进度展示:" name="1">
|
||||
<el-collapse-item title="    检测计划统计" name="1">
|
||||
<!-- 饼图 -->
|
||||
<div class="container_charts">
|
||||
<div class="charts_info" ref="chartsInfoRef">
|
||||
@@ -249,6 +249,7 @@ const chartsData1: any = ref([]),
|
||||
chartsData2: any = ref([]),
|
||||
chartsData3: any = ref([]);
|
||||
const getPieData = () => {
|
||||
|
||||
chartsData1.value = [
|
||||
{ value: Math.floor(Math.random() * 100) + 1, name: "未检测", itemStyle: { color: '#fac858' } },
|
||||
{ value: Math.floor(Math.random() * 100) + 1, name: "检测中", itemStyle: { color: '#ee6666' } },
|
||||
@@ -257,8 +258,10 @@ const getPieData = () => {
|
||||
];
|
||||
chartsData2.value = [
|
||||
{ value: Math.floor(Math.random() * 100) + 1, name: "未检测" , itemStyle: { color: '#fac858' } },
|
||||
{ value: Math.floor(Math.random() * 100) + 1, name: "有不合格项" , itemStyle: { color: '#ee6666' } },
|
||||
{ value: Math.floor(Math.random() * 100) + 1, name: "全部合格", itemStyle: { color: '#91cc75' } },
|
||||
{ value: Math.floor(Math.random() * 100) + 1, name: "不合格" , itemStyle: { color: '#ee6666' } },
|
||||
{ value: Math.floor(Math.random() * 100) + 1, name: "合格", itemStyle: { color: '#91cc75' } },
|
||||
// { value: Math.floor(Math.random() * 100) + 1, name: "有不合格项" , itemStyle: { color: '#ee6666' } },
|
||||
// { value: Math.floor(Math.random() * 100) + 1, name: "全部合格", itemStyle: { color: '#91cc75' } },
|
||||
];
|
||||
// pieRef2.value.init();
|
||||
chartsData3.value = [
|
||||
@@ -276,7 +279,7 @@ const getPieData = () => {
|
||||
// { value: Math.floor(Math.random() * 100) + 1, name: "有不合格项已生成报告" },
|
||||
// { value: Math.floor(Math.random() * 100) + 1, name: "全部合格已生成报告" },
|
||||
];
|
||||
// pieRef3.value.init();
|
||||
|
||||
pieRef1.value.init();
|
||||
pieRef2.value.init();
|
||||
pieRef3.value.init();
|
||||
@@ -598,10 +601,10 @@ onUnmounted(() => {
|
||||
|
||||
.charts_info {
|
||||
flex: none;
|
||||
width: 32.9%;
|
||||
width: 33.4%;
|
||||
height: 100% !important;
|
||||
background-color: #fff;
|
||||
border-radius: 4px;
|
||||
// border-radius: 4px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -148,18 +148,19 @@
|
||||
<el-row :gutter="24" >
|
||||
<el-col :span="8">
|
||||
<el-form-item label='是否加密' prop='encryptionFlag' :label-width="100">
|
||||
<el-select v-model="formContent.encryptionFlag" clearable placeholder="请选择是否加密" @change="handleEncryptionChange">
|
||||
<!-- <el-select v-model="formContent.encryptionFlag" clearable placeholder="请选择是否加密" @change="handleEncryptionChange">-->
|
||||
<el-select v-model="formContent.encryptionFlag" clearable placeholder="请选择是否加密">
|
||||
<el-option label="是" :value="1"></el-option>
|
||||
<el-option label="否" :value="0"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" v-if="IsPasswordShow">
|
||||
<el-col :span="8" v-if="formContent.encryptionFlag">
|
||||
<el-form-item label='识别码' prop='series' clearable :label-width="100">
|
||||
<el-input v-model='formContent.series' placeholder="请输入识别码" show-password/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" v-if="IsPasswordShow">
|
||||
<el-col :span="8" v-if="formContent.encryptionFlag">
|
||||
<el-form-item label='密钥' prop='devKey' clearable :label-width="100">
|
||||
<el-input v-model='formContent.devKey' placeholder="请输入密钥" show-password/>
|
||||
</el-form-item>
|
||||
@@ -230,7 +231,7 @@ import MonitorTable from '@/views/machine/device/components/monitorTab.vue';
|
||||
|
||||
const MonIsShow = ref(false)
|
||||
const DevIsShow = ref(false)
|
||||
const IsPasswordShow = ref(false)
|
||||
// const IsPasswordShow = ref(false)
|
||||
const dictStore = useDictStore()
|
||||
const mode = ref()
|
||||
// 定义弹出组件元信息
|
||||
@@ -258,7 +259,7 @@ const disabledDate = (time: Date) => {
|
||||
protocol: 'MMS',
|
||||
ip: '192.168.1.200',
|
||||
port: 102,
|
||||
encryptionFlag: 1,
|
||||
encryptionFlag: 0,
|
||||
reCheckNum:0,
|
||||
state: 1,
|
||||
})
|
||||
@@ -284,7 +285,7 @@ const disabledDate = (time: Date) => {
|
||||
protocol: 'MMS',
|
||||
ip: '192.168.1.200',
|
||||
port: 102,
|
||||
encryptionFlag: 1,
|
||||
encryptionFlag: 0,
|
||||
reCheckNum:0,
|
||||
state: 1,
|
||||
}
|
||||
@@ -344,12 +345,10 @@ const disabledDate = (time: Date) => {
|
||||
try {
|
||||
dialogFormRef.value?.validate(async (valid: boolean) => {
|
||||
|
||||
if (formContent.value.encryptionFlag === 1) {
|
||||
handleEncryptionChange(1)
|
||||
} else {
|
||||
handleEncryptionChange(0)
|
||||
if (formContent.value.encryptionFlag === 0) {
|
||||
formContent.value.series = ''
|
||||
formContent.value.devKey = ''
|
||||
}
|
||||
|
||||
if (valid) {
|
||||
formContent.value.createDate = dayjs(formContent.value.createDate).format('YYYY-MM-DD');
|
||||
if (formContent.value.arrivedDate)
|
||||
@@ -401,34 +400,34 @@ const open = (sign: string, data: Device.ResPqDev,currentMode: string) => {
|
||||
}
|
||||
|
||||
if (data.encryptionFlag === 1) {
|
||||
handleEncryptionChange(1)
|
||||
//handleEncryptionChange(1)
|
||||
} else {
|
||||
handleEncryptionChange(0)
|
||||
//handleEncryptionChange(0)
|
||||
}
|
||||
if (data.id) {
|
||||
formContent.value = { ...data }
|
||||
} else {
|
||||
resetFormContent()
|
||||
handleEncryptionChange(1)
|
||||
//handleEncryptionChange(1)
|
||||
}
|
||||
|
||||
// 重置表单
|
||||
dialogFormRef.value?.resetFields()
|
||||
}
|
||||
const handleEncryptionChange = (value: number) => {
|
||||
// 根据是否加密来显示或隐藏识别码和密钥
|
||||
if(value === 1){
|
||||
IsPasswordShow.value = true
|
||||
|
||||
}else
|
||||
{
|
||||
IsPasswordShow.value = false
|
||||
// formContent.value.series = ''
|
||||
// formContent.value.devKey = ''
|
||||
// rules.value.series = [];
|
||||
// rules.value.devKey = [];
|
||||
}
|
||||
}
|
||||
// const handleEncryptionChange = (value: number) => {
|
||||
// // 根据是否加密来显示或隐藏识别码和密钥
|
||||
// if(value === 1){
|
||||
// IsPasswordShow.value = true
|
||||
//
|
||||
// }else
|
||||
// {
|
||||
// IsPasswordShow.value = false
|
||||
// // formContent.value.series = ''
|
||||
// // formContent.value.devKey = ''
|
||||
// // rules.value.series = [];
|
||||
// // rules.value.devKey = [];
|
||||
// }
|
||||
// }
|
||||
|
||||
// 对外映射
|
||||
defineExpose({ open })
|
||||
|
||||
@@ -69,19 +69,19 @@ const columns = reactive<ColumnProps<Device.ResPqDev>[]>([
|
||||
prop: 'name',
|
||||
label: '设备名称',
|
||||
search: { el: 'input' },
|
||||
minWidth: 180,
|
||||
minWidth: 200,
|
||||
},
|
||||
{
|
||||
prop: 'devType',
|
||||
label: '设备类型',
|
||||
minWidth: 180,
|
||||
minWidth: 200,
|
||||
enum: dictStore.getDictData('Dev_Type'),
|
||||
fieldNames: { label: 'name', value: 'id' },
|
||||
},
|
||||
{
|
||||
prop: 'createDate',
|
||||
label: '生产日期',
|
||||
minWidth: 180,
|
||||
minWidth: 200,
|
||||
search: {
|
||||
span: 2,
|
||||
render: () => {
|
||||
@@ -120,7 +120,7 @@ const columns = reactive<ColumnProps<Device.ResPqDev>[]>([
|
||||
enum: dictStore.getDictData('Dev_Manufacturers'),
|
||||
search: { el: 'select', props: { filterable: true }, order: 1 },
|
||||
fieldNames: { label: 'name', value: 'id' },
|
||||
minWidth: 190,
|
||||
minWidth: 200,
|
||||
},
|
||||
{ prop: 'operation', label: '操作', fixed: 'right', width: 200 },
|
||||
])
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
<div >
|
||||
<el-form :model="formContent" ref='dialogFormRef' :rules='rules' >
|
||||
<el-row :gutter="24">
|
||||
<!-- <el-col :span="8">-->
|
||||
<!-- <el-form-item label="检测源名称" prop="name" >-->
|
||||
<!-- <el-input v-model='formContent.name' placeholder="检测源类型+设备类型+数字"/>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
<el-col :span="8">
|
||||
<el-form-item label="检测源名称" prop="name" >
|
||||
<el-input v-model='formContent.name' placeholder="源类型+源型号+数字"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="源型号" prop="devType" >
|
||||
<el-form-item label="设备类型" prop="devType" >
|
||||
<el-select v-model='formContent.devType' placeholder="请选择源型号">
|
||||
<el-option
|
||||
v-for="item in dictStore.getDictData(dictTypeCode)"
|
||||
@@ -21,8 +21,8 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="源类型" prop="type">
|
||||
<el-select v-model='formContent.type' placeholder="请选择源类型">
|
||||
<el-form-item label="检测源类型" prop="type">
|
||||
<el-select v-model='formContent.type' placeholder="请选择检测源类型">
|
||||
<el-option
|
||||
v-for="item in dictStore.getDictData('Pq_Source_Type')"
|
||||
:key="item.id"
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
},
|
||||
{
|
||||
prop: 'devType',
|
||||
label: '源型号',
|
||||
label: '设备类型',
|
||||
enum: dictStore.getDictData('S_Dev_Type_'+dictStore.getDictData('Pattern').find(item=>item.name=== modeStore.currentMode)?.code),
|
||||
fieldNames: { label: 'name', value: 'id' },
|
||||
search: { el: 'select' },
|
||||
@@ -75,7 +75,7 @@
|
||||
},
|
||||
{
|
||||
prop: 'type',
|
||||
label: '源类型',
|
||||
label: '检测源类型',
|
||||
enum: dictStore.getDictData('Pq_Source_Type'),
|
||||
fieldNames: { label: 'name', value: 'id' },
|
||||
search: { el: 'select' },
|
||||
|
||||
@@ -66,10 +66,15 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label='检测功能' :label-width='100' prop='device_Id'>
|
||||
<!-- <el-form-item label='检测功能' :label-width='100' prop='device_Id'>
|
||||
<el-checkbox v-model="checked1" label="守时检测" size="large" />
|
||||
</el-form-item> -->
|
||||
<el-form-item label="守时检测" :label-width="100">
|
||||
<el-radio-group v-model="timeFlag" >
|
||||
<el-radio value="1">是</el-radio>
|
||||
<el-radio value="0">否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
</div>
|
||||
<template #footer>
|
||||
@@ -109,6 +114,7 @@
|
||||
};
|
||||
}>();
|
||||
const checked1 = ref(false)
|
||||
const timeFlag = ref('0')
|
||||
const fatherPlanList = [
|
||||
{ label: '/', value: 'type0' },
|
||||
{ label: '检测计划1', value: 'type1' },
|
||||
|
||||
Reference in New Issue
Block a user