误差体系

This commit is contained in:
sjl
2024-12-05 20:11:26 +08:00
17 changed files with 358 additions and 319 deletions

View File

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

View File

@@ -8,7 +8,6 @@
:search-param='searchParam' :search-param='searchParam'
:search-col='searchCol' :search-col='searchCol'
/> />
<!-- 表格主体 --> <!-- 表格主体 -->
<div class='table-main' :class='{ card: showCard }' > <div class='table-main' :class='{ card: showCard }' >
<!-- 表格头部 操作按钮 --> <!-- 表格头部 操作按钮 -->
@@ -43,10 +42,11 @@
> >
<!-- 默认插槽 --> <!-- 默认插槽 -->
<slot /> <slot />
<template v-for='item in tableColumns' :key='item'> <template v-for='item in tableColumns' :key='item'>
<!-- selection || radio || index || expand || sort --> <!-- selection || radio || index || expand || sort -->
<el-table-column <el-table-column
v-if='item.type && columnTypes.includes(item.type)' v-if='item.type && columnTypes.includes(item.type) && item.isShow'
v-bind='item' v-bind='item'
:align="item.align ?? 'center'" :align="item.align ?? 'center'"
:reserve-selection="item.type == 'selection'" :reserve-selection="item.type == 'selection'"

View File

@@ -40,7 +40,7 @@ const init = () => {
icon: "roundRect", // 图例项的icon,类型包括 circle(圆形),rect(正方形),//roundRect(圆角正方形),triangle(三角形),diamond(菱形),//pin(大头针行),arrow(箭头形),none(无图例项的icon) icon: "roundRect", // 图例项的icon,类型包括 circle(圆形),rect(正方形),//roundRect(圆角正方形),triangle(三角形),diamond(菱形),//pin(大头针行),arrow(箭头形),none(无图例项的icon)
orient: "vertical", //图例排列方向 orient: "vertical", //图例排列方向
left: "right", //可选属性left,right,top,bottom,可选属性值 left,right,top,bottom,px,百分比,数值, left: "right", //可选属性left,right,top,bottom,可选属性值 left,right,top,bottom,px,百分比,数值,
itemGap: 1, // 设置图例项之间的间隔为20 itemGap: 10, // 设置图例项之间的间隔为20
...props.legendData, ...props.legendData,
}; };
chart.value = chartsRef.value && echarts.init(chartsRef.value); chart.value = chartsRef.value && echarts.init(chartsRef.value);
@@ -101,7 +101,7 @@ const init = () => {
fontSize: 12, fontSize: 12,
}, },
formatter: function (data) { formatter: function (data) {
return data.value return data.value +'台'
} }
}, },
}, },

View File

@@ -77,8 +77,8 @@
/* scroll bar */ /* scroll bar */
::-webkit-scrollbar { ::-webkit-scrollbar {
width: 6px; width: 8px;
height: 200px; height: 8px;
// background-color: var(--el-color-primary); // background-color: var(--el-color-primary);
} }
/* 滚动条实际可拖动部分的颜色 */ /* 滚动条实际可拖动部分的颜色 */

View File

