网格区块

This commit is contained in:
liuye
2023-11-03 10:30:32 +08:00
parent 6474d8d4a1
commit 86171587a0
2 changed files with 17 additions and 5 deletions

View File

@@ -161,7 +161,9 @@ export default {
this.instance.post(`/app/appgirdinfo/addOrUpdate`, {
...this.forms,
girdMemberManageList: girdMemberManageList?.map(v => ({wxUserId: v.id})) || [],
girdMemberList: girdMemberList?.map(v => ({wxUserId: v.id})) || []
girdMemberList: girdMemberList?.map(v => ({wxUserId: v.id})) || [],
isCoordination: this.forms.currIndex,
coordinationId: this.forms.currIndex == 1 ? this.forms.parentGirdId : null
}).then((res) => {
if (res.code == 0) {
this.cancel(true)

View File

@@ -85,6 +85,9 @@
<el-button type="primary" v-if="!treeObj.treeList.length" @click="init">初始化</el-button>
</template>
</ai-search-bar>
<el-tabs v-model="currIndex" @tab-click="tabChange">
<el-tab-pane v-for="(tab,i) in tabs" :key="i" :label="tab.label"></el-tab-pane>
</el-tabs>
<ai-table
class="mt10"
:tableData="tableData"
@@ -178,7 +181,9 @@ export default {
gridMemberColConfigs: [
{prop: "name"},
{prop: "checkType", format: v => v === '1' ? '网格员' : '网格长'}
]
],
currIndex: 0,
tabs: [{label: '子网格'}, {label: '协同部门'}],
};
},
created() {
@@ -202,12 +207,16 @@ export default {
}
},
methods: {
tabChange() {
this.page.current = 1
this.getList()
},
handleNodeClick(val) {
this.info = this.$copy(val);
this.getList();
},
getTreeList() {
this.instance.post(`/app/appgirdinfo/listAll3`).then((res) => {
this.instance.post(`/app/appgirdinfo/listAll4`).then((res) => {
if (res?.data) {
this.treeObj.treeList = res.data.filter(e => !e.parentGirdId)
@@ -274,7 +283,8 @@ export default {
}).catch(() => 0);
},
getList() {
this.instance.post("/app/appgirdinfo/list", null, {
var url = this.currIndex == 1 ? `/app/appgirdinfo/listCoordination` : `/app/appgirdinfo/list?isCoordination=0`
this.instance.post(url, null, {
params: {
...this.searchObj,
...this.page,
@@ -301,7 +311,7 @@ export default {
toAdd() {
let {id: parentGirdId, girdName: parentGirdName} = this.info
this.$router.push({
hash: "#add", query: {parentGirdId, parentGirdName}
hash: "#add", query: {parentGirdId, parentGirdName, currIndex: this.currIndex}
})
},
goBack() {