微调
This commit is contained in:
@@ -40,7 +40,7 @@
|
||||
|
||||
<el-row :gutter="24" >
|
||||
<el-col :span="8">
|
||||
<el-form-item label='生产厂商' prop='manufacturer' :label-width="100">
|
||||
<el-form-item label='设备厂家' prop='manufacturer' :label-width="100">
|
||||
<el-select v-model="formContent.manufacturer" clearable placeholder="请选择生产厂商">
|
||||
<el-option
|
||||
v-for="item in dictStore.getDictData('Dev_Manufacturers')"
|
||||
@@ -52,18 +52,18 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="生产日期" prop="createDate" :label-width="100">
|
||||
<el-form-item label="出厂日期" prop="createDate" :label-width="100">
|
||||
<el-date-picker
|
||||
v-model="formContent.createDate"
|
||||
placeholder="请选择生产日期"
|
||||
placeholder="请选择出厂日期"
|
||||
:disabled-date="disabledDate"
|
||||
/>
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="出厂编号" prop="createId" :label-width="100">
|
||||
<el-input v-model="formContent.createId" placeholder="请输入出厂编号"/>
|
||||
<el-form-item label="设备序列号" prop="createId" :label-width="100">
|
||||
<el-input v-model="formContent.createId" placeholder="请输入设备序列号"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
@@ -80,7 +80,7 @@ const columns = reactive<ColumnProps<Device.ResPqDev>[]>([
|
||||
},
|
||||
{
|
||||
prop: 'createDate',
|
||||
label: '生产日期',
|
||||
label: '出厂日期',
|
||||
minWidth: 200,
|
||||
search: {
|
||||
span: 2,
|
||||
@@ -116,7 +116,7 @@ const columns = reactive<ColumnProps<Device.ResPqDev>[]>([
|
||||
},
|
||||
{
|
||||
prop: 'manufacturer',
|
||||
label: '生产厂商',
|
||||
label: '设备厂家',
|
||||
enum: dictStore.getDictData('Dev_Manufacturers'),
|
||||
search: { el: 'select', props: { filterable: true }, order: 1 },
|
||||
fieldNames: { label: 'name', value: 'id' },
|
||||
|
||||
@@ -4,13 +4,17 @@
|
||||
<div class="table-container">
|
||||
<el-table :data="errorData"
|
||||
height="500"
|
||||
:header-cell-style="{ textAlign: 'center',backgroundColor: '#003078',color: '#fff' } "
|
||||
:header-cell-style="rowClass"
|
||||
:cell-style="{ textAlign: 'center' }"
|
||||
style="width: 100%"
|
||||
:span-method="spanMethod"
|
||||
border
|
||||
class="custom-table">
|
||||
<el-table-column prop="measured" label="被测量" />
|
||||
class="custom-table"
|
||||
>
|
||||
<el-table-column label="被测量">
|
||||
<el-table-column prop="col1"/>
|
||||
<el-table-column prop="col2"/>
|
||||
</el-table-column>
|
||||
<el-table-column prop="deviceLevel" label="检测装置级别" />
|
||||
<el-table-column prop="measurementType" label="测量类型" />
|
||||
<el-table-column prop="condition" label="测量条件" />
|
||||
@@ -57,6 +61,17 @@ interface SpanMethodProps {
|
||||
columnIndex: number
|
||||
}
|
||||
|
||||
const rowClass = ({row, column, rowIndex, columnIndex}) => {
|
||||
let res = {
|
||||
textAlign: 'center', backgroundColor: '#003078', color: '#fff'
|
||||
}
|
||||
if (rowIndex === 1) {
|
||||
res = {...res, display: 'none'}
|
||||
return res
|
||||
}
|
||||
return res
|
||||
}
|
||||
|
||||
const spanMethod = ({
|
||||
row,
|
||||
column,
|
||||
@@ -65,7 +80,7 @@ const spanMethod = ({
|
||||
}: SpanMethodProps) => {
|
||||
|
||||
if (columnIndex === 0 ) { // 检查是否为第一列
|
||||
|
||||
|
||||
if (rowIndex === 2 ||rowIndex === 21) { // 检查是否为第三行
|
||||
return {
|
||||
rowspan: 2, // 合并行数
|
||||
|
||||
Reference in New Issue
Block a user