@@ -142,13 +142,16 @@
margin-bottom: 15px; margin-bottom: 15px;
} }
} }
.el-table__body{
// border-left: 1px solid var(--el-table-border-color)
}
// el-table 表格样式 // el-table 表格样式
.el-table { .el-table {
// border: 1px solid var(--el-table-border-color);
// flex: 1; // flex: 1;
width: 100%; width: 100%;
height: 100%; height: 100%;
border-left: 1px solid var(--el-table-border-color)
// 修复 safari 浏览器表格错位 https://github.com/HalseySpicy/Geeker-Admin/issues/83 // 修复 safari 浏览器表格错位 https://github.com/HalseySpicy/Geeker-Admin/issues/83
table { table {
width: 100%; width: 100%;
@@ -398,7 +401,7 @@
&::-webkit-scrollbar { &::-webkit-scrollbar {
width: 8px !important; width: 8px !important;
height: 200px !important; height: 8px !important;
// background-color: var(--el-color-primary); // background-color: var(--el-color-primary);
z-index: 3001; z-index: 3001;
} }
@@ -457,27 +460,6 @@
} }
} }
.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%;
}
}
}
}
.cn-render-buttons { .cn-render-buttons {
cursor: pointer; cursor: pointer;

View File

@@ -4,19 +4,19 @@
<div class="change-errsys-title"> <div class="change-errsys-title">
<el-form :model='formContent' label-width="auto" class="form-three"> <el-form :model='formContent' label-width="auto" class="form-three">
<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-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-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-form-item label="误差体系:"> <el-form-item label="误差体系">
<el-select v-model="error_Sys_Id" autocomplete="off"> <el-select v-model="error_Sys_Id" autocomplete="off">
<el-option v-for="plan in testErrSystDataList" :key="plan.id" :label="plan.label" :value="plan.id" <el-option v-for="plan in testErrSystDataList" :key="plan.id" :label="plan.label" :value="plan.id"
:disabled="plan.label === errorSysName"> :disabled="plan.label === errorSysName">

View File

@@ -3,17 +3,17 @@
<div class="data-check-dialog"> <div class="data-check-dialog">
<div class="data-check-title"> <div class="data-check-title">
<el-form :model='formContent' label-width="auto" class="form-three "> <el-form :model='formContent' label-width="auto" class="form-three ">
<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-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-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-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 :span="8"> <!-- <el-col :span="8">
@@ -28,14 +28,10 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> --> </el-col> -->
<el-form-item label='通道号:'> <el-form-item label='通道号'>
<el-select v-model="monitorIdx"> <el-select v-model="monitorIdx">
<el-option <el-option v-for="item in monitorIdxList" :key="item.value" :label="item.value"
v-for="item in monitorIdxList" :value="item.value" />
:key="item.value"
:label="item.value"
:value="item.value"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-form> </el-form>
@@ -43,29 +39,32 @@
<div class="data-check-content"> <div class="data-check-content">
<div class="content-left-tree"> <div class="content-left-tree">
<div class="content-left-tree-switch"> <div class="content-left-tree-switch">
<el-switch <!-- <el-switch
v-model="scriptSwitch" v-model="scriptSwitch"
class="ml-2" class="ml-2"
inline-prompt inline-prompt
style="--el-switch-on-color: #003078; --el-switch-off-color: #5a79a9" style="--el-switch-on-color: #003078; --el-switch-off-color: #5a79a9"
active-text="不合格测试项" active-text="不合格测试项"
inactive-text="全部测试项" inactive-text="全部测试项"
/> /> -->
<el-radio-group v-model="scriptSwitch">
<el-radio-button label="不合格测试项" value="0" />
<el-radio-button label="全部测试项" value="1" />
</el-radio-group>
</div> </div>
<div> <div class="content-tree">
<el-tree <el-tree :default-expanded-keys="['0', '0-1', '0-2', '0-3', '1']" node-key="id" :data="data"
:default-expanded-keys="['0','0-1','0-2','0-3','1']" :props="defaultProps" @node-click="handleNodeClick" />
node-key="id"
:data="data"
:props="defaultProps"
@node-click="handleNodeClick"
/>
</div> </div>
</div> </div>
<div class="content-right"> <div class="content-right">
<div class="content-right-title"> <div class="content-right-title">
<el-divider >当前检测项目</el-divider> <!-- <el-divider>当前检测项目</el-divider> -->
<span>{{currentScriptDsc}}</span> <div>
当前检测项目
</div>
<span>{{ currentScriptDsc }}</span>
</div> </div>
<div class="content-right-Tabs"> <div class="content-right-Tabs">
<el-tabs type="border-card" v-model="activeName"> <el-tabs type="border-card" v-model="activeName">
@@ -101,17 +100,17 @@ import { type Monitor } from '@/api/device/interface/monitor'
import { data } from "@/api/plan/autoTest.json"; import { data } from "@/api/plan/autoTest.json";
import DataCheckResultTable from './dataCheckResultTable.vue' import DataCheckResultTable from './dataCheckResultTable.vue'
import DataCheckRawDataTable from './dataCheckRawDataTable.vue' import DataCheckRawDataTable from './dataCheckRawDataTable.vue'
const formContent = ref({})
const activeName = ref('rawDataTab') const activeName = ref('rawDataTab')
const deviceName = ref('被检设备1'); const deviceName = ref('被检设备1');
const monitorIdx = ref('1'); const monitorIdx = ref('1');
const reCheckIdx = ref('3'); const reCheckIdx = ref('3');
const testScriptName = ref('Q/GDW 10650.4-2021 模拟式'); const testScriptName = ref('Q/GDW 10650.4-2021 模拟式');
const errorSysName = ref('Q/GDW 10650.2-2021'); const errorSysName = ref('Q/GDW 10650.2-2021');
const dataRule = ref('所有值'); const dataRule = ref('所有值');
const scriptSwitch = ref(true); const scriptSwitch = ref("0");
const currentScriptDsc = ref('电压准确度检测频率42.5Hz Ua=46.192V 0° Ub=46.192V -120° Uc=46.192V 120° Ia=1A 0° Ib=1A -120° Ic=1A 120°'); const currentScriptDsc = ref('电压准确度检测频率42.5Hz Ua=46.192V 0° Ub=46.192V -120° Uc=46.192V 120° Ia=1A 0° Ib=1A -120° Ic=1A 120°');
const defaultProps = { const defaultProps = {
children: "children", children: "children",
label: "name", label: "name",
pid: "pid", pid: "pid",
@@ -160,50 +159,71 @@ const disabledDate = (time: Date) => {
const props = defineProps<{ const props = defineProps<{
visible: boolean; visible: boolean;
}>(); }>();
const emit = defineEmits<{ const emit = defineEmits<{
(e: 'update:visible', value: boolean): void; (e: 'update:visible', value: boolean): void;
(e: 'submit', data: any): void; (e: 'submit', data: any): void;
}>(); }>();
const handleCancel = () => { const handleCancel = () => {
emit('update:visible', false); // 关闭对话框 emit('update:visible', false); // 关闭对话框
}; };
</script> </script>
<style scoped> <style scoped>
.data-check-dialog {
.data-check-dialog{
display: flex; display: flex;
flex-direction: column; flex-direction: column;
max-height: 580px; max-height: 580px;
} }
.data-check-title{ .data-check-title {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
margin-top: 10px; margin-top: 10px;
} }
.data-check-content{ .data-check-content {
display: flex; display: flex;
flex-direction: row; /* flex-direction: row; */
} }
.content-left-tree{ .content-left-tree {
width: 20%; width: 240px;
max-height: 475px; max-height: 445px;
overflow-y: auto; /* overflow-y: auto; */
padding: 10px 0;
border: 1px solid #ccc;
/* background-color: gray; */ /* background-color: gray; */
} }
.content-left-tree-switch{
.content-tree {
max-height: 405px;
margin-top: 10px;
overflow-y: auto;
}
.content-left-tree-switch {
text-align: right; text-align: right;
margin-right: 10px; margin-right: 10px;
} }
.content-right{
margin-left: 20px; .content-right {
margin-left: 10px;
flex: 1;
} }
.content-right-Tabs{
.content-right-Tabs {
margin-top: 15px; margin-top: 15px;
} }
:deep(.el-divider--horizontal) {
margin: 15px 0;
}
.content-right-title{
div{
font-size: 16px;
font-weight: 600;
}
}
</style> </style>

View File

@@ -1,7 +1,7 @@
<template> <template>
<div class="table-container table-main"> <div class="table-container table-main">
<el-table :data="tableData" stripe border :header-cell-style="{ textAlign: 'center' } " :cell-style="{ textAlign: 'center' }" height="310px" style="width: 100%" > <el-table :data="tableData" stripe border :header-cell-style="{ textAlign: 'center' } " :cell-style="{ textAlign: 'center' }" height="335px" 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="L1V" /> <el-table-column prop="L1" label="L1V" />
@@ -170,7 +170,7 @@ const tableData = ref([
<style scoped> <style scoped>
.table-container { .table-container {
max-height: 320px; /* 根据需要调整高度 */
overflow-y: auto; /* 允许垂直滚动 */ overflow-y: auto; /* 允许垂直滚动 */
overflow-x: hidden; /* 隐藏水平滚动条 */ overflow-x: hidden; /* 隐藏水平滚动条 */
} }

View File

@@ -2,32 +2,32 @@
<div class="table-container table-main"> <div class="table-container table-main">
<el-table :data="tableData" height="310px" :header-cell-style="{ textAlign: 'center' } " :cell-style="{ textAlign: 'center' }" style="width: 100%" > <el-table :data="tableData" height="335px" :header-cell-style="{ textAlign: 'center' } " :cell-style="{ textAlign: 'center' }" >
<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" />
<el-table-column label="L1V" > <el-table-column label="L1V" >
<el-table-column prop="L1" label="被检值"> <el-table-column prop="L1" width="70" label="被检值">
</el-table-column> </el-table-column>
<el-table-column prop="L1_errValue" label="误差值"> <el-table-column prop="L1_errValue" width="70" label="误差值">
</el-table-column> </el-table-column>
</el-table-column> </el-table-column>
<el-table-column label="L2V" > <el-table-column label="L2V" >
<el-table-column prop="L2" label="被检值"> <el-table-column prop="L2" width="70" label="被检值">
</el-table-column> </el-table-column>
<el-table-column prop="L2_errValue" label="误差值"> <el-table-column prop="L2_errValue" width="70" label="误差值">
</el-table-column> </el-table-column>
</el-table-column> </el-table-column>
<el-table-column label="L3V" > <el-table-column label="L3V" >
<el-table-column prop="L3" label="被检值"> <el-table-column prop="L3" width="70" label="被检值">
</el-table-column> </el-table-column>
<el-table-column prop="L3_errValue" label="误差值"> <el-table-column prop="L3_errValue" width="70" label="误差值">
</el-table-column> </el-table-column>
</el-table-column> </el-table-column>

View File

@@ -1,43 +1,37 @@
<template> <template>
<el-dialog title="报告生成" :model-value='visible' @close="handleCancel" width="832px"> <el-dialog title="报告生成" :model-value='visible' @close="handleCancel" width="832px" draggable>
<div class="report-dialog"> <div class="report-dialog">
<div class="report-title"> <div class="report-title form-two">
<div>
<el-row :gutter="24" > <el-form-item label="检测脚本" label-width="100px">
<el-col :span="12">
<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="12"> <el-form-item label="误差体系" label-width="100px">
<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-row> <el-form-item label="数据原则" label-width="100px">
</div>
<div>
<el-row :gutter="24" >
<el-col :span="12">
<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-col :span="12"> <el-form-item label="报告模板" label-width="100px">
<el-form-item label="报告模板" >
<el-input v-model='reportTemplate' :disabled="true"/> <el-input v-model='reportTemplate' :disabled="true"/>
</el-form-item> </el-form-item>
</el-col>
</el-row>
</div>
</div> </div>
<div class="report-content"> <div class="report-content">
<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">
<div class="tabs-title"><el-button type="primary" loading >已生成2台/共4台</el-button> </div> <div class="tabs-title ">
<el-table :data="reportData" stripe="" :header-cell-style="{ textAlign: 'center' } " :cell-style="{ textAlign: 'center' }" style="width: 100%" border class="custom-table"> <span style=" font-size: 18px;font-weight: 600;">
已生成 <span style="color: #67C23A">2</span> / <span style="color: green">3</span>
</span>
<!-- <el-button type="primary" loading >已生成2台/共3台</el-button> -->
</div>
<div class="table-main">
<el-table :data="reportData" :header-cell-style="{ textAlign: 'center' } " :cell-style="{ textAlign: 'center' }" style="width: 100%" border class="custom-table">
<el-table-column prop="id" width="70" label="序号" /> <el-table-column prop="id" width="70" label="序号" />
<el-table-column prop="deviceName" width="150" label="设备名称" /> <el-table-column prop="deviceName" width="150" label="设备名称" />
<el-table-column label="生成进度" width="450"> <el-table-column label="生成进度" width="450">
@@ -52,6 +46,8 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
</div>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</div> </div>
@@ -81,9 +77,9 @@ import { CirclePlus, Delete, Download,View } from '@element-plus/icons-vue'
const currentScriptDsc = ref('电压准确度检测频率42.5Hz Ua=46.192V 0° Ub=46.192V -120° Uc=46.192V 120° Ia=1A 0° Ib=1A -120° Ic=1A 120°'); const currentScriptDsc = ref('电压准确度检测频率42.5Hz Ua=46.192V 0° Ub=46.192V -120° Uc=46.192V 120° Ia=1A 0° Ib=1A -120° Ic=1A 120°');
const reportData = ref([ const reportData = ref([
{ id: '1', deviceName: '被检设备1', processValue: '100' , action:'查看' }, { id: '1', deviceName: '240001', processValue: '100' , action:'查看' },
{ id: '2', deviceName: '被检设备2', processValue: '100' , action:'查看' }, { id: '2', deviceName: '240002', processValue: '100' , action:'查看' },
{ id: '3', deviceName: '被检设备3', processValue: '10', action:'查看' }, { id: '3', deviceName: '240003', processValue: '10', action:'查看' },
]) ])
const customColors = [ const customColors = [
{ color: "red", percentage: 0 }, { color: "red", percentage: 0 },

View File

@@ -3,13 +3,13 @@
<div class="result-dialog"> <div class="result-dialog">
<div class="result-title"> <div class="result-title">
<el-row> <el-row>
<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-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-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-row> </el-row>

View File

@@ -24,7 +24,7 @@
<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 checkResultList" v-for="(item, index) in checkStatusList"
:label="item.label" :label="item.label"
:value="item.value" :value="item.value"
:disabled="item.disabled" :disabled="item.disabled"
@@ -734,7 +734,6 @@ const changeActiveTabs = (val: number,val2: number,tabledata:any[]) => {
form.value.activeChildTabs= val2; form.value.activeChildTabs= val2;
deviceData.value = tabledata; deviceData.value = tabledata;
tableHeaderInit(val) tableHeaderInit(val)
console.log(form,val,val2,666)
}; };
//根据当前功能,初始化表头下拉框中的默认值和禁用值 //根据当前功能,初始化表头下拉框中的默认值和禁用值

View File

@@ -15,6 +15,7 @@
:filter-node-method='filterNode' :filter-node-method='filterNode'
:props='defaultProps' :props='defaultProps'
node-key='id' node-key='id'
class="filter-tree"
default-expand-all default-expand-all
:default-checked-keys='defaultChecked' :default-checked-keys='defaultChecked'
@node-click='handleNodeClick' @node-click='handleNodeClick'
@@ -119,9 +120,42 @@ defineExpose({ getTreeData })
overflow-x: auto; overflow-x: auto;
.el-tree { .el-tree {
height: 100%; // height: 100%;
width: auto; width: auto;
} }
} }
} }
.filter-tree {
// border: 1px solid #dcdfe6;
min-width: 100%;
height: 97%;
display: inline-block;
overflow: auto;
margin-top: 12px;
}
.filter-tree span {
font-size: 16px;
display:block;
overflow:hidden;
// word-break:keep-all;
// white-space:nowrap;
// text-overflow:ellipsis;
padding-right: 12px;
}
.leftBox {
// float: left;
// width: 20%;
height: 100%;
width: 100%;
}
.left {
height: calc(100% - 45px);
overflow: auto;
}
/* 设置滚动条宽度 */
:deep(.bodyTwo ::-webkit-scrollbar) {
width: 3px !important;
height: 6px !important;
}
</style> </style>

View File

@@ -251,15 +251,15 @@ const chartsData1: any = ref([]),
const getPieData = () => { const getPieData = () => {
chartsData1.value = [ chartsData1.value = [
{ value: Math.floor(Math.random() * 100) + 1, name: "未检测", itemStyle: { color: '#fac858' } }, { value: 12, name: "未检测", itemStyle: { color: '#fac858' } },
{ value: Math.floor(Math.random() * 100) + 1, name: "检测中", itemStyle: { color: '#ee6666' } }, { value: 0, name: "检测中", itemStyle: { color: '#ee6666' } },
{ value: Math.floor(Math.random() * 100) + 1, name: "检测完成", itemStyle: { color: '#91cc75' } }, { value: 6, name: "检测完成", itemStyle: { color: '#91cc75' } },
{ value: Math.floor(Math.random() * 100) + 1, name: "归档", itemStyle: { color: '#5470c6' } }, { value: 2, name: "归档", itemStyle: { color: '#5470c6' } },
]; ];
chartsData2.value = [ chartsData2.value = [
{ value: Math.floor(Math.random() * 100) + 1, name: "未检测" , itemStyle: { color: '#fac858' } }, { value: 12, name: "未检测" , itemStyle: { color: '#fac858' } },
{ value: Math.floor(Math.random() * 100) + 1, name: "不合格" , itemStyle: { color: '#ee6666' } }, { value: 3, name: "不合格" , itemStyle: { color: '#ee6666' } },
{ value: Math.floor(Math.random() * 100) + 1, name: "合格", itemStyle: { color: '#91cc75' } }, { value: 5, 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: '#ee6666' } },
// { value: Math.floor(Math.random() * 100) + 1, name: "全部合格", itemStyle: { color: '#91cc75' } }, // { value: Math.floor(Math.random() * 100) + 1, name: "全部合格", itemStyle: { color: '#91cc75' } },
]; ];
@@ -268,9 +268,9 @@ 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: "未生成报告" },
{ value: Math.floor(Math.random() * 100) + 1, name: "未检测" , itemStyle: { color: '#fac858' } }, { value: 12, name: "未检测" , itemStyle: { color: '#fac858' } },
{ value: Math.floor(Math.random() * 100) + 1, name: "未生成" , itemStyle: { color: '#ee6666' } }, { value: 4, name: "未生成" , itemStyle: { color: '#ee6666' } },
{ value: Math.floor(Math.random() * 100) + 1, name: "已生成", itemStyle: { color: '#91cc75' } }, { value: 4, name: "已生成", itemStyle: { color: '#91cc75' } },
// { value: Math.floor(Math.random() * 100) + 1, name: "未检测" , itemStyle: { color: '#fac858' } }, // { value: Math.floor(Math.random() * 100) + 1, name: "未检测" , itemStyle: { color: '#fac858' } },
@@ -457,7 +457,7 @@ onUnmounted(() => {
p { p {
margin: 0; margin: 0;
font-weight: 800; font-weight: 800;
color: var(--el-color-primary); color:#fff;
font-size: 14px; font-size: 14px;
font-family: "Microsoft YaHei", "微软雅黑", "Arial", sans-serif; font-family: "Microsoft YaHei", "微软雅黑", "Arial", sans-serif;
} }

View File

@@ -78,55 +78,84 @@ const spanMethod = ({
rowIndex, rowIndex,
columnIndex, columnIndex,
}: SpanMethodProps) => { }: SpanMethodProps) => {
if (columnIndex === 0 ) { // 检查是否为第一列 if (columnIndex === 0) {
if (rowIndex <= 1 || rowIndex === 7 || rowIndex == 20) {
if (rowIndex === 2||rowIndex === 5 ||rowIndex === 21||rowIndex === 23) { // 检查是否为第三行
return { return {
rowspan: 2, // 合并行数 rowspan: 1,
colspan: 1, // 单元格列数 colspan: 2,
};
}else if (rowIndex === 8) { //
return {
rowspan: 8,
colspan: 1,
};
} }
else if (rowIndex === 16) { //
return {
rowspan: 4,
colspan: 1,
};
} }
else if (rowIndex === 3 ||rowIndex === 6 ||rowIndex === 9 || rowIndex === 10|| rowIndex === 11 if (rowIndex === 2) {
|| rowIndex === 12|| rowIndex === 13|| rowIndex === 14|| rowIndex === 15 return {
|| rowIndex === 17 || rowIndex === 18|| rowIndex === 19 rowspan: 3, // 不显示该单元格
|| rowIndex === 22 ||rowIndex === 24) { // 检查是否为第四行 colspan: 2,
}
}
if (rowIndex === 3 || rowIndex === 4 || rowIndex === 6 || rowIndex >= 9 && rowIndex <= 15 || rowIndex >= 17 && rowIndex <= 19 || rowIndex === 22 || rowIndex === 24) {
return { return {
rowspan: 0, // 不显示该单元格 rowspan: 0, // 不显示该单元格
colspan: 0, colspan: 0,
};
} }
} }
if (rowIndex === 5 || rowIndex === 23) {
if (columnIndex === 1 || columnIndex === 2){
if (rowIndex === 2
|| rowIndex === 8|| rowIndex === 10|| rowIndex === 12|| rowIndex === 14
|| rowIndex === 16|| rowIndex === 18
|| rowIndex === 21) {
return { return {
rowspan: 2, rowspan: 2,
colspan: 1, colspan: 1,
};
} }
else if (rowIndex === 3 }
|| rowIndex === 9|| rowIndex === 11|| rowIndex === 13|| rowIndex === 15 if (rowIndex === 8) {
|| rowIndex === 17|| rowIndex === 19
|| rowIndex === 22) { // 检查是否为第四行
return { return {
rowspan: 0, // 不显示该单元格 rowspan: 8,
colspan: 2,
}
}
if (rowIndex === 16) {
return {
rowspan: 4,
colspan: 2,
}
}
if (rowIndex === 21 || rowIndex === 22) {
return {
rowspan: 2,
colspan: 2,
}
}
}
if (columnIndex === 1) {
if (rowIndex <= 4 || rowIndex >= 7 && rowIndex <= 22) {
return {
rowspan: 0,
colspan: 0, colspan: 0,
}; }
}
}
if (columnIndex === 2) {
if (rowIndex === 2 || rowIndex === 8 || rowIndex === 10 || rowIndex === 12 || rowIndex === 14 || rowIndex === 16 || rowIndex === 18 || rowIndex === 21) {
return {
rowspan: 2,
colspan: 1,
}
}
if (rowIndex === 3 || rowIndex === 9 || rowIndex === 11 || rowIndex === 13 || rowIndex === 15 || rowIndex === 17 || rowIndex === 19 || rowIndex === 22) {
return {
rowspan: 0,
colspan: 0,
}
}
}
if (columnIndex === 3) {
if (rowIndex === 2 || rowIndex === 8 || rowIndex === 10 || rowIndex === 12 || rowIndex === 14 || rowIndex === 16 || rowIndex === 18 || rowIndex === 21) {
return {
rowspan: 2,
colspan: 1,
}
}
if (rowIndex === 3 || rowIndex === 9 || rowIndex === 11 || rowIndex === 13 || rowIndex === 15 || rowIndex === 17 || rowIndex === 19 || rowIndex === 22) {
return {
rowspan: 0,
colspan: 0,
}
} }
} }
}; };

View File

@@ -248,27 +248,6 @@ const columns = reactive<ColumnProps<Plan.PlanAndSourceBO>[]>([
search: { el: 'select', props: { filterable: true } }, search: { el: 'select', props: { filterable: true } },
fieldNames: { label: 'label', value: 'id' }, fieldNames: { label: 'label', value: 'id' },
}, },
// {
// prop: 'father_Plan_Id',
// label: '父节点',
// width: 200,
// enum: testFatherPlanList,
// fieldNames: { label: 'label', value: 'id' },
// },
// {
// prop: 'create_Time',
// label: '记录时间',
// minWidth: 180,
// search: {
// span: 2,
// render: () => {
// return (
// <div class='flx-flex-start'>
// </div>
// )
// },
// },
// },
{ prop: 'operation', label: '操作', fixed: 'right', width: 250 }, { prop: 'operation', label: '操作', fixed: 'right', width: 250 },
]) ])