优化页面

This commit is contained in:
BianLzhaoMin 2024-08-02 16:03:01 +08:00
parent 524d83deec
commit eaf3dff8e3
1 changed files with 26 additions and 2 deletions

View File

@ -56,8 +56,16 @@
</el-col> </el-col>
</el-row> </el-row>
<el-table border :data="tableData"> <el-table
<el-table-column type="selection" v-if="isRepair" /> border
:data="tableData"
:header-cell-class-name="setClassName"
>
<el-table-column
type="selection"
v-if="isRepair"
:selectable="() => !this.selDisabled"
/>
<el-table-column <el-table-column
align="center" align="center"
v-for="(t, index) in tableColumns" v-for="(t, index) in tableColumns"
@ -172,6 +180,7 @@ export default {
batchNum: '', // batchNum: '', //
activeIndex: '', // index class activeIndex: '', // index class
activeIndexTime: '', // index class activeIndexTime: '', // index class
selDisabled: true,
} }
}, },
methods: { methods: {
@ -182,6 +191,10 @@ export default {
this.batchNum = '' this.batchNum = ''
this.$emit('handelSaveSuccess') this.$emit('handelSaveSuccess')
} }
if (this.isRepair) {
this.selDisabled = !this.selDisabled
}
}, },
/** 调整天数 */ /** 调整天数 */
iptChange(val) { iptChange(val) {
@ -281,6 +294,12 @@ export default {
handleExport() { handleExport() {
this.$emit('handleExport', this.listType) this.$emit('handleExport', this.listType)
}, },
setClassName({ column }) {
// ,
if (column.type == 'selection' && this.selDisabled) {
return 'all-disabled'
}
},
}, },
} }
</script> </script>
@ -344,4 +363,9 @@ export default {
border-color: #f56c6c; border-color: #f56c6c;
} }
} }
::v-deep .all-disabled .el-checkbox__input .el-checkbox__inner {
background-color: #edf2fc;
border-color: #dcdfe6;
cursor: not-allowed;
}
</style> </style>