详情页修改

This commit is contained in:
徐克 2022-08-05 17:49:41 +08:00
parent 0cd386f167
commit 6d8c00395a
3 changed files with 160 additions and 198 deletions

View File

@ -19,9 +19,11 @@
</template> </template>
</div> --> </div> -->
<div class="search-middle"> <div class="search-middle">
<div class="search-container" @click="search('111')"> <div class="search-container">
<input type="text" name="" id="" placeholder="请输入名称点击查询" class="inputStyle"> <el-input type="text" name="" id="cha" placeholder="请输入部门点击查询" class="inputStyle"
<button>搜索</button> v-model="inputInfo.departnew">
</el-input>
<button @click="search()">搜索</button>
</div> </div>
</div> </div>
<slot name="top"></slot> <slot name="top"></slot>
@ -60,19 +62,33 @@ export default {
type: [Array, Boolean], type: [Array, Boolean],
required: true required: true
}, },
},
data() {
return{
inputInfo: {
departnew: '',
jdnew: '',
},
}
}, },
components: { components: {
}, },
mounted() { mounted() {
console.log(this.dataSource);
}, },
beforeDestroy() { beforeDestroy() {
}, },
methods: { methods: {
search() {
this.$emit('inputData', this.inputInfo.departnew)
this.$parent.sreach()
}
}, },
}; };
</script> </script>

View File

@ -250,7 +250,7 @@ import axios from 'axios'
var that = this var that = this
if (departnew||jdnew) { if (departnew || jdnew) {
return this.tableData.filter(data => { return this.tableData.filter(data => {
// return Object.keys(data).some(key => { // return Object.keys(data).some(key => {
// return String(data[key]).toLowerCase().indexOf(departnew||jdnew) > -1 // return String(data[key]).toLowerCase().indexOf(departnew||jdnew) > -1
@ -284,12 +284,11 @@ import axios from 'axios'
// that.jdName = jd // that.jdName = jd
// that.$emit('jdNameData',that.jdName) // that.$emit('jdNameData',that.jdName)
// } // }
return inputTrue && input2True return inputTrue && input2True
}) })
} }
// console.log("that.jdName",that.jdName) // console.log("that.jdName",that.jdName)
return that.tableData return that.tableData
} }
}, },

View File

