详情页修改

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>
</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>

View File

@ -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
}
},

View File

@ -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";