网格区块

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.instance.post(`/app/appgirdinfo/addOrUpdate`, {
...this.forms, ...this.forms,
girdMemberManageList: girdMemberManageList?.map(v => ({wxUserId: v.id})) || [], 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) => { }).then((res) => {
if (res.code == 0) { if (res.code == 0) {
this.cancel(true) this.cancel(true)

View File

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