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

View File

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

View File

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