@ -20,43 +20,40 @@
<BasicBox2 class="basicInfo" title="房产证信息" :dataSource="workListFCZ" v-show="fczShow"></BasicBox2> --> <BasicBox2 class="basicInfo" title="房产证信息" :dataSource="workListFCZ" v-show="fczShow"></BasicBox2> -->
<!-- <div v-for="item in floorInfo" :key="item.id" style="width:100px;height: auto;"> --> <!-- <div v-for="item in floorInfo" :key="item.id" style="width:100px;height: auto;"> -->
<div v-show="val"> <div v-show="val">
<div style=" margin-top: 4%;text-align: center;top: 1px;width: 182px;" v-show="!isShow" <div style=" margin-top: 4%;text-align: center;top: 1px;width: 182px;" @click="showChild(item,index)"
v-for="(item,index) in floorNameQcData" :key="index"> v-for="(item,index) in floorNameQcData.floorName" :key="index">
<ul @click=showChild(item,index)> <ul>
<li class=" leftFloor">{{item}}</li> <li class=" leftFloor">{{item}}</li>
</ul> <li class="leftFloor1" @click="departSearch(item)" style="margin-top: 4%;text-align: center;top: 1px;"
<ul> v-for="(item,index) in floorNameQcData.departQcData" :key="index">{{item}}</li>
<div style="margin-top: 4%;text-align: center;top: 1px;" v-show="isShow"
v-for="(item,index) in departQcData" :key="index">
<ul @click="departSearch(item)">
<li class="leftFloor1">{{item}}</li>
</ul>
</div>
</ul> </ul>
</div> </div>
<div style="margin-top: 4%;text-align: center;top: 1px;width: 182px;" v-show="isShow" <!-- <div style=" margin-top: 4%;text-align: center;top: 1px;width: 182px;" @click="showChild(item,index)"
v-for="(item,index) in floorNameQcData" :key="index"> v-for="(item,index) in floorNameQcData.floorName" :key="index" v-show="isShow">
<ul @click=showChild()>
<li class="leftFloors">{{item}}</li>
</ul>
<ul> <ul>
<div style="margin-top: 4%;text-align: center;top: 1px;" v-show="isShow" <li class=" leftFloors">{{item}}</li>
v-for="(item,index) in departQcData" :key="index"> <li class="leftFloor1" @click="departSearch(item)" style="margin-top: 4%;text-align: center;top: 1px;"
<ul @click="departSearch(item)"> v-for="(item,index) in floorNameQcData.departQcData" :key="index">{{item}}</li>
<li class="leftFloor1">{{item}}</li>
</ul>
</div>
</ul> </ul>
</div> </div> -->
<!-- <ul style=" margin-top: 4%;text-align: center;top: 1px;width: 182px;">
<li class="leftFloors" @click="showChild()" v-show="isShow"
v-for="(item,index) in floorNameQcData.floorName" :key="index"
style="margin-top: 8%;text-align: center;top: 1px;">{{item}}</li>
</ul> -->
</div> </div>
<div v-show="!val"> <div v-show="!val">
<div style=" margin-top: 4%;text-align: center;top: 1px;width: 182px;" v-show="!isShow"> <div style=" margin-top: 4%;text-align: center;top: 1px;width: 182px;" v-show="!isShow">
<ul @click=showChild()> <ul @click="showChild(item)">
<li class="leftFloor">{{floorInfo}}</li> <li class="leftFloor">{{floorInfo}}</li>
</ul> </ul>
</div> </div>
<div style="margin-top: 4%;text-align: center;top: 1px;width: 182px;" v-show="isShow"> <div style="margin-top: 4%;text-align: center;top: 1px;width: 182px;" v-show="isShow">
<ul @click=showChild()> <ul @click="showChild()">
<li class="leftFloors">{{floorInfo}}</li> <li class="leftFloors">{{floorInfo}}</li>
</ul> </ul>
</div> </div>
@ -79,7 +76,8 @@
<div class="right"> <div class="right">
<!-- <h1>房地项目全生命周期管理</h1> --> <!-- <h1>房地项目全生命周期管理</h1> -->
<BasicBox4 title="生产用房" :dataSource="false" :options="options" :valueData="valueData"> <BasicBox4 title="生产用房" :dataSource="false" :options="options" :valueData="valueData" :key="componentKey"
v-on:inputData="getInputData">
<template slot="top"> <template slot="top">
<customDvScrollBoard2 :config="config6 <customDvScrollBoard2 :config="config6
@ -118,7 +116,6 @@ export default {
componentKey: 0, componentKey: 0,
componentKey1: 0, componentKey1: 0,
isShow1: true, isShow1: true,
isShow2: true,
val: true, val: true,
isShow:false, isShow:false,
floorInfo: [], floorInfo: [],
@ -129,8 +126,16 @@ export default {
tableData1: [], tableData1: [],
tableData2: [], tableData2: [],
departQcData: [], departQcData: [],
departQcData1: [], floorNameQcData:
floorNameQcData: [], {
floorName: {
depart: []
},
departQcData: []
},
unityUrl:"/Publish/city-build/index.html", unityUrl:"/Publish/city-build/index.html",
titleData:"城北基地", titleData:"城北基地",
valueData: '38', valueData: '38',
@ -318,6 +323,7 @@ export default {
columnWidth: [60], columnWidth: [60],
}, },
departnew:'',
type:'', type:'',
tit:"不动产产权证信息", tit:"不动产产权证信息",
loading: false, loading: false,
@ -358,18 +364,17 @@ this.unityUrl="/Publish/city-build/index.html"
} }
window.setTimeout(e => { window.setTimeout(e => {
this.forceRerender(); this.forceRerender();
},200) }, 200)
this.getInputData()
}, },
beforeDestroy() { beforeDestroy() {
clearInterval(this.timing); clearInterval(this.timing);
}, },
methods: { methods: {
// getInputData(name) {
// showChild(item,type) { this.departnew = name
// let fn = `this.showChild${type}(${item})`; console.log(this.departnew);
// eval(fn); },
// console.log(fn);
// },
// //
forceRerender() { forceRerender() {
this.componentKey ++; this.componentKey ++;
@ -503,87 +508,48 @@ console.log("val",val)
console.log('val', result.data) console.log('val', result.data)
this.arr = result.data this.arr = result.data
for (var a = 0; a < result.data.length; a++) { for (var a = 0; a < result.data.length; a++) {
// for (let i = 0; i < result.data.length; i++) {
// that.floorInfo1.push(result.data[a].floorName) that.floorInfo1.push(result.data[i].floorName)
// console.log(that.floorInfo1);
// //
// var str = that.floorInfo1.floor; that.tableData.push(Object.values(result.data[i]))
// var spstr = str.split(""); }
// for (let v = 0; v < that.tableData.length; v++) {
// if (spstr[spstr.length - 1] == 0) { that.departInfo.push(that.tableData[v])
for (let i = 0; i < result.data.length; i++) { that.departInfo[v].splice(1, 1)
// that.floorInfo1.floor = val + '' that.departInfo[v].splice(2, 1)
// var str1 = result.data[i].floor that.departInfo[v].splice(6, 1)
// var spstr1 = str1.split(""); that.departInfo[v].splice(4, 1)
// if (spstr1[spstr1.length - 1] == 0) {
// that.floorInfo.push(result.data[i].floorName)
that.floorInfo1.push(result.data[i].floorName)
// that.departInfo.push(result.data[i].depart)
// that.tableData.push(Object.values(result.data[i]))
// }
//
that.tableData.push(Object.values(result.data[i]))
} }
for (let v = 0; v < that.tableData.length; v++) {
that.departInfo.push(that.tableData[v].slice(0, 4))
}
that.config5.data = that.departInfo that.config5.data = that.departInfo
console.log(that.tableData); //
const qcData = new Set(that.config5.data)
that.departQcData = qcData
//
// var newArr1 = that.departInfo.filter(i => i && i.trim())
//
const qcData1 = new Set(that.floorInfo1) const qcData1 = new Set(that.floorInfo1)
that.floorNameQcData = qcData1 that.floorNameQcData.floorName = qcData1
var floorname = []
// this.floorNameQcData.floorName.forEach(function (item1, index, set) {
// const qcData = new Set(newArr1) floorname.push(item1)
// that.departQcData = qcData })
// //
// for (let j = 0; j < result.data.length; j++) {
// if (that.floorNameQcData == result.data[j].floorName) { var groupList = [];
// console.log(8989898); //
// that.departInfo.push(result.data[j].depart) for (var j = 0; j < result.data.length; j++) {
// // if (!groupList[result.data[j].floorName]) {
// // that.departInfo.push(result.data[j].depart) var arr1 = [];
// } arr1.push(result.data[j]);
// } groupList[result.data[j].floorName] = arr1;
// } else {
// var newArr1 = that.departInfo.filter(i => i && i.trim()) groupList[result.data[j].floorName].push(result.data[j])
// }
// const qcData = new Set(newArr1) }
// that.departQcData = qcData that.floorNameQcData.floorName.depart = groupList
// } else {
//
// for (let j = 0; j < result.data.length; j++) {
// if (that.floorInfo1.floor === result.data[j].floor) {
// that.departInfo.push(result.data[j].depart)
// //
// }
// }
// that.tableData.push(Object.values(result.data[]))
// that.config5.data = that.tableData
// for (let v = 0; v < that.config5.data.length; v++){
// that.config5.data[v].pop()
// }
// console.log("that.config5",that.config5);
// //
// var newArr = that.departInfo.filter(i => i && i.trim())
// // console.log(that.config5.data);
// //
// const qcData = new Set(newArr)
// that.departQcData = qcData
var arr = Object.entries(result.data(a)) var arr = Object.entries(result.data(a))
console.log("arr", arr) console.log("arr", arr)
// }
} }
@ -591,9 +557,7 @@ console.log("val",val)
.catch(error => { .catch(error => {
console.log(error) console.log(error)
}) })
// }else{
// }
} else if (val == "健康中心" || val == "老卫生所" || val == "龙吟广场" || val == "栖霞基地") { } else if (val == "健康中心" || val == "老卫生所" || val == "龙吟广场" || val == "栖霞基地") {
if (val == '健康中心') { if (val == '健康中心') {
that.floorInfo = "健康中心主楼" that.floorInfo = "健康中心主楼"
@ -602,7 +566,6 @@ console.log("val",val)
} }
that.val = false that.val = false
console.log("val", val) console.log("val", val)
axios.get('/json/' + val + '.json') axios.get('/json/' + val + '.json')
.then(result => { .then(result => {
console.log('val', result.data) console.log('val', result.data)
@ -616,9 +579,13 @@ console.log("val",val)
// //
that.tableData.push(Object.values(result.data[j])) that.tableData.push(Object.values(result.data[j]))
} }
for (let v = 0; v < that.tableData.length; v++) { for (let v = 0; v < that.tableData.length; v++) {
that.departInfo1.push(that.tableData[v].slice(0, 4)) that.departInfo1.push(that.tableData[v])
that.departInfo1[v].splice(1, 1)
that.departInfo1[v].splice(4, 1)
} }
that.config5.data = that.departInfo1 that.config5.data = that.departInfo1
// //
@ -626,6 +593,7 @@ console.log("val",val)
// //
const qcData = new Set(newArr) const qcData = new Set(newArr)
that.departQcData = qcData that.departQcData = qcData
console.log(that.departQcData);
// that.departInfo = result.data[8] // that.departInfo = result.data[8]
// } // }
@ -644,75 +612,79 @@ console.log("val",val)
this.loading = false; this.loading = false;
}, 500); }, 500);
}, },
showChild(item, index) { showChild(item) {
console.log(item);
this.isShow = !this.isShow this.isShow = !this.isShow
for (let i = 0; i < this.config5.data.length; i++) { var listdepart = []
this.departInfo = this.config5.data[i] //
if (item == this.departInfo[2]) { if (item != null) {
for (let a = 0; a < this.arr.length; a++) { for (let i = 0; i < this.floorNameQcData.floorName.depart[item].length; i++) {
this.departQcData1.push(this.arr[a].depart) listdepart.push(this.floorNameQcData.floorName.depart[item][i].depart)
console.log(this.arr[a].depart);
}
console.log(this.departQcData1);
//
var newArr = this.departQcData1.filter(i => i && i.trim())
// console.log(that.config5.data);
//
const qcData = new Set(newArr)
this.departQcData = qcData
console.log(this.departQcData);
} }
//
var newArr1 = listdepart.filter(i => i && i.trim())
//
const qcData = new Set(newArr1)
this.floorNameQcData.departQcData = qcData
} else {
for (let i = 0; i < this.config5.data.length; i++) {
this.departInfo = this.config5.data[i]
if (item == this.departInfo[2]) {
for (let a = 0; a < this.arr.length; a++) {
this.departQcData1.push(this.arr[a].depart)
console.log(this.arr[a].depart);
}
}
}
//
var newArr = this.departQcData1.filter(i => i && i.trim())
// console.log(that.config5.data);
//
const qcData = new Set(newArr)
this.departQcData = qcData
console.log(this.departQcData);
} }
// this.componentKey1++
// for (let i = 0; i < this.config5.data.length; i++) {
// this.tableData = this.config5.data[i]
// if (item == this.tableData[2]) {
// this.tableData1.push(this.tableData)
// }
// }
// this.config6.data = this.tableData1
// this.tableData1 = []
}, },
departSearch(item) { departSearch(item) {
console.log(item); console.log(item);
this.componentKey1++ this.componentKey1++
this.isShow1 = false this.isShow1 = false
var floorname = ''
this.floorNameQcData.forEach(function (item1, index, set) {
floorname = item1
})
if (floorname != '') {
for (let i = 0; i < this.config5.data.length; i++) {
this.tableData = this.config5.data[i]
if (item == this.tableData[0] && floorname == this.tableData[2]) {
this.tableData1.push(this.tableData)
}
}
this.config6.data = this.tableData1
console.log(this.config6.data);
this.tableData1 = []
} else {
for (let i = 0; i < this.config5.data.length; i++) { for (let i = 0; i < this.config5.data.length; i++) {
this.tableData = this.config5.data[i] this.tableData = this.config5.data[i]
if (item == this.tableData[0]) { if (item == this.tableData[0]) {
this.tableData1.push(this.tableData) this.tableData1.push(this.tableData)
} }
} }
this.config6.data = []
this.config6.data = this.tableData1 this.config6.data = this.tableData1
console.log(this.config6.data); console.log(this.config6.data);
this.tableData1 = [] this.tableData1 = []
} // }
},
sreach() {
this.componentKey1++
this.isShow1 = false
const departnew = this.departnew;
// const cha = document.getElementById("cha");
// var cha1 = ("#cha").val()
var listTable = [];
for (let i = 0; i < this.config5.data.length; i++) {
listTable = this.config5.data[i];
for (let j = 0; j < listTable.length; j++) {
if (listTable[0].indexOf(departnew) != -1) {
this.tableData2.push(listTable)
}
}
}
console.log(this.tableData2);
this.config6.data = this.tableData2
this.tableData2 = []
} }
}, },
}; };
@ -720,31 +692,6 @@ console.log("val",val)
<style lang="scss" scoped> <style lang="scss" scoped>
@import "~@/common/var.scss"; @import "~@/common/var.scss";
@import "~@/assets/scss/index.scss"; @import "~@/assets/scss/index.scss";