优化页面
This commit is contained in:
parent
524d83deec
commit
eaf3dff8e3
|
|
@ -56,8 +56,16 @@
|
|||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table border :data="tableData">
|
||||
<el-table-column type="selection" v-if="isRepair" />
|
||||
<el-table
|
||||
border
|
||||
:data="tableData"
|
||||
:header-cell-class-name="setClassName"
|
||||
>
|
||||
<el-table-column
|
||||
type="selection"
|
||||
v-if="isRepair"
|
||||
:selectable="() => !this.selDisabled"
|
||||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
v-for="(t, index) in tableColumns"
|
||||
|
|
@ -172,6 +180,7 @@ export default {
|
|||
batchNum: '', // 批量调整天数的数据源
|
||||
activeIndex: '', // 调整天数输入框不合格时的 index 用来设置动态 class 增加一个红色边框
|
||||
activeIndexTime: '', // 调整终结日期时的 index 用来设置动态 class 增加一个红色边框
|
||||
selDisabled: true,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
|
@ -182,6 +191,10 @@ export default {
|
|||
this.batchNum = ''
|
||||
this.$emit('handelSaveSuccess')
|
||||
}
|
||||
|
||||
if (this.isRepair) {
|
||||
this.selDisabled = !this.selDisabled
|
||||
}
|
||||
},
|
||||
/** 调整天数 */
|
||||
iptChange(val) {
|
||||
|
|
@ -281,6 +294,12 @@ export default {
|
|||
handleExport() {
|
||||
this.$emit('handleExport', this.listType)
|
||||
},
|
||||
setClassName({ column }) {
|
||||
// 若为选择框,且数据皆为不可选时
|
||||
if (column.type == 'selection' && this.selDisabled) {
|
||||
return 'all-disabled'
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
|
@ -344,4 +363,9 @@ export default {
|
|||
border-color: #f56c6c;
|
||||
}
|
||||
}
|
||||
::v-deep .all-disabled .el-checkbox__input .el-checkbox__inner {
|
||||
background-color: #edf2fc;
|
||||
border-color: #dcdfe6;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
Loading…
Reference in New Issue