姓名:
@@ -713,8 +727,11 @@ export default {
title: '事件',
currentTabIndex: 0,
startTabIndex: 0,
+ currentTabIndex2: 0,
+ startTabIndex2: 0,
BaseTabList: ['教育信息', '兴趣爱好', '宗教', '健康', '工作', '经济状况', '居住', '家庭'],
tabList: [],
+ tabList2: [],
userArray: [],
userList: {}
};
@@ -726,6 +743,10 @@ export default {
computed: {
currentTab() {
return this.tabList[this.currentTabIndex];
+ },
+ currentTab2() {
+
+ return this.tabList2[this.currentTabIndex2];
}
},
methods: {
@@ -745,7 +766,23 @@ export default {
this.startTabIndex = 0;
}
},
-
+ addStartTabIndex2() {
+ const { startTabIndex2, tabList2 } = this;
+ if (startTabIndex2 < tabList2.length - 7) {
+ this.startTabIndex2 = startTabIndex2 + 1;
+ } else {
+ this.startTabIndex2 = tabList2.length - 7;
+ }
+ },
+ subStartTabIndex2() {
+ console.log("dddd",this.startTabIndex2)
+ const { startTabIndex2, tabList2 } = this;
+ if (startTabIndex2 > 0) {
+ this.startTabIndex2 = startTabIndex2 - 1;
+ } else {
+ this.startTabIndex2 = 0;
+ }
+ },
iniMap() {
const scene = new Scene({
id: 'map',
@@ -765,34 +802,16 @@ export default {
this.getInfo();
},
- async getData() {
- await this.info.group_rental.forEach(item => {
- this.getUserInfo(item.user_id);
- });
- },
gettab() {
- this.getData().then(() => {
- console.log('this.userList', this.userList);
- this.userList = { ...this.userArray[0] };
- let tabList = this.BaseTabList;
- this.userList.crowd && tabList.push('党员');
- this.userList.srs && tabList.push('保障房');
- this.userList.unemployed && tabList.push('失业');
- this.userList.exs && tabList.push('退役军人');
- this.userList.ufs && tabList.push('统战人员');
- this.userList.volunteer && tabList.push('志愿者');
- this.userList.aged && tabList.push('老年人');
- this.userList.special_popu && tabList.push('特殊人群');
- tabList.push('出生信息');
- tabList.push('死亡信息');
- tabList.push('迁出');
- this.tabList = tabList;
+ this.info.group_rental.forEach(item => {
+ this.getUserInfo(item.user_id);
});
},
- async getUserInfo(id) {
+
+ getUserInfo(id) {
const url = 'resident_info';
- const { data, code, msg } = await requestPostBi(
+ requestPostBi(
url,
{
queryParam: {
@@ -802,14 +821,32 @@ export default {
{
// mockId: 61172054,
}
- );
-
- if (code === 0) {
- this.userArray.push(data[0]);
- console.log('this.userArray0------------', this.userArray);
- }
+ ).then(res => {
+ console.log(res);
+ if (res.code === 0) {
+ this.userArray.push(res.data[0]);
+ if (this.userArray.length == 1) {
+ this.gettab2(this.userArray[0]);
+ }
+ }
+ });
+ },
+ gettab2(item) {
+ this.userList = { ...item };
+ let tabList = this.BaseTabList;
+ this.userList.crowd && tabList.push('党员');
+ this.userList.srs && tabList.push('保障房');
+ this.userList.unemployed && tabList.push('失业');
+ this.userList.exs && tabList.push('退役军人');
+ this.userList.ufs && tabList.push('统战人员');
+ this.userList.volunteer && tabList.push('志愿者');
+ this.userList.aged && tabList.push('老年人');
+ this.userList.special_popu && tabList.push('特殊人群');
+ tabList.push('出生信息');
+ tabList.push('死亡信息');
+ tabList.push('迁出');
+ this.tabList = tabList;
},
-
// 根据房屋id获取详情
async getInfo() {
let url = '';
@@ -842,6 +879,24 @@ export default {
this.info = { ...this.info, ...data[0] };
this.info = {
group_rental: [
+ {
+ user_id: '1501821708368089090'
+ },
+ {
+ user_id: '1501821708569415681'
+ },
+ {
+ user_id: '1501821708368089090'
+ },
+ {
+ user_id: '1501821708569415681'
+ },
+ {
+ user_id: '1501821708368089090'
+ },
+ {
+ user_id: '1501821708569415681'
+ },
{
user_id: '1501821708368089090'
},