Browse Source

Merge branch 'dev-220228' into test

origin/bugfix_relocation
jiangyy 4 years ago
parent
commit
7f0760a773
  1. 13
      src/views/modules/base/community/buildTable.vue
  2. 2
      src/views/modules/base/community/communityForm.vue
  3. 20
      src/views/modules/base/community/communityTable.vue
  4. 14
      src/views/modules/base/community/roomTable.vue

13
src/views/modules/base/community/buildTable.vue

@ -97,6 +97,7 @@
@select-all="selectAll" @select-all="selectAll"
@selection-change="selectionChange"> @selection-change="selectionChange">
<el-table-column type="selection" <el-table-column type="selection"
:selectable="checkSelect"
width="55"> width="55">
</el-table-column> </el-table-column>
<el-table-column prop="buildingName" <el-table-column prop="buildingName"
@ -244,6 +245,16 @@ export default {
this.loadTable() this.loadTable()
}, },
checkSelect (row, index) {
let isChecked = false;
if (row.showBtn) { //
isChecked = true
} else {
isChecked = false
}
return isChecked
},
async loadTable (fromTree, treeObj) { async loadTable (fromTree, treeObj) {
this.tableLoading = true this.tableLoading = true
if (fromTree) { if (fromTree) {
@ -333,7 +344,9 @@ export default {
this.$refs.ref_table.clearSelection(); this.$refs.ref_table.clearSelection();
if (selectAllFlag) { if (selectAllFlag) {
this.tableData.forEach(row => { this.tableData.forEach(row => {
if (row.showBtn) {
this.$refs.ref_table.toggleRowSelection(row); this.$refs.ref_table.toggleRowSelection(row);
}
}); });
} }
}, },

2
src/views/modules/base/community/communityForm.vue

@ -385,7 +385,7 @@ export default {
if (code === 0) { if (code === 0) {
this.$message({ this.$message({
type: 'success', type: 'success',
message: '添加小区成功' message: '操作成功'
}) })
this.resetData() this.resetData()
this.$emit('dialogOk') this.$emit('dialogOk')

20
src/views/modules/base/community/communityTable.vue

@ -119,6 +119,7 @@
@select-all="selectAll" @select-all="selectAll"
@selection-change="selectionChange"> @selection-change="selectionChange">
<el-table-column type="selection" <el-table-column type="selection"
:selectable="checkSelect"
width="55"> width="55">
</el-table-column> </el-table-column>
<el-table-column prop="neighborHoodName" <el-table-column prop="neighborHoodName"
@ -324,6 +325,17 @@ export default {
this.tableLoading = false this.tableLoading = false
}, },
checkSelect (row, index) {
let isChecked = false;
if (row.showBtn) { //
isChecked = true
} else {
isChecked = false
}
return isChecked
},
diaClose () { diaClose () {
this.$refs.ref_form.resetData() this.$refs.ref_form.resetData()
this.formShow = false this.formShow = false
@ -370,7 +382,9 @@ export default {
this.$refs.ref_table.clearSelection(); this.$refs.ref_table.clearSelection();
if (selectAllFlag) { if (selectAllFlag) {
this.tableData.forEach(row => { this.tableData.forEach(row => {
if (row.showBtn) {
this.$refs.ref_table.toggleRowSelection(row); this.$refs.ref_table.toggleRowSelection(row);
}
}); });
} }
}, },
@ -742,3 +756,9 @@ export default {
@import "@/assets/scss/buttonstyle.scss"; @import "@/assets/scss/buttonstyle.scss";
@import "@/assets/scss/modules/visual/communityManage.scss"; @import "@/assets/scss/modules/visual/communityManage.scss";
</style> </style>
<style>
.el-message.is-closable .el-message__content {
line-height: 20px;
}
</style>

14
src/views/modules/base/community/roomTable.vue

@ -77,6 +77,7 @@
@select-all="selectAll" @select-all="selectAll"
@selection-change="selectionChange"> @selection-change="selectionChange">
<el-table-column type="selection" <el-table-column type="selection"
:selectable="checkSelect"
width="55"> width="55">
</el-table-column> </el-table-column>
<el-table-column prop="houseName" <el-table-column prop="houseName"
@ -236,6 +237,16 @@ export default {
this.loadTable() this.loadTable()
}, },
checkSelect (row, index) {
let isChecked = false;
if (row.showBtn) { //
isChecked = true
} else {
isChecked = false
}
return isChecked
},
async loadTable (fromTree, treeObj) { async loadTable (fromTree, treeObj) {
this.tableLoading = true this.tableLoading = true
if (fromTree) { if (fromTree) {
@ -327,7 +338,10 @@ export default {
this.$refs.ref_table.clearSelection(); this.$refs.ref_table.clearSelection();
if (selectAllFlag) { if (selectAllFlag) {
this.tableData.forEach(row => { this.tableData.forEach(row => {
if (row.showBtn) {
this.$refs.ref_table.toggleRowSelection(row); this.$refs.ref_table.toggleRowSelection(row);
}
}); });
} }
}, },

Loading…
Cancel
Save