详情页修改
This commit is contained in:
parent
0cd386f167
commit
6d8c00395a
|
@ -19,9 +19,11 @@
|
|||
</template>
|
||||
</div> -->
|
||||
<div class="search-middle">
|
||||
<div class="search-container" @click="search('111')">
|
||||
<input type="text" name="" id="" placeholder="请输入名称点击查询" class="inputStyle">
|
||||
<button>搜索</button>
|
||||
<div class="search-container">
|
||||
<el-input type="text" name="" id="cha" placeholder="请输入部门点击查询" class="inputStyle"
|
||||
v-model="inputInfo.departnew">
|
||||
</el-input>
|
||||
<button @click="search()">搜索</button>
|
||||
</div>
|
||||
</div>
|
||||
<slot name="top"></slot>
|
||||
|
@ -60,19 +62,33 @@ export default {
|
|||
type: [Array, Boolean],
|
||||
required: true
|
||||
},
|
||||
|
||||
},
|
||||
data() {
|
||||
return{
|
||||
inputInfo: {
|
||||
departnew: '',
|
||||
jdnew: '',
|
||||
},
|
||||
|
||||
}
|
||||
},
|
||||
components: {
|
||||
|
||||
},
|
||||
mounted() {
|
||||
console.log(this.dataSource);
|
||||
|
||||
},
|
||||
beforeDestroy() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
|
||||
search() {
|
||||
this.$emit('inputData', this.inputInfo.departnew)
|
||||
this.$parent.sreach()
|
||||
}
|
||||
},
|
||||
|
||||
};
|
||||
</script>
|
||||
|
||||
|
|
|
@ -250,7 +250,7 @@ import axios from 'axios'
|
|||
|
||||
var that = this
|
||||
|
||||
if (departnew||jdnew) {
|
||||
if (departnew || jdnew) {
|
||||
return this.tableData.filter(data => {
|
||||
// return Object.keys(data).some(key => {
|
||||
// return String(data[key]).toLowerCase().indexOf(departnew||jdnew) > -1
|
||||
|
@ -284,12 +284,11 @@ import axios from 'axios'
|
|||
// that.jdName = jd
|
||||
// that.$emit('jdNameData',that.jdName)
|
||||
// }
|
||||
|
||||
return inputTrue && input2True
|
||||
})
|
||||
}
|
||||
}
|
||||
// console.log("that.jdName",that.jdName)
|
||||
|
||||
|
||||
return that.tableData
|
||||
}
|
||||
},
|
||||
|
|
|
@ -20,43 +20,40 @@
|
|||
<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-show="val">
|
||||
<div style=" margin-top: 4%;text-align: center;top: 1px;width: 182px;" v-show="!isShow"
|
||||
v-for="(item,index) in floorNameQcData" :key="index">
|
||||
<ul @click=showChild(item,index)>
|
||||
<div style=" margin-top: 4%;text-align: center;top: 1px;width: 182px;" @click="showChild(item,index)"
|
||||
v-for="(item,index) in floorNameQcData.floorName" :key="index">
|
||||
<ul>
|
||||
<li class=" leftFloor">{{item}}</li>
|
||||
</ul>
|
||||
<ul>
|
||||
<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>
|
||||
<li class="leftFloor1" @click="departSearch(item)" style="margin-top: 4%;text-align: center;top: 1px;"
|
||||
v-for="(item,index) in floorNameQcData.departQcData" :key="index">{{item}}</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div style="margin-top: 4%;text-align: center;top: 1px;width: 182px;" v-show="isShow"
|
||||
v-for="(item,index) in floorNameQcData" :key="index">
|
||||
<ul @click=showChild()>
|
||||
<li class="leftFloors">{{item}}</li>
|
||||
</ul>
|
||||
<!-- <div style=" margin-top: 4%;text-align: center;top: 1px;width: 182px;" @click="showChild(item,index)"
|
||||
v-for="(item,index) in floorNameQcData.floorName" :key="index" v-show="isShow">
|
||||
<ul>
|
||||
<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>
|
||||
<li class=" leftFloors">{{item}}</li>
|
||||
<li class="leftFloor1" @click="departSearch(item)" style="margin-top: 4%;text-align: center;top: 1px;"
|
||||
v-for="(item,index) in floorNameQcData.departQcData" :key="index">{{item}}</li>
|
||||
</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 v-show="!val">
|
||||
<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>
|
||||
</ul>
|
||||
</div>
|
||||
<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>
|
||||
</ul>
|
||||
</div>
|
||||
|
@ -79,7 +76,8 @@
|
|||
<div class="right">
|
||||
<!-- <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">
|
||||
<customDvScrollBoard2 :config="config6
|
||||
|
@ -118,7 +116,6 @@ export default {
|
|||
componentKey: 0,
|
||||
componentKey1: 0,
|
||||
isShow1: true,
|
||||
isShow2: true,
|
||||
val: true,
|
||||
isShow:false,
|
||||
floorInfo: [],
|
||||
|
@ -129,8 +126,16 @@ export default {
|
|||
tableData1: [],
|
||||
tableData2: [],
|
||||
departQcData: [],
|
||||
departQcData1: [],
|
||||
floorNameQcData: [],
|
||||
floorNameQcData:
|
||||
{
|
||||
floorName: {
|
||||
|
||||
depart: []
|
||||
|
||||
},
|
||||
departQcData: []
|
||||
},
|
||||
|
||||
unityUrl:"/Publish/city-build/index.html",
|
||||
titleData:"城北基地",
|
||||
valueData: '38',
|
||||
|
@ -318,6 +323,7 @@ export default {
|
|||
columnWidth: [60],
|
||||
|
||||
},
|
||||
departnew:'',
|
||||
type:'',
|
||||
tit:"不动产产权证信息",
|
||||
loading: false,
|
||||
|
@ -358,18 +364,17 @@ this.unityUrl="/Publish/city-build/index.html"
|
|||
}
|
||||
window.setTimeout(e => {
|
||||
this.forceRerender();
|
||||
},200)
|
||||
}, 200)
|
||||
this.getInputData()
|
||||
},
|
||||
beforeDestroy() {
|
||||
clearInterval(this.timing);
|
||||
},
|
||||
methods: {
|
||||
//更新的点击事件
|
||||
// showChild(item,type) {
|
||||
// let fn = `this.showChild${type}(${item})`;
|
||||
// eval(fn);
|
||||
// console.log(fn);
|
||||
// },
|
||||
getInputData(name) {
|
||||
this.departnew = name
|
||||
console.log(this.departnew);
|
||||
},
|
||||
//重新渲染
|
||||
forceRerender() {
|
||||
this.componentKey ++;
|
||||
|
@ -503,87 +508,48 @@ console.log("val",val)
|
|||
console.log('val', result.data)
|
||||
this.arr = result.data
|
||||
for (var a = 0; a < result.data.length; a++) {
|
||||
//拿到楼号
|
||||
// that.floorInfo1.push(result.data[a].floorName)
|
||||
// console.log(that.floorInfo1);
|
||||
//判断楼号
|
||||
// var str = that.floorInfo1.floor;
|
||||
// var spstr = str.split("");
|
||||
//判断城南基地部分数字楼层拿到所有部门
|
||||
// if (spstr[spstr.length - 1] == 0) {
|
||||
for (let i = 0; i < result.data.length; i++) {
|
||||
// that.floorInfo1.floor = val + '主楼'
|
||||
// var str1 = result.data[i].floor
|
||||
// var spstr1 = str1.split("");
|
||||
// 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 i = 0; i < result.data.length; i++) {
|
||||
that.floorInfo1.push(result.data[i].floorName)
|
||||
|
||||
//表格数据
|
||||
that.tableData.push(Object.values(result.data[i]))
|
||||
}
|
||||
for (let v = 0; v < that.tableData.length; v++) {
|
||||
that.departInfo.push(that.tableData[v])
|
||||
that.departInfo[v].splice(1, 1)
|
||||
that.departInfo[v].splice(2, 1)
|
||||
that.departInfo[v].splice(6, 1)
|
||||
that.departInfo[v].splice(4, 1)
|
||||
}
|
||||
|
||||
for (let v = 0; v < that.tableData.length; v++) {
|
||||
that.departInfo.push(that.tableData[v].slice(0, 4))
|
||||
}
|
||||
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)
|
||||
that.floorNameQcData = qcData1
|
||||
|
||||
//去重
|
||||
// const qcData = new Set(newArr1)
|
||||
// that.departQcData = qcData
|
||||
|
||||
that.floorNameQcData.floorName = qcData1
|
||||
var floorname = []
|
||||
this.floorNameQcData.floorName.forEach(function (item1, index, set) {
|
||||
floorname.push(item1)
|
||||
})
|
||||
//拿到对应楼号对应部门
|
||||
// for (let j = 0; j < result.data.length; j++) {
|
||||
// if (that.floorNameQcData == result.data[j].floorName) {
|
||||
// console.log(8989898);
|
||||
// that.departInfo.push(result.data[j].depart)
|
||||
// //表格数据
|
||||
// // that.departInfo.push(result.data[j].depart)
|
||||
// }
|
||||
// }
|
||||
//去除部门数组中的空字符串
|
||||
// var newArr1 = that.departInfo.filter(i => i && i.trim())
|
||||
//去重
|
||||
// const qcData = new Set(newArr1)
|
||||
// that.departQcData = qcData
|
||||
// } 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 groupList = [];
|
||||
//楼号分类
|
||||
for (var j = 0; j < result.data.length; j++) {
|
||||
if (!groupList[result.data[j].floorName]) {
|
||||
var arr1 = [];
|
||||
arr1.push(result.data[j]);
|
||||
groupList[result.data[j].floorName] = arr1;
|
||||
} else {
|
||||
groupList[result.data[j].floorName].push(result.data[j])
|
||||
}
|
||||
}
|
||||
that.floorNameQcData.floorName.depart = groupList
|
||||
|
||||
|
||||
var arr = Object.entries(result.data(a))
|
||||
console.log("arr", arr)
|
||||
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
|
@ -591,9 +557,7 @@ console.log("val",val)
|
|||
.catch(error => {
|
||||
console.log(error)
|
||||
})
|
||||
// }else{
|
||||
|
||||
// }
|
||||
|
||||
} else if (val == "健康中心" || val == "老卫生所" || val == "龙吟广场" || val == "栖霞基地") {
|
||||
if (val == '健康中心') {
|
||||
that.floorInfo = "健康中心主楼"
|
||||
|
@ -602,7 +566,6 @@ console.log("val",val)
|
|||
}
|
||||
that.val = false
|
||||
console.log("val", val)
|
||||
|
||||
axios.get('/json/' + val + '.json')
|
||||
.then(result => {
|
||||
console.log('val', result.data)
|
||||
|
@ -616,9 +579,13 @@ console.log("val",val)
|
|||
//表格数据
|
||||
that.tableData.push(Object.values(result.data[j]))
|
||||
}
|
||||
|
||||
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
|
||||
|
||||
//去除部门数组中的空字符串
|
||||
|
@ -626,6 +593,7 @@ console.log("val",val)
|
|||
//去重
|
||||
const qcData = new Set(newArr)
|
||||
that.departQcData = qcData
|
||||
console.log(that.departQcData);
|
||||
// that.departInfo = result.data[8]
|
||||
|
||||
// }
|
||||
|
@ -644,75 +612,79 @@ console.log("val",val)
|
|||
this.loading = false;
|
||||
}, 500);
|
||||
},
|
||||
showChild(item, index) {
|
||||
console.log(item);
|
||||
showChild(item) {
|
||||
this.isShow = !this.isShow
|
||||
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);
|
||||
}
|
||||
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 listdepart = []
|
||||
// 通过点击获取对应的部门
|
||||
if (item != null) {
|
||||
for (let i = 0; i < this.floorNameQcData.floorName.depart[item].length; i++) {
|
||||
listdepart.push(this.floorNameQcData.floorName.depart[item][i].depart)
|
||||
}
|
||||
//去除部门数组中的空字符串
|
||||
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) {
|
||||
console.log(item);
|
||||
this.componentKey1++
|
||||
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++) {
|
||||
this.tableData = this.config5.data[i]
|
||||
if (item == this.tableData[0]) {
|
||||
this.tableData1.push(this.tableData)
|
||||
}
|
||||
}
|
||||
}
|
||||
this.config6.data = []
|
||||
this.config6.data = this.tableData1
|
||||
console.log(this.config6.data);
|
||||
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>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@import "~@/common/var.scss";
|
||||
@import "~@/assets/scss/index.scss";
|
||||
|
||||
|
|
Loading…
Reference in New Issue