|
@@ -236,6 +236,8 @@
|
|
:filePath="filePath"
|
|
:filePath="filePath"
|
|
:successImageLists="successImageLists"
|
|
:successImageLists="successImageLists"
|
|
:houseData="houseData"
|
|
:houseData="houseData"
|
|
|
|
+ :peopleData="peopleData"
|
|
|
|
+ :houseDataNames="houseDataNames"
|
|
ref="filterHouse"
|
|
ref="filterHouse"
|
|
></previe-inform>
|
|
></previe-inform>
|
|
</div>
|
|
</div>
|
|
@@ -448,6 +450,7 @@ export default {
|
|
centerDialogVisible: false,
|
|
centerDialogVisible: false,
|
|
// 获取的房间信息
|
|
// 获取的房间信息
|
|
houseData: [],
|
|
houseData: [],
|
|
|
|
+ houseDataNames: '',
|
|
peopleData: [],
|
|
peopleData: [],
|
|
// 选中的房间
|
|
// 选中的房间
|
|
selectDataHouseTreeData: {
|
|
selectDataHouseTreeData: {
|
|
@@ -455,6 +458,8 @@ export default {
|
|
userID: [],
|
|
userID: [],
|
|
userList: []
|
|
userList: []
|
|
},
|
|
},
|
|
|
|
+ houseNames: [],
|
|
|
|
+ PeopleNames: [],
|
|
// 选中的人员
|
|
// 选中的人员
|
|
selectDataPeopleTreeData: {
|
|
selectDataPeopleTreeData: {
|
|
checkData: [],
|
|
checkData: [],
|
|
@@ -485,9 +490,9 @@ export default {
|
|
watch: {},
|
|
watch: {},
|
|
methods: {
|
|
methods: {
|
|
// 人员树
|
|
// 人员树
|
|
- dataPeople(data) {
|
|
|
|
- this.peopleData = data;
|
|
|
|
- },
|
|
|
|
|
|
+ // dataPeople(data) {
|
|
|
|
+ // this.peopleData = data;
|
|
|
|
+ // },
|
|
// 上传文件
|
|
// 上传文件
|
|
handleRemove(file, fileList) {
|
|
handleRemove(file, fileList) {
|
|
console.log('上传文件', file, fileList);
|
|
console.log('上传文件', file, fileList);
|
|
@@ -563,7 +568,6 @@ export default {
|
|
selectDataHouseTree(val) {
|
|
selectDataHouseTree(val) {
|
|
this.selectDataHouseTreeData.userID = [];
|
|
this.selectDataHouseTreeData.userID = [];
|
|
this.selectDataHouseTreeData.userID = val.userList;
|
|
this.selectDataHouseTreeData.userID = val.userList;
|
|
- this.selectDataPeopleTreeData.userList = [];
|
|
|
|
// this.selectDataHouseTreeData = val;
|
|
// this.selectDataHouseTreeData = val;
|
|
// 获取房间下的usid
|
|
// 获取房间下的usid
|
|
this.$http.post('/sc-community-web/notice/queryHouseUser', val.userList).then((res) => {
|
|
this.$http.post('/sc-community-web/notice/queryHouseUser', val.userList).then((res) => {
|
|
@@ -596,7 +600,6 @@ export default {
|
|
},
|
|
},
|
|
//选择员工复选框变化
|
|
//选择员工复选框变化
|
|
changeCheckboxStaffRoom(val) {
|
|
changeCheckboxStaffRoom(val) {
|
|
- console.log('员工复选框变化', val);
|
|
|
|
if (!this.ruleForm.popCommunityId) {
|
|
if (!this.ruleForm.popCommunityId) {
|
|
this.ruleForm.issueRoom.staff = false;
|
|
this.ruleForm.issueRoom.staff = false;
|
|
return this.$message.warning('请先选择社区');
|
|
return this.$message.warning('请先选择社区');
|
|
@@ -617,7 +620,6 @@ export default {
|
|
},
|
|
},
|
|
// 选择房间复选框变化
|
|
// 选择房间复选框变化
|
|
changeCheckboxRoom(val) {
|
|
changeCheckboxRoom(val) {
|
|
- console.log('选择房间复选框变化', val);
|
|
|
|
if (!this.ruleForm.popCommunityId) {
|
|
if (!this.ruleForm.popCommunityId) {
|
|
this.ruleForm.issueRoom.checkAll = false;
|
|
this.ruleForm.issueRoom.checkAll = false;
|
|
return this.$message.warning('请先选择社区');
|
|
return this.$message.warning('请先选择社区');
|
|
@@ -642,7 +644,6 @@ export default {
|
|
this.ruleForm.disabledStaffRoom = false;
|
|
this.ruleForm.disabledStaffRoom = false;
|
|
this.$refs.selectTreePeoples.selectAllPeople();
|
|
this.$refs.selectTreePeoples.selectAllPeople();
|
|
}
|
|
}
|
|
- console.log('监听员工单选框变化', val, this.ruleForm.issueRoom.staff);
|
|
|
|
},
|
|
},
|
|
// 是否紧急
|
|
// 是否紧急
|
|
changeRadioExigencyOr(val) {
|
|
changeRadioExigencyOr(val) {
|
|
@@ -757,7 +758,9 @@ export default {
|
|
userId: this.ruleForm.issueRoom.checkAll
|
|
userId: this.ruleForm.issueRoom.checkAll
|
|
? this.selectDataHouseTreeData.userList
|
|
? this.selectDataHouseTreeData.userList
|
|
: this.selectDataPeopleTreeData.userList,
|
|
: this.selectDataPeopleTreeData.userList,
|
|
- treeData: JSON.stringify(this.selectDataHouseTreeData.userID),
|
|
|
|
|
|
+ treeData: this.ruleForm.issueRoom.checkAll
|
|
|
|
+ ? JSON.stringify(this.selectDataHouseTreeData.userID)
|
|
|
|
+ : JSON.stringify(this.selectDataPeopleTreeData.userList),
|
|
title: this.ruleForm.title,
|
|
title: this.ruleForm.title,
|
|
type: this.ruleForm.informType,
|
|
type: this.ruleForm.informType,
|
|
urgentFlag: this.ruleForm.exigencyOr == '是' ? 1 : 0,
|
|
urgentFlag: this.ruleForm.exigencyOr == '是' ? 1 : 0,
|
|
@@ -815,7 +818,6 @@ export default {
|
|
var onOption = '';
|
|
var onOption = '';
|
|
this.$http.get('/sc-community/assets/community/list', {}).then((res) => {
|
|
this.$http.get('/sc-community/assets/community/list', {}).then((res) => {
|
|
// this.$store.commit('setAreaSelect', res.data);
|
|
// this.$store.commit('setAreaSelect', res.data);
|
|
-
|
|
|
|
console.log('获取社区列表', res);
|
|
console.log('获取社区列表', res);
|
|
res.data.map((res) => {
|
|
res.data.map((res) => {
|
|
onOption = {
|
|
onOption = {
|
|
@@ -826,21 +828,59 @@ export default {
|
|
});
|
|
});
|
|
});
|
|
});
|
|
},
|
|
},
|
|
-
|
|
|
|
|
|
+ filterPeople(arr) {
|
|
|
|
+ arr.map((item, index) => {
|
|
|
|
+ if (item.children && item.children.length > 0) {
|
|
|
|
+ this.filterPeople(item.children);
|
|
|
|
+ } else if (item.children == null) {
|
|
|
|
+ this.filterArrPeople(arr, item, index);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ filterArrPeople(arr, item, index) {
|
|
|
|
+ if (!this.rowDetail.treeData.includes(Number(item.id))) {
|
|
|
|
+ arr.splice(index, 1);
|
|
|
|
+ arr.map((item) => {
|
|
|
|
+ this.filterArrPeople(arr, item, index);
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ filterPeopleName(array) {
|
|
|
|
+ console.log('====================================');
|
|
|
|
+ console.log(' filterPeopleName(array', array);
|
|
|
|
+ console.log('====================================');
|
|
|
|
+ var that = this;
|
|
|
|
+ // array.map((item) => {
|
|
|
|
+ // if (item.children && item.children.length > 0) {
|
|
|
|
+ // that.filterName(item.children);
|
|
|
|
+ // that.houseNames.push(item.name);
|
|
|
|
+ // } else if (item.type == 'room') {
|
|
|
|
+ // that.houseNames.push(item.name);
|
|
|
|
+ // }
|
|
|
|
+ // });
|
|
|
|
+ array.map((item) => {
|
|
|
|
+ if (item.children) {
|
|
|
|
+ that.filterPeopleName(item.children);
|
|
|
|
+ } else if (item.children == null) {
|
|
|
|
+ that.PeopleNames.push(item.value);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ },
|
|
// 获取人员
|
|
// 获取人员
|
|
getPeopleList() {
|
|
getPeopleList() {
|
|
|
|
+ this.PeopleNames = [];
|
|
this.$http.get('/sc-user-center/user/findUserList').then(({ status, data, msg }) => {
|
|
this.$http.get('/sc-user-center/user/findUserList').then(({ status, data, msg }) => {
|
|
if (status === 0) {
|
|
if (status === 0) {
|
|
- this.dataPeopleList = data;
|
|
|
|
- // this.dimension(this.dataPeopleList, this.dataDetail.noticeUserVoList);
|
|
|
|
|
|
+ this.peopleData = data;
|
|
|
|
+ this.filterPeople(this.peopleData);
|
|
|
|
+ this.filterPeopleName(this.peopleData);
|
|
|
|
+ this.houseDataNames = this.PeopleNames.toString();
|
|
} else {
|
|
} else {
|
|
this.$message(warning, '获取人员失败,请稍后重试');
|
|
this.$message(warning, '获取人员失败,请稍后重试');
|
|
}
|
|
}
|
|
- console.log('dataPeopleList', this.dataPeopleList);
|
|
|
|
});
|
|
});
|
|
},
|
|
},
|
|
dimension(arr) {
|
|
dimension(arr) {
|
|
- console.log('dimensiondimensiondimensiondimension', arr);
|
|
|
|
arr.map((item, index) => {
|
|
arr.map((item, index) => {
|
|
if (item.children) {
|
|
if (item.children) {
|
|
this.dimension(item.children);
|
|
this.dimension(item.children);
|
|
@@ -857,32 +897,38 @@ export default {
|
|
});
|
|
});
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- filterName(arr) {
|
|
|
|
- var name = '';
|
|
|
|
- arr.map((item) => {
|
|
|
|
- if (item.children) {
|
|
|
|
- this.filterName(item.children);
|
|
|
|
- } else {
|
|
|
|
- name.concat(+',' + item.name);
|
|
|
|
|
|
+ filterName(array) {
|
|
|
|
+ var that = this;
|
|
|
|
+ array.map((item) => {
|
|
|
|
+ if (item.children && item.children.length > 0) {
|
|
|
|
+ that.houseNames.push(item.name);
|
|
|
|
+ that.filterName(item.children);
|
|
|
|
+ } else if (item.type == 'room') {
|
|
|
|
+ that.houseNames.push(item.name);
|
|
}
|
|
}
|
|
});
|
|
});
|
|
- return name;
|
|
|
|
},
|
|
},
|
|
|
|
+
|
|
// 获取房间
|
|
// 获取房间
|
|
getOrgTreeList() {
|
|
getOrgTreeList() {
|
|
|
|
+ this.houseNames = [];
|
|
this.$http
|
|
this.$http
|
|
.get('/sc-community/assets/tree/community/find', { buildingType: this.buildingType })
|
|
.get('/sc-community/assets/tree/community/find', { buildingType: this.buildingType })
|
|
.then(({ status, data, msg }) => {
|
|
.then(({ status, data, msg }) => {
|
|
if (status === 0 && data) {
|
|
if (status === 0 && data) {
|
|
console.log('houseData=1', this.houseData);
|
|
console.log('houseData=1', this.houseData);
|
|
- this.houseData = data;
|
|
|
|
|
|
+ var arr = data.filter((item) => {
|
|
|
|
+ return item.id == this.rowDetail.communityId;
|
|
|
|
+ });
|
|
|
|
+ this.houseData = arr;
|
|
this.dimension(this.houseData);
|
|
this.dimension(this.houseData);
|
|
- this.rowDetail.houseDataName = this.filterName(this.houseData);
|
|
|
|
|
|
+ this.filterName(this.houseData);
|
|
|
|
+ let h = [...new Set(this.houseNames)];
|
|
console.log('====================================');
|
|
console.log('====================================');
|
|
- console.log('houseData=2', this.houseData);
|
|
|
|
|
|
+ console.log('houseNames', this.houseData);
|
|
console.log('====================================');
|
|
console.log('====================================');
|
|
|
|
+ this.houseDataNames = this.houseNames.toString();
|
|
}
|
|
}
|
|
- console.log('获取房间', this.rowDetail.treeData);
|
|
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
|
|
@@ -891,10 +937,14 @@ export default {
|
|
// this.rowDetail = [];
|
|
// this.rowDetail = [];
|
|
this.$http.get('/sc-community-web/notice/find/' + row.id).then((res) => {
|
|
this.$http.get('/sc-community-web/notice/find/' + row.id).then((res) => {
|
|
if (res.status === 0) {
|
|
if (res.status === 0) {
|
|
- this.getOrgTreeList();
|
|
|
|
- // this.filterHouse(this.organList, res.data.noticeUserVoList);
|
|
|
|
this.rowDetail = res.data;
|
|
this.rowDetail = res.data;
|
|
this.rowDetail.treeData = JSON.parse(res.data.treeData);
|
|
this.rowDetail.treeData = JSON.parse(res.data.treeData);
|
|
|
|
+ // this.rowDetail.newName = this.houseNames.toString();
|
|
|
|
+ if (res.data.userType == 0) {
|
|
|
|
+ this.getOrgTreeList();
|
|
|
|
+ } else {
|
|
|
|
+ this.getPeopleList();
|
|
|
|
+ }
|
|
// let fileArr = row.filePath.split(',');
|
|
// let fileArr = row.filePath.split(',');
|
|
// this.filePath = fileArr.slice(0, fileArr.length - 1);
|
|
// this.filePath = fileArr.slice(0, fileArr.length - 1);
|
|
this.filePath = JSON.parse(res.data.filePath);
|
|
this.filePath = JSON.parse(res.data.filePath);
|
|
@@ -903,12 +953,11 @@ export default {
|
|
this.centerDialogVisible = true;
|
|
this.centerDialogVisible = true;
|
|
this.showDetail = false;
|
|
this.showDetail = false;
|
|
console.log('查看详情', res);
|
|
console.log('查看详情', res);
|
|
|
|
+ console.log('查看详情', res.data.noticeUserVoList[0].userType);
|
|
} else {
|
|
} else {
|
|
return this.$message('获取详情失败!请稍后重试');
|
|
return this.$message('获取详情失败!请稍后重试');
|
|
}
|
|
}
|
|
});
|
|
});
|
|
- // this.ruleForm.title = row.managementName;
|
|
|
|
- // this.ruleForm.newPhone = row.phone;
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
};
|