样式调整

This commit is contained in:
GYYM
2024-12-04 21:36:12 +08:00
parent aa86c5e662
commit a415ffa12a
9 changed files with 239 additions and 142 deletions

View File

@@ -48,7 +48,7 @@ const data = [
{ {
id: '1', //装置序号ID id: '1', //装置序号ID
name: '240001', //设备名称 name: '240001', //设备名称
dev_Type: 'PQS882A',//设备类型 dev_Type: 'PQS-882A',//设备类型
dev_Chns: 1, //设备通道数 dev_Chns: 1, //设备通道数
check_Result: '未检测', //检测结果 check_Result: '未检测', //检测结果
report_State: '未生成', //报告状态 report_State: '未生成', //报告状态
@@ -59,7 +59,7 @@ const data = [
{ {
id: '2', //装置序号ID id: '2', //装置序号ID
name: '240002', //设备名称 name: '240002', //设备名称
dev_Type: 'PQS882B4',//设备类型 dev_Type: 'PQS-882B4',//设备类型
dev_Chns: 4, //设备通道数 dev_Chns: 4, //设备通道数
check_Result: '未检测', //检测结果 check_Result: '未检测', //检测结果
report_State: '未生成', //报告状态 report_State: '未生成', //报告状态
@@ -70,7 +70,7 @@ const data = [
{ {
id: '3', //装置序号ID id: '3', //装置序号ID
name: '240003', //设备名称 name: '240003', //设备名称
dev_Type: 'PQS882B4',//设备类型 dev_Type: 'PQS-882B4',//设备类型
dev_Chns: 4, //设备通道数 dev_Chns: 4, //设备通道数
check_Result: '未检测', //检测结果 check_Result: '未检测', //检测结果
report_State: '未生成', //报告状态 report_State: '未生成', //报告状态
@@ -81,7 +81,7 @@ const data = [
{ {
id: '4', //装置序号ID id: '4', //装置序号ID
name: '240004', //设备名称 name: '240004', //设备名称
dev_Type: 'PQS882A',//设备类型 dev_Type: 'PQS-882A',//设备类型
dev_Chns: 1, //设备通道数 dev_Chns: 1, //设备通道数
check_Result: '未检测', //检测结果 check_Result: '未检测', //检测结果
report_State: '未生成', //报告状态 report_State: '未生成', //报告状态
@@ -92,20 +92,20 @@ const data = [
{ {
id: '5', //装置序号ID id: '5', //装置序号ID
name: '240005', //设备名称 name: '240005', //设备名称
dev_Type: 'PQS882A',//设备类型 dev_Type: 'PQS-882A',//设备类型
dev_Chns: 1, //设备通道数 dev_Chns: 1, //设备通道数
check_Result: '不合格', //检测结果 check_Result: '不合格', //检测结果
report_State: '未生成', //报告状态 report_State: '未生成', //报告状态
document_State: '未归档', //归档状态 document_State: '未归档', //归档状态
check_State:'检测完成',//检测状态 check_State:'检测完成',//检测状态
reCheck_Num: 0, //复检次数 reCheck_Num: 1, //复检次数
}, },
{ {
id: '6', //装置序号ID id: '6', //装置序号ID
name: '240006', //设备名称 name: '240006', //设备名称
dev_Type: 'PQS882B4',//设备类型 dev_Type: 'PQS-882B4',//设备类型
dev_Chns: 4, //设备通道数 dev_Chns: 4, //设备通道数
check_Result: '不合格', //检测结果 check_Result: '不合格', //检测结果
report_State: '未生成', //报告状态 report_State: '未生成', //报告状态
document_State: '未归档', //归档状态 document_State: '未归档', //归档状态
check_State:'检测完成',//检测状态 check_State:'检测完成',//检测状态
@@ -114,9 +114,9 @@ const data = [
{ {
id: '7', //装置序号ID id: '7', //装置序号ID
name: '240007', //设备名称 name: '240007', //设备名称
dev_Type: 'PQS882A',//设备类型 dev_Type: 'PQS-882A',//设备类型
dev_Chns: 1, //设备通道数 dev_Chns: 1, //设备通道数
check_Result: '全部合格', //检测结果 check_Result: '合格', //检测结果
report_State: '未生成', //报告状态 report_State: '未生成', //报告状态
document_State: '未归档', //归档状态 document_State: '未归档', //归档状态
check_State:'检测完成',//检测状态 check_State:'检测完成',//检测状态
@@ -125,20 +125,20 @@ const data = [
{ {
id: '8', //装置序号ID id: '8', //装置序号ID
name: '240008', //设备名称 name: '240008', //设备名称
dev_Type: 'PQS882B4',//设备类型 dev_Type: 'PQS-882B4',//设备类型
dev_Chns: 4, //设备通道数 dev_Chns: 4, //设备通道数
check_Result: '全部合格', //检测结果 check_Result: '合格', //检测结果
report_State: '未生成', //报告状态 report_State: '未生成', //报告状态
document_State: '未归档', //归档状态 document_State: '未归档', //归档状态
check_State:'检测完成',//检测状态 check_State:'检测完成',//检测状态
reCheck_Num: 0, //复检次数 reCheck_Num: 1, //复检次数
}, },
{ {
id: '9', //装置序号ID id: '9', //装置序号ID
name: '240009', //设备名称 name: '240009', //设备名称
dev_Type: 'PQS882B4',//设备类型 dev_Type: 'PQS-882B4',//设备类型
dev_Chns: 4, //设备通道数 dev_Chns: 4, //设备通道数
check_Result: '不合格', //检测结果 check_Result: '不合格', //检测结果
report_State: '已生成', //报告状态 report_State: '已生成', //报告状态
document_State: '未归档', //归档状态 document_State: '未归档', //归档状态
check_State:'检测完成',//检测状态 check_State:'检测完成',//检测状态
@@ -147,9 +147,9 @@ const data = [
{ {
id: '10', //装置序号ID id: '10', //装置序号ID
name: '240010', //设备名称 name: '240010', //设备名称
dev_Type: 'PQS882A',//设备类型 dev_Type: 'PQS-882A',//设备类型
dev_Chns: 1, //设备通道数 dev_Chns: 1, //设备通道数
check_Result: '全部合格', //检测结果 check_Result: '合格', //检测结果
report_State: '已生成', //报告状态 report_State: '已生成', //报告状态
document_State: '未归档', //归档状态 document_State: '未归档', //归档状态
check_State:'检测完成',//检测状态 check_State:'检测完成',//检测状态
@@ -158,9 +158,9 @@ const data = [
{ {
id: '11', //装置序号ID id: '11', //装置序号ID
name: '240011', //设备名称 name: '240011', //设备名称
dev_Type: 'PQS882A',//设备类型 dev_Type: 'PQS-882A',//设备类型
dev_Chns: 1, //设备通道数 dev_Chns: 1, //设备通道数
check_Result: '全部合格', //检测结果 check_Result: '合格', //检测结果
report_State: '已生成', //报告状态 report_State: '已生成', //报告状态
document_State: '已归档', //归档状态 document_State: '已归档', //归档状态
check_State:'检测完成',//检测状态 check_State:'检测完成',//检测状态
@@ -169,9 +169,9 @@ const data = [
{ {
id: '12', //装置序号ID id: '12', //装置序号ID
name: '240012', //设备名称 name: '240012', //设备名称
dev_Type: 'PQS882B4',//设备类型 dev_Type: 'PQS-882B4',//设备类型
dev_Chns: 4, //设备通道数 dev_Chns: 4, //设备通道数
check_Result: '全部合格', //检测结果 check_Result: '合格', //检测结果
report_State: '已生成', //报告状态 report_State: '已生成', //报告状态
document_State: '已归档', //归档状态 document_State: '已归档', //归档状态
check_State:'检测完成',//检测状态 check_State:'检测完成',//检测状态
@@ -180,7 +180,7 @@ const data = [
{ {
id: '13', //装置序号ID id: '13', //装置序号ID
name: '240013', //设备名称 name: '240013', //设备名称
dev_Type: 'PQS882A',//设备类型 dev_Type: 'PQS-882A',//设备类型
dev_Chns: 1, //设备通道数 dev_Chns: 1, //设备通道数
check_Result: '未检测', //检测结果 check_Result: '未检测', //检测结果
report_State: '未生成', //报告状态 report_State: '未生成', //报告状态
@@ -191,7 +191,7 @@ const data = [
{ {
id: '14', //装置序号ID id: '14', //装置序号ID
name: '240014', //设备名称 name: '240014', //设备名称
dev_Type: 'PQS882A',//设备类型 dev_Type: 'PQS-882A',//设备类型
dev_Chns: 1, //设备通道数 dev_Chns: 1, //设备通道数
check_Result: '未检测', //检测结果 check_Result: '未检测', //检测结果
report_State: '未生成', //报告状态 report_State: '未生成', //报告状态
@@ -202,7 +202,7 @@ const data = [
{ {
id: '15', //装置序号ID id: '15', //装置序号ID
name: '240013', //设备名称 name: '240013', //设备名称
dev_Type: 'PQS882A',//设备类型 dev_Type: 'PQS-882A',//设备类型
dev_Chns: 1, //设备通道数 dev_Chns: 1, //设备通道数
check_Result: '未检测', //检测结果 check_Result: '未检测', //检测结果
report_State: '未生成', //报告状态 report_State: '未生成', //报告状态
@@ -213,7 +213,7 @@ const data = [
{ {
id: '16', //装置序号ID id: '16', //装置序号ID
name: '240014', //设备名称 name: '240014', //设备名称
dev_Type: 'PQS882A',//设备类型 dev_Type: 'PQS-882A',//设备类型
dev_Chns: 1, //设备通道数 dev_Chns: 1, //设备通道数
check_Result: '未检测', //检测结果 check_Result: '未检测', //检测结果
report_State: '未生成', //报告状态 report_State: '未生成', //报告状态
@@ -224,7 +224,7 @@ const data = [
{ {
id: '17', //装置序号ID id: '17', //装置序号ID
name: '240017', //设备名称 name: '240017', //设备名称
dev_Type: 'PQS882A',//设备类型 dev_Type: 'PQS-882A',//设备类型
dev_Chns: 1, //设备通道数 dev_Chns: 1, //设备通道数
check_Result: '未检测', //检测结果 check_Result: '未检测', //检测结果
report_State: '未生成', //报告状态 report_State: '未生成', //报告状态
@@ -235,7 +235,7 @@ const data = [
{ {
id: '18', //装置序号ID id: '18', //装置序号ID
name: '240018', //设备名称 name: '240018', //设备名称
dev_Type: 'PQS882A',//设备类型 dev_Type: 'PQS-882A',//设备类型
dev_Chns: 1, //设备通道数 dev_Chns: 1, //设备通道数
check_Result: '未检测', //检测结果 check_Result: '未检测', //检测结果
report_State: '未生成', //报告状态 report_State: '未生成', //报告状态
@@ -246,7 +246,7 @@ const data = [
{ {
id: '19', //装置序号ID id: '19', //装置序号ID
name: '240019', //设备名称 name: '240019', //设备名称
dev_Type: 'PQS882A',//设备类型 dev_Type: 'PQS-882A',//设备类型
dev_Chns: 1, //设备通道数 dev_Chns: 1, //设备通道数
check_Result: '未检测', //检测结果 check_Result: '未检测', //检测结果
report_State: '未生成', //报告状态 report_State: '未生成', //报告状态
@@ -257,7 +257,7 @@ const data = [
{ {
id: '20', //装置序号ID id: '20', //装置序号ID
name: '240020', //设备名称 name: '240020', //设备名称
dev_Type: 'PQS882A',//设备类型 dev_Type: 'PQS-882A',//设备类型
dev_Chns: 1, //设备通道数 dev_Chns: 1, //设备通道数
check_Result: '未检测', //检测结果 check_Result: '未检测', //检测结果
report_State: '未生成', //报告状态 report_State: '未生成', //报告状态

View File

@@ -7,7 +7,7 @@
{ {
"id": 4, "id": 4,
"pid": 1, "pid": 1,
"name": "邯郸220kV团城站电能质量检测" "name": "邯郸220kV团城站电能质量检测11111111111111111111111111"
}, },
{ {
"id": 5, "id": 5,

View File

@@ -49,7 +49,21 @@ const init = () => {
text: customData.value.title, text: customData.value.title,
left: customData.value.textAlign, 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: { tooltip: {
show: true, show: true,
trigger: "item", trigger: "item",
@@ -61,6 +75,12 @@ const init = () => {
type: "pie", type: "pie",
radius: customData.value.isRing ? ["55", "75"] : "80%", radius: customData.value.isRing ? ["55", "75"] : "80%",
data: props.chartsData, 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%"], // 设置饼图的中心位置 center: ["55%", "50%"], // 设置饼图的中心位置
// padAngle: 2, // padAngle: 2,
minAngle: 15, //最小角度 minAngle: 15, //最小角度
@@ -75,11 +95,14 @@ const init = () => {
label: { label: {
normal: { normal: {
show: true, show: true,
position: "inside", position: "outside",
textStyle: { textStyle: {
color: "#fff", //color: "#fff",
fontSize: 12, fontSize: 12,
}, },
formatter: function (data) {
return data.value
}
}, },
}, },
itemStyle: { itemStyle: {

View File

@@ -1,7 +1,7 @@
<template> <template>
<div> <div>
<el-tabs type="border-card"> <el-tabs type="border-card">
<el-tab-pane label="预检测项目"> <el-tab-pane label="预检测项目">
<div class="form-grid"> <div class="form-grid">
<el-checkbox <el-checkbox
v-for="(item, index) in detectionOptions" v-for="(item, index) in detectionOptions"
@@ -87,19 +87,19 @@ const step2InitLog = ref([
const step2Log = ref([ const step2Log = ref([
{ {
type: 'info', type: 'info',
log:'被检设备1通讯校验成功', log:'被检设备240001通讯校验成功',
}, },
{ {
type: 'info', type: 'info',
log:'被检设备2通讯校验成功', log:'被检设备240002通讯校验成功',
}, },
{ {
type: 'info', type: 'info',
log:'被检设备3通讯校验成功', log:'被检设备240003通讯校验成功',
}, },
{ {
type: 'info', type: 'info',
log:'被检设备4通讯校验成功', log:'被检设备240004通讯校验成功',
}, },
]) ])
@@ -113,19 +113,19 @@ const step3InitLog = ref([
const step3Log = ref([ const step3Log = ref([
{ {
type: 'info', type: 'info',
log:'被检设备1协议校验成功', log:'被检设备240001协议校验成功',
}, },
{ {
type: 'info', type: 'info',
log:'被检设备2协议校验成功', log:'被检设备240002协议校验成功',
}, },
{ {
type: 'info', type: 'info',
log:'被检设备3协议校验成功', log:'被检设备240003协议校验成功',
}, },
{ {
type: 'info', type: 'info',
log:'被检设备4协议校验成功', log:'被检设备240004协议校验成功',
}, },
]) ])
@@ -140,19 +140,19 @@ const step4InitLog = ref([
const step4Log = ref([ const step4Log = ref([
{ {
type: 'info', type: 'info',
log:'被检设备1相序校验成功', log:'被检设备240001相序校验成功',
}, },
{ {
type: 'info', type: 'info',
log:'被检设备2相序校验成功', log:'被检设备240002相序校验成功',
}, },
{ {
type: 'info', type: 'info',
log:'被检设备3相序校验成功', log:'被检设备240003相序校验成功',
}, },
{ {
type: 'info', type: 'info',
log:'被检设备4相序校验成功', log:'被检设备240004相序校验成功',
}, },
]) ])

View File

@@ -8,7 +8,7 @@
:init-param="initParam" :init-param="initParam"
:data-callback="dataCallback" :data-callback="dataCallback"
@drag-sort="sortTable" @drag-sort="sortTable"
:default-sort="{ prop: 'check_State', order: 'ascending' }"
:stripe="true" :stripe="true"
:pagination = "false" :pagination = "false"
:key="tableKey" :key="tableKey"
@@ -18,17 +18,18 @@
<!-- 表格 header 按钮 --> <!-- 表格 header 按钮 -->
<template #tableHeader="scope"> <template #tableHeader="scope">
<el-form :model="form" :inline="true"> <el-form :model="form" :inline="true">
<el-form-item label="关键字搜索"> <el-form-item label="关键字">
<el-input v-model="form.search" placeholder="输入设备名称类型搜索"></el-input> <el-input v-model="form.search" placeholder="输入设备名称类型"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="检测状态" v-if="form.activeTabs != 3 && form.activeTabs != 5"> <el-form-item label="检测状态" v-if="form.activeTabs != 3 && form.activeTabs != 5">
<el-select v-model="form.checkStatus" clearable> <el-select v-model="form.checkStatus" clearable>
<el-option <el-option
v-for="(item, index) in checkStatusList" v-for="(item, index) in checkResultList"
:label="item.label" :label="item.label"
:value="item.value" :value="item.value"
:disabled="item.disabled" :disabled="item.disabled"
:key="index" :key="index"
v-show="shouldShowOption(item)"
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
@@ -40,6 +41,7 @@
:value="item.value" :value="item.value"
:disabled="item.disabled" :disabled="item.disabled"
:key="index" :key="index"
v-show="shouldShowOption(item)"
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
@@ -51,6 +53,7 @@
:value="item.value" :value="item.value"
:disabled="item.disabled" :disabled="item.disabled"
:key="index" :key="index"
v-show="shouldShowOption(item)"
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
@@ -72,20 +75,22 @@
<el-button :icon="Delete" @click="handleRefresh" <el-button :icon="Delete" @click="handleRefresh"
>重置</el-button >重置</el-button
> >
<!-- :disabled='!scope.isSelected' -->
<el-button <el-button
type="primary" type="primary"
:icon="Clock" :icon="Clock"
@click="handleTest('手动检测')" @click="handleTest('手动检测')"
v-if="form.activeTabs === 0" v-if="form.activeTabs === 0"
:disabled='!scope.isSelected'
>手动检测</el-button >手动检测</el-button
> >
<!-- :disabled='!scope.isSelected' -->
<el-button <el-button
type="primary" type="primary"
:icon="ChatLineRound" :icon="ChatLineRound"
@click="handleTest('自动检测')" @click="handleTest('自动检测')"
v-if="form.activeTabs === 0" v-if="form.activeTabs === 0"
:disabled='!scope.isSelected'
>自动检测</el-button >自动检测</el-button
> >
<el-button type="primary" :icon="ChatLineSquare" @click="handleTest('不合格项复检')" v-if="form.activeTabs === 2" <el-button type="primary" :icon="ChatLineSquare" @click="handleTest('不合格项复检')" v-if="form.activeTabs === 2"
@@ -95,15 +100,18 @@
>全部复检</el-button >全部复检</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" <!-- :disabled="!scope.isSelected || scope.selectedList.filter((item) => item.check_State === '检测完成').length === 0" -->
>批量下载</el-button <el-button type="primary" :icon="Notebook" @click="handleTest('批量归档')" v-if="form.activeTabs === 0"
> >归档</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
> >
<el-button type="primary" :icon="CirclePlus" @click="addDevice('设备新增')" v-if="form.activeTabs === 0" <el-button type="primary" :icon="CirclePlus" @click="addDevice('设备新增')" v-if="form.activeTabs === 0"
>设备新增</el-button >设备新增</el-button
@@ -154,7 +162,7 @@
>数据查看</el-button >数据查看</el-button
> --> > -->
<el-button <el-button
type="primary" :type="scope.row.check_State === '检测完成' ? 'primary' : 'info'"
link link
:icon="Notebook" :icon="Notebook"
@click="openDrawer('归档', scope.row)" @click="openDrawer('归档', scope.row)"
@@ -237,6 +245,9 @@ import dataCheckChangeErrSysPopup from "./dataCheckChangeErrSysPopup.vue";
import { reactive, ref } from "vue"; import { reactive, ref } from "vue";
let devNum = 0;//当前选取的被检设备数量
let devChannelsNum = 0;//当前选择的被检设备通道总数
let devTestedNum = 0;//当前选择的已完成检测的被检设备数量
const tableKey = ref(0); const tableKey = ref(0);
const router = useRouter(); const router = useRouter();
const value1 = ref(""); const value1 = ref("");
@@ -257,13 +268,20 @@ const dialogForm = ref<any>({
enable:1, enable:1,
state:1, state:1,
}); });
const shouldShowOption = (item) => {
console.log(item,12345)
return !item.disabled;
};
//console.log(window.innerHeight, "+++++++++"); //console.log(window.innerHeight, "+++++++++");
tableHeight.value = window.innerHeight - 600; tableHeight.value = window.innerHeight - 600;
//const deviceData = deviceDataList.plan_devicedata //const deviceData = deviceDataList.plan_devicedata
const deviceData = ref([]); const deviceData = ref([]);
deviceData.value = deviceDataList.plan_devicedata.filter((item) => item.document_State === "未归档") deviceData.value = deviceDataList.plan_devicedata.filter((item) => item.document_State === "未归档")
const operationShow = ref(false); const operationShow = ref(false);
const documentStateShow = ref(false);
const checkStateShow = ref(true);
const operationMinWidth = ref(200); const operationMinWidth = ref(200);
const selectionShow = ref(true);
//下拉框数据 //下拉框数据
//检测状态数据 //检测状态数据
@@ -315,71 +333,17 @@ let checkResultList = reactive([
disabled: false, disabled: false,
}, },
{ {
label: "不合格", label: "不合格",
value: 1, value: 1,
disabled: false, disabled: false,
}, },
{ {
label: "全部合格", label: "合格",
value: 2, value: 2,
disabled: false, 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({ const form: any = ref({
activeTabs: 0, //功能选择 activeTabs: 0, //功能选择
@@ -427,13 +391,13 @@ const getTableList = (params: any) => {
}; };
// 表格配置项 // 表格配置项
const columns = reactive<ColumnProps<Device.ResPqDev>[]>([ const columns = reactive([
{ type: 'selection', fixed: 'left', width: 70 }, { type: 'selection', fixed: 'left', width: 70, isShow:selectionShow },
{ type: 'index', fixed: 'left', width: 70, label: '序号' }, { type: 'index', fixed: 'left', width: 70, label: '序号' },
{ {
prop: 'name', prop: 'name',
label: '设备名称', label: '设备名称',
minWidth: 120, minWidth: 220,
}, },
{ {
prop: 'dev_Type', prop: 'dev_Type',
@@ -448,21 +412,42 @@ const columns = reactive<ColumnProps<Device.ResPqDev>[]>([
}, },
{ {
prop: 'reCheck_Num', prop: 'reCheck_Num',
label: '检次数', label: '检次数',
minWidth: 100, minWidth: 100,
sortable:true, 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', prop: 'check_State',
label: '检测状态', label: '检测状态',
minWidth: 100, minWidth: 100,
sortable:true, sortable:true,
isShow:checkStateShow,
}, },
{ {
prop: 'check_Result', prop: 'check_Result',
label: '检测结果', label: '检测结果',
minWidth: 100, minWidth: 100,
sortable:true, 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', prop: 'report_State',
@@ -475,6 +460,7 @@ const columns = reactive<ColumnProps<Device.ResPqDev>[]>([
label: '归档状态', label: '归档状态',
minWidth: 100, minWidth: 100,
sortable:true, sortable:true,
isShow: documentStateShow,
}, },
{ prop: 'operation', label: '操作', fixed: 'right', minWidth: 200 ,isShow: operationShow}, { prop: 'operation', label: '操作', fixed: 'right', minWidth: 200 ,isShow: operationShow},
]) ])
@@ -641,9 +627,16 @@ const resetSearchForm = () => {
}; };
}; };
let testType = "test";//检测还是复检 let testType = "test";//检测还是复检
const handleSelectionChange = (selection: any[]) => { 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) if(result.length > 0)
{ {
testType= "test"; testType= "test";
@@ -652,7 +645,6 @@ const handleSelectionChange = (selection: any[]) => {
{ {
testType= "reTest"; testType= "reTest";
} }
console.log(selection);
} }
//查询 //查询
@@ -757,6 +749,9 @@ function tableHeaderInit(val: number) {
columns[columns.length - 1].minWidth = 100; columns[columns.length - 1].minWidth = 100;
tableKey.value ++; tableKey.value ++;
operationShow.value = true; operationShow.value = true;
documentStateShow.value = false;
checkStateShow.value = true;
selectionShow.value = true;
break; break;
case 2://设备复检 case 2://设备复检
// form.value.checkStatus = 2;//检测状态默认为检测完成 // form.value.checkStatus = 2;//检测状态默认为检测完成
@@ -780,6 +775,9 @@ function tableHeaderInit(val: number) {
columns[columns.length - 1].minWidth = 180; columns[columns.length - 1].minWidth = 180;
tableKey.value += 1; tableKey.value += 1;
operationShow.value = true; operationShow.value = true;
documentStateShow.value = true;
checkStateShow.value = false;
selectionShow.value = true;
break; break;
case 4://设备归档 case 4://设备归档
// form.value.checkStatus = 2;//检测状态默认为检测完成 // form.value.checkStatus = 2;//检测状态默认为检测完成
@@ -793,13 +791,20 @@ function tableHeaderInit(val: number) {
columns[columns.length - 1].minWidth = 100; columns[columns.length - 1].minWidth = 100;
tableKey.value ++; tableKey.value ++;
operationShow.value = true; operationShow.value = true;
documentStateShow.value = true;
checkStateShow.value = false;
selectionShow.value = true;
break; break;
case 5://数据查询 case 5://数据查询
disablecheckResultList("未检测") disablecheckResultList("未检测")
disableCheckReportStatus("未检测") disableCheckReportStatus("未检测")
columns[columns.length - 1].minWidth = 250; columns[columns.length - 1].minWidth = 250;
tableKey.value += 1;
operationShow.value = true; operationShow.value = true;
documentStateShow.value = true;
checkStateShow.value = false;
selectionShow.value = false;
columns[0].isShow = false;
tableKey.value += 1;
break; break;
} }
console.log("test",columns); console.log("test",columns);
@@ -808,6 +813,12 @@ console.log("test",columns);
tableHeaderInit(0) tableHeaderInit(0)
function refreshStatusList(){ function refreshStatusList(){
// devNum = 0;
// devChannelsNum = 0;
// devTestedNum = 0;
devNum = 0;
devChannelsNum = 0;
devTestedNum = 0;
checkStatusList.map((item: any, index: any) => { checkStatusList.map((item: any, index: any) => {
if (item.disabled) { if (item.disabled) {
item.disabled = false; item.disabled = false;
@@ -856,12 +867,49 @@ const addDevice = (val:string) => {
path: "/machine/device", path: "/machine/device",
}); });
}; };
const handleTest = (val:string) => { const handleTest = (val:string) => {
if(devNum == 0)
{
ElMessageBox.confirm(
'请先选择被检设备',
'提示',
{
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}
)
return
}
if(val==='手动检测'||val==='自动检测'||val==='不合格项复检'||val==='全部复检' ) 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") if(testType === "reTest")
{ {
ElMessageBox.confirm( ElMessageBox.confirm(
@@ -895,16 +943,30 @@ const handleTest = (val:string) => {
dialogTitle.value = val; dialogTitle.value = val;
dialogFormVisible.value = true; // 打开对话框 dialogFormVisible.value = true; // 打开对话框
} }
return
} }
if(devTestedNum == 0)
{
ElMessageBox.confirm(
'请先选择检测完成状态的被检设备',
'提示',
{
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}
)
return
}
if(val==='批量生成') if(val==='批量生成')
{ {
reportDialogVisible.value = true; reportDialogVisible.value = true;
return
} }
if(val==='批量归档') if(val==='归档')
{ {
const loading = ElLoading.service({ const loading = ElLoading.service({
lock: true, lock: true,

View File

@@ -85,7 +85,7 @@ defineExpose({ getTreeData })
<style lang='scss' scoped> <style lang='scss' scoped>
.plan_tree { .plan_tree {
// width: 200px; // width: 200px;
// height: 100%; height: 100%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
padding: 5px; padding: 5px;
@@ -112,12 +112,15 @@ defineExpose({ getTreeData })
} }
.tree_container { .tree_container {
height: 100%;
width: 100%;
flex: 1; flex: 1;
overflow-y: auto; overflow-y: auto;
overflow-x: auto;
.el-tree { .el-tree {
height: 100%; height: 100%;
width: 100%; width: auto;
} }
} }
} }

View File

@@ -30,7 +30,7 @@
<el-collapse-item title="检测进度展示" name="1"> --> <el-collapse-item title="检测进度展示" name="1"> -->
<div class="container_pieShow"> <div class="container_pieShow">
<el-collapse model-value="1" accordion @change="handleCollapseChange"> <el-collapse model-value="1" accordion @change="handleCollapseChange">
<el-collapse-item title="&nbsp&nbsp&nbsp&nbsp检测进度展示:" name="1"> <el-collapse-item title="&nbsp&nbsp&nbsp&nbsp检测计划统计" name="1">
<!-- 饼图 --> <!-- 饼图 -->
<div class="container_charts"> <div class="container_charts">
<div class="charts_info" ref="chartsInfoRef"> <div class="charts_info" ref="chartsInfoRef">
@@ -249,6 +249,7 @@ const chartsData1: any = ref([]),
chartsData2: any = ref([]), chartsData2: any = ref([]),
chartsData3: any = ref([]); chartsData3: any = ref([]);
const getPieData = () => { const getPieData = () => {
chartsData1.value = [ chartsData1.value = [
{ value: Math.floor(Math.random() * 100) + 1, name: "未检测", itemStyle: { color: '#fac858' } }, { 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: '#ee6666' } },
@@ -257,8 +258,10 @@ const getPieData = () => {
]; ];
chartsData2.value = [ chartsData2.value = [
{ value: Math.floor(Math.random() * 100) + 1, name: "未检测" , itemStyle: { color: '#fac858' } }, { 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: '#ee6666' } },
{ value: Math.floor(Math.random() * 100) + 1, name: "全部合格", itemStyle: { color: '#91cc75' } }, { 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(); // pieRef2.value.init();
chartsData3.value = [ chartsData3.value = [
@@ -276,7 +279,7 @@ const getPieData = () => {
// { value: Math.floor(Math.random() * 100) + 1, name: "有不合格项已生成报告" }, // { value: Math.floor(Math.random() * 100) + 1, name: "有不合格项已生成报告" },
// { value: Math.floor(Math.random() * 100) + 1, name: "全部合格已生成报告" }, // { value: Math.floor(Math.random() * 100) + 1, name: "全部合格已生成报告" },
]; ];
// pieRef3.value.init();
pieRef1.value.init(); pieRef1.value.init();
pieRef2.value.init(); pieRef2.value.init();
pieRef3.value.init(); pieRef3.value.init();
@@ -598,10 +601,10 @@ onUnmounted(() => {
.charts_info { .charts_info {
flex: none; flex: none;
width: 32.9%; width: 33.4%;
height: 100% !important; height: 100% !important;
background-color: #fff; background-color: #fff;
border-radius: 4px; // border-radius: 4px;
} }
} }

View File

@@ -66,10 +66,15 @@
/> />
</el-select> </el-select>
</el-form-item> </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-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-item>
</el-form> </el-form>
</div> </div>
<template #footer> <template #footer>
@@ -109,6 +114,7 @@
}; };
}>(); }>();
const checked1 = ref(false) const checked1 = ref(false)
const timeFlag = ref('0')
const fatherPlanList = [ const fatherPlanList = [
{ label: '/', value: 'type0' }, { label: '/', value: 'type0' },
{ label: '检测计划1', value: 'type1' }, { label: '检测计划1', value: 'type1' },

View File

@@ -14,7 +14,7 @@
</el-button> </el-button>
<el-button type='primary' :icon='CirclePlus' @click='openAddDialog'>新增</el-button> <el-button type='primary' :icon='CirclePlus' @click='openAddDialog'>新增</el-button>
<el-button type='danger' :icon='Delete' plain :disabled='!scope.isSelected'> <el-button type='danger' :icon='Delete' plain :disabled='!scope.isSelected'>
批量删除 删除
</el-button> </el-button>
<input type='file' style='display: none' ref='fileInput' @change='handleFiles'> <input type='file' style='display: none' ref='fileInput' @change='handleFiles'>
</template> </template>