Browse Source

Merge branch 'bug_mk' into dev

V4.3.3
mk 1 year ago
parent
commit
6ad9b74714
  1. 50
      src/views/dataBoard/cpts/homeDetails/index.vue
  2. 21
      src/views/dataBoard/renfang/index.vue

50
src/views/dataBoard/cpts/homeDetails/index.vue

@ -2,15 +2,7 @@
<div class="homeWrap">
<div class="bread">
<bread-crumb
:list="[
{
path: '/dataBoard/renfang/index',
name: '人房数据',
},
{
name: homeText ? homeText : '',
},
]"
:list="breadList"
/>
</div>
<el-select
@ -61,7 +53,7 @@
</div>-->
<!-- <Title :text="homeText ? homeText : ''">
<!--
<span
v-if="homeMsg && homeMsg.type"
:class="[
@ -396,6 +388,7 @@ import Pagination from "@/views/dataBoard/satisfactionEval/components/Pagination
import Title from "./Title/index.vue";
import BreadCrumb from "@/views/dataBoard/cpts/personnel/components/Breadcrumb/index.vue";
import PeopleMount from "./PeopleMount/index.vue";
import nextTick from "dai-js/tools/nextTick";
export default {
name: "homeDetails",
@ -407,6 +400,7 @@ export default {
},
data() {
return {
breadList:[],
total: 0,
queryParams: {
pageNo: 1,
@ -434,7 +428,9 @@ export default {
loading: false,
homeMsg: {},
list: [],
homeText: "",
homeText: {
value:''
},
searchId: "",
buildingList: [],
buildingLists: [],
@ -452,13 +448,29 @@ export default {
freeHomeArr: [],
};
},
watch: {},
mounted() {
// const buId = this.$route.query.buId || null;
// this.getList(buId);
// this.getTableData(this.$route.query.id);
watch: {
homeText:{
handler(newVal,oldVal){
this.breadList[this.breadList.length-1].name = newVal.value || ''
},
deep:true
}
},
async mounted() {
this.getPeopleTypeList();
this.listBuildings()
await nextTick(1000)
this.$nextTick(()=>{
const breadList = this.$route.query.breadList || null;
this.breadList = JSON.parse(breadList)
this.breadList.forEach(item=>{
item.path = '/dataBoard/renfang/index?bread=' + breadList + '&orgId=' + item.orgId +'&orgLevel=' + item.orgLevel
item.name = item.meta.title
})
this.breadList.push( {
name: this.homeText.value || '',
})
})
},
methods: {
listBuildings() {
@ -536,7 +548,7 @@ export default {
]);
this.freeHomeArr = freeHomeArr;
this.homeMsg = unitInfos;
this.homeText =
this.homeText.value =
(unitInfos.quartersName ? unitInfos.quartersName : "") +
(unitInfos.buildingName ? unitInfos.buildingName : "") +
(unitInfos.unitNum ? unitInfos.unitNum + "单元" : "");
@ -591,7 +603,7 @@ export default {
const { code, data } = res.data;
if (code === 0) {
this.buildingList = data;
this.homeText =
this.homeText.value =
this.buildingList[0].buildingName +
this.buildingList[0].unitName;
if (this.buildingList && this.buildingList.length > 0) {
@ -683,7 +695,7 @@ export default {
chooseNav(item) {
let buildList = [...this.buildingList];
this.homeText = item.buildingName + item.unitName;
this.homeText.value = item.name;
buildList.forEach((d) => {
if (item.id === d.id) {
d.ifActive = true;

21
src/views/dataBoard/renfang/index.vue

@ -472,7 +472,24 @@ export default {
this.init(queryOrgId, queryOrgLevel);
},
watch: {},
watch: {
$route:{
handler:function(newVal,oldVal){
if(oldVal.name === 'HomeDetails'){
const queryBread=JSON.parse(getQueryPara("bread")) ;
const queryOrgId = getQueryPara("orgId");
const queryOrgLevel = getQueryPara("orgLevel");
console.log(queryBread,queryOrgLevel,queryOrgId,'seeee1');
this.$nextTick(()=>{
this.init(queryOrgId, queryOrgLevel);
})
if(queryBread.findIndex(item=>item.orgId === queryOrgId) != -1){
this.breadList = queryBread.splice(0,queryBread.findIndex(item=>item.orgId === queryOrgId)+1)
}
}
}
}
},
methods: {
async init(queryOrgId, queryOrgLevel) {
@ -568,7 +585,7 @@ export default {
clickAgencyItem(item) {
console.log(item);
if (item.level === 'neighborHood') {
this.$router.push('/homeDetails/index?id=' + item.id)
this.$router.push('/homeDetails/index?id=' + item.id + '&breadList='+JSON.stringify(this.breadList))
} else {
this.toBread({
orgId: item.id,

Loading…
Cancel
Save