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

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

@ -472,7 +472,24 @@ export default {
this.init(queryOrgId, queryOrgLevel); 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: { methods: {
async init(queryOrgId, queryOrgLevel) { async init(queryOrgId, queryOrgLevel) {
@ -568,7 +585,7 @@ export default {
clickAgencyItem(item) { clickAgencyItem(item) {
console.log(item); console.log(item);
if (item.level === 'neighborHood') { 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 { } else {
this.toBread({ this.toBread({
orgId: item.id, orgId: item.id,

Loading…
Cancel
Save