This commit is contained in:
BianLzhaoMin 2024-04-22 11:24:44 +08:00
parent f10ef57196
commit 0eabae89df
3 changed files with 39 additions and 17 deletions

View File

@ -14,6 +14,7 @@
:data="tableList"
border
ref="tableRef"
select-on-indeterminate
@selection-change="handleSelectionChange"
>
<el-table-column
@ -21,9 +22,10 @@
width="45"
align="center"
v-if="isSelShow"
:selectable="selectable"
/>
<el-table-column
v-for="(item, v) in tableProps"
v-for="(item, v) in tableColumCheckProps"
:key="v"
:label="item.t_label"
:prop="item.t_props"
@ -63,12 +65,11 @@
<span slot="reference">操作</span>
<div>
<div class="check-all">全选</div>
<el-checkbox>123</el-checkbox>
<el-checkbox>123</el-checkbox>
<el-checkbox>123</el-checkbox>
<el-checkbox>123</el-checkbox>
<el-checkbox>123</el-checkbox>
<el-checkbox
v-for="(check, index) in tableColumCheck"
:key="index"
>{{ check.t_label }}</el-checkbox
>
</div>
</el-popover>
</template>
@ -148,6 +149,13 @@
return {}
},
},
/* 表格是否勾选 */
selectable: {
type: Function,
default: () => {
return true
},
},
},
data() {
return {
@ -162,6 +170,15 @@
},
created() {
this.getList()
console.log(this.tableColumCheck, '获取的', this.tableProps)
},
computed: {
tableColumCheck() {
return this.tableProps
},
tableColumCheckProps() {
return this.tableColumCheck.filter((e) => (e.checked = true))
},
},
methods: {
async queryList(val, reset) {

View File

@ -80,6 +80,11 @@
:formLabel="config.previewFormLabel"
:isSelShow="isSelShow"
ref="auditingTableRef"
:selectable="
(row) => {
return row.status == 0
}
"
@getTableSelectionChange="getTableSelChangeInner"
>
<!--审核状态 -->

View File

@ -12,16 +12,16 @@ export const config = {
/* 预报废审核主页 列表参数 */
tableProps: [
{ t_width: '55px', t_props: '', t_label: '序号' },
{ t_width: '', t_props: 'scrapNum', t_label: '预报废单号' },
{ t_width: '', t_props: '', t_label: '报废来源', t_slot: 'source' },
{ t_width: '', t_props: 'repairNum', t_label: '单号', t_slot: 'code' },
{ t_width: '', t_props: 'unitName', t_label: '退料单位名称' },
{ t_width: '', t_props: 'projectName', t_label: '退料工程名称' },
{ t_width: '', t_props: 'itemType', t_label: '设备类型' },
{ t_width: '', t_props: 'createBy', t_label: '任务创建人' },
{ t_width: '', t_props: 'createTime', t_label: '任务创建时间' },
{ t_width: '', t_props: 'taskStatus', t_label: '审核状态', t_slot: 'type' },
{ t_width: '', t_props: '', t_label: '不通过原因' },
{ t_width: '', t_props: 'scrapNum', t_label: '预报废单号', },
{ t_width: '', t_props: '', t_label: '报废来源', t_slot: 'source', },
{ t_width: '', t_props: 'repairNum', t_label: '单号', t_slot: 'code', },
{ t_width: '', t_props: 'unitName', t_label: '退料单位名称', },
{ t_width: '', t_props: 'projectName', t_label: '退料工程名称', },
{ t_width: '', t_props: 'itemType', t_label: '设备类型', },
{ t_width: '', t_props: 'createBy', t_label: '任务创建人', },
{ t_width: '', t_props: 'createTime', t_label: '任务创建时间', },
{ t_width: '', t_props: 'taskStatus', t_label: '审核状态', t_slot: 'type', },
{ t_width: '', t_props: '', t_label: '不通过原因', },
],
/* 预报废审核主页表单 查询参数 */
formLabel: [