Browse Source

Merge branch 'dev-220228' into test

shibei_master
jiangyy 4 years ago
parent
commit
540f9a603a
  1. 35
      src/views/modules/base/community/buildTable.vue
  2. 4
      src/views/modules/base/community/community.vue
  3. 33
      src/views/modules/base/community/communityTable.vue
  4. 3
      src/views/modules/base/community/roomForm.vue
  5. 35
      src/views/modules/base/community/roomTable.vue

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

@ -164,10 +164,12 @@
<div v-if="tableData.length>0"
class="div_del">
<el-checkbox :indeterminate="isIndeterminate"
<el-checkbox style="height:32px"
:indeterminate="isIndeterminate"
v-model="selAllFlag"
@change="handleSelectAll">全选</el-checkbox>
<el-button style="margin-left:15px"
<el-button v-show="showDeletBtn"
style="margin-left:15px"
type="red"
size="small"
@click="deleteBatch">批量删除</el-button>
@ -216,7 +218,9 @@ export default {
agencyObj: {},//
ownerName: '',
ownerPhone: '',
tableData: [],
validTableDataNum: 0,//
selection: [],
showDeletBtn: false,
//form
formShow: false,
@ -282,10 +286,12 @@ export default {
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.validTableDataNum = 0
this.total = data.total
data.list.forEach(item => {
if (item.agencyId === this.staffAgencyId) {
item.showBtn = true
this.validTableDataNum++
} else {
item.showBtn = false
}
@ -376,7 +382,7 @@ export default {
selectAll (selection) {
this.selection = selection
if (selection.length > 0) {
if (selection.length === this.validTableDataNum) {
this.selAllFlag = true
} else {
this.selAllFlag = false
@ -385,19 +391,15 @@ export default {
},
selectionChange (selection) {
this.selection = selection
if (selection.length === this.tableData.length) {
this.selAllFlag = true
this.isIndeterminate = false
} else if (selection.length > 0) {
this.selAllFlag = false
this.isIndeterminate = true
if (selection.length === this.validTableDataNum) {
this.selAllFlag = true
} else {
this.selAllFlag = false
this.isIndeterminate = false
}
},
async handleDelete (row) {
this.$confirm("确认删除?", "提示", {
@ -691,8 +693,13 @@ export default {
}
},
watch: {
filterText (val) {
this.$refs.tree.filter(val);
selection (val) {
if (val.length > 0) {
this.showDeletBtn = true
} else {
this.showDeletBtn = false
}
}
},
props: {

4
src/views/modules/base/community/community.vue

@ -215,6 +215,10 @@ export default {
let agencyNode = this.$refs.ref_tree.getNode(gridNode.data.pid)//
obj.agencyId = agencyNode.data.id
obj.agencyName = agencyNode.data.label
obj.gridId = gridNode.data.id
obj.gridName = gridNode.data.label
obj.neighborHoodId = neighborHoodNode.data.id
obj.neighborHoodName = neighborHoodNode.data.label
if (obj.agencyId === this.staffAgencyId) {
this.showImportBtn = true
} else {

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

@ -185,10 +185,12 @@
<div v-if="tableData.length>0"
class="div_del">
<el-checkbox :indeterminate="isIndeterminate"
<el-checkbox style="height:32px"
:indeterminate="isIndeterminate"
v-model="selAllFlag"
@change="handleSelectAll">全选</el-checkbox>
<el-button style="margin-left:15px"
<el-button v-show="showDeletBtn"
style="margin-left:15px"
type="red"
size="small"
@click="deleteBatch">批量删除</el-button>
@ -238,7 +240,9 @@ export default {
ownerName: '',
ownerPhone: '',
tableData: [],
validTableDataNum: 0,//
selection: [],
showDeletBtn: false,
//form
@ -309,10 +313,12 @@ export default {
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.validTableDataNum = 0
this.total = data.total
data.list.forEach(item => {
if (item.agencyId === this.staffAgencyId) {
item.showBtn = true
this.validTableDataNum++
} else {
item.showBtn = false
}
@ -412,9 +418,10 @@ export default {
}
},
selectAll (selection) {
this.selection = selection
if (selection.length > 0) {
if (selection.length === this.validTableDataNum) {
this.selAllFlag = true
} else {
this.selAllFlag = false
@ -423,16 +430,13 @@ export default {
},
selectionChange (selection) {
this.selection = selection
if (selection.length === this.tableData.length) {
this.selAllFlag = true
this.isIndeterminate = false
} else if (selection.length > 0) {
this.selAllFlag = false
this.isIndeterminate = true
if (selection.length === this.validTableDataNum) {
this.selAllFlag = true
} else {
this.selAllFlag = false
this.isIndeterminate = false
}
},
@ -739,8 +743,13 @@ export default {
}
},
watch: {
filterText (val) {
this.$refs.tree.filter(val);
selection (val) {
if (val.length > 0) {
this.showDeletBtn = true
} else {
this.showDeletBtn = false
}
}
},
props: {

3
src/views/modules/base/community/roomForm.vue

@ -163,9 +163,10 @@ export default {
methods: {
async initForm (type, row, agencyObj) {
debugger
this.$refs.ref_form.resetFields();
this.agencyObj = agencyObj
this.dataForm.neighborHoodId = agencyObj.communityId
this.dataForm.neighborHoodId = agencyObj.neighborHoodId
this.dataForm.buildingId = agencyObj.id
this.formType = type

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

@ -156,10 +156,12 @@
<div v-if="tableData.length>0"
class="div_del">
<el-checkbox :indeterminate="isIndeterminate"
<el-checkbox style="height:32px"
:indeterminate="isIndeterminate"
v-model="selAllFlag"
@change="handleSelectAll">全选</el-checkbox>
<el-button style="margin-left:15px"
<el-button v-show="showDeletBtn"
style="margin-left:15px"
type="red"
size="small"
@click="deleteBatch">批量删除</el-button>
@ -206,7 +208,9 @@ export default {
agencyObj: {},//
ownerName: '',
ownerPhone: '',
tableData: [],
validTableDataNum: 0,//
selection: [],
showDeletBtn: false,
//form
formShow: false,
@ -282,9 +286,11 @@ export default {
if (code === 0) {
this.total = data.total
this.validTableDataNum = 0
data.list.forEach(item => {
if (item.agencyId === this.staffAgencyId) {
item.showBtn = true
this.validTableDataNum++
} else {
item.showBtn = false
}
@ -370,8 +376,7 @@ export default {
},
selectAll (selection) {
this.selection = selection
if (selection.length > 0) {
if (selection.length === this.validTableDataNum) {
this.selAllFlag = true
} else {
this.selAllFlag = false
@ -380,16 +385,13 @@ export default {
},
selectionChange (selection) {
this.selection = selection
if (selection.length === this.tableData.length) {
this.selAllFlag = true
this.isIndeterminate = false
} else if (selection.length > 0) {
this.selAllFlag = false
this.isIndeterminate = true
if (selection.length === this.validTableDataNum) {
this.selAllFlag = true
} else {
this.selAllFlag = false
this.isIndeterminate = false
}
},
@ -654,8 +656,13 @@ export default {
}
},
watch: {
filterText (val) {
this.$refs.tree.filter(val);
selection (val) {
if (val.length > 0) {
this.showDeletBtn = true
} else {
this.showDeletBtn = false
}
}
},
props: {

Loading…
Cancel
Save