Commit b2e77304 by 王志慧

ui修改

1 parent 55fa3af9
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
</p> </p>
<p> <p>
<span>证件号码:</span> <span>证件号码:</span>
<span class="ellipsis-1">341189199508293021</span> <span class="ellipsis-1">{{leftPanelInfo.idCard}}</span>
</p> </p>
<p> <p>
<span>性别:</span> <span>性别:</span>
......
...@@ -27,11 +27,11 @@ ...@@ -27,11 +27,11 @@
</div> </div>
</el-form> </el-form>
<div class="label-wrap"> <div class="label-wrap">
<div :class="{ 'fixed-box': true, is_fixed: isFixed, is_pb: isDom, is_auto: !isFixed }" id="boxFixed"> <div :class="{ 'fixed-box': true, is_fixed: isFixed, is_pb: isDom }" id="boxFixed">
<template v-if="this.selectedArray.length > 0"> <template v-if="this.selectedArray.length > 0">
<div class="select-label-wrap font-14 flex-start" id="tagBox"> <div :class="['select-label-wrap', 'font-14', 'flex-start', !isFixed ? 'is_auto' : '']" id="tagBox">
<div class="select-label color-3">已选标签:</div> <div class="select-label color-3">已选标签:</div>
<div class="flex"> <div class="flex" id="selectTagBox">
<div class="selects" v-for="(selectTag, index) in selectedArray" :key="index" @click="labelFilter(selectTag)"> <div class="selects" v-for="(selectTag, index) in selectedArray" :key="index" @click="labelFilter(selectTag)">
<template v-if="selectTag.groupName.length + selectTag.combination.length <= 20"> <template v-if="selectTag.groupName.length + selectTag.combination.length <= 20">
<div class="label-group-name color-3 hand"> <div class="label-group-name color-3 hand">
...@@ -91,8 +91,9 @@ ...@@ -91,8 +91,9 @@
</div> </div>
</div> </div>
</div> </div>
<div v-show="isFixed" style="width: 100%" id="placeholder"></div>
<div class="pageContent"> <div class="pageContent">
<GLTable @setTableFinishFun="setTableFinishFun" v-if="isReload" ref="crowdManage" :hasNum="false" :tableTotal="tableTotal" :tableData="tableData" :searchForm="searchForm" :pageConf="pageConf" :noDataImg="url" @refreshTable="refreshTable" :tableParams="tableParams" :headerStyle="{ height: '54px', background: '#F4F6FC', color: '#333333', fontSize: '14px' }"> <GLTable ref="crowdManage" :hasNum="false" :tableTotal="tableTotal" :tableData="tableData" :searchForm="searchForm" :pageConf="pageConf" :noDataImg="url" @refreshTable="refreshTable" :tableParams="tableParams" :headerStyle="{ height: '54px', background: '#F4F6FC', color: '#333333', fontSize: '14px' }">
<span slot="labelUnitList" slot-scope="scope"> <span slot="labelUnitList" slot-scope="scope">
<div class="allTagsWrap flex"> <div class="allTagsWrap flex">
<template v-for="(item, index) in scope.scope.labelUnitList"> <template v-for="(item, index) in scope.scope.labelUnitList">
...@@ -174,6 +175,7 @@ export default { ...@@ -174,6 +175,7 @@ export default {
offsetTop: 0, offsetTop: 0,
expande: false, expande: false,
isClick: false, isClick: false,
addClick:false,
isDom: false, isDom: false,
isShowCloseBtn: true, isShowCloseBtn: true,
tableData: [], tableData: [],
...@@ -243,17 +245,22 @@ export default { ...@@ -243,17 +245,22 @@ export default {
if (this.selectedArray.length > 0) { if (this.selectedArray.length > 0) {
this.$nextTick(() => { this.$nextTick(() => {
//条件重置 //条件重置
document.getElementById('placeholder').style.height = document.getElementById('boxFixed').offsetHeight + 'px'
document.getElementById('tagBox').style.height = 'auto' document.getElementById('tagBox').style.height = 'auto'
if (!this.isFixed) { let height = document.getElementById('selectTagBox').offsetHeight
console.log(height, '数据监听')
if (!this.isFixed||this.addClick) {
//判断是否可以触发 //判断是否可以触发
this.isClick = false this.isClick = false
this.expande = false this.expande = false
} }
if (!this.isClick || !this.isFixed) { console.log(this.isClick)
if (!this.isClick ||this.addClick|| !this.isFixed) {
//获取当前元素的高 //获取当前元素的高
let height = document.getElementById('tagBox').offsetHeight
if (height > 127) { if (height > 96) {
document.getElementById('tagBox').style.height = 128 + 'px' document.getElementById('tagBox').style.height = 96 + 'px'
this.isDom = true this.isDom = true
} else { } else {
document.getElementById('tagBox').style.height = 'auto' document.getElementById('tagBox').style.height = 'auto'
...@@ -265,10 +272,6 @@ export default { ...@@ -265,10 +272,6 @@ export default {
} }
}, },
mounted() { mounted() {
let clientHeight = document.documentElement.clientHeight
this.footerLeft = document.querySelector('.base-container-right').offsetLeft
this.footerWidth = document.documentElement.clientWidth - this.footerLeft
this.boxHeight = clientHeight - 200
window.addEventListener('scroll', this.initHeight, true) window.addEventListener('scroll', this.initHeight, true)
this.$nextTick(() => { this.$nextTick(() => {
this.offsetTop = document.querySelector('#boxFixed').offsetTop this.offsetTop = document.querySelector('#boxFixed').offsetTop
...@@ -413,11 +416,13 @@ export default { ...@@ -413,11 +416,13 @@ export default {
expandeClick() { expandeClick() {
this.expande = !this.expande this.expande = !this.expande
this.isClick = this.expande this.isClick = this.expande
this.addClick = false
if (this.expande) { if (this.expande) {
document.getElementById('tagBox').style.height = 'auto' document.getElementById('tagBox').style.height = 'auto'
} else { } else {
document.getElementById('tagBox').style.height = 128 + 'px' document.getElementById('tagBox').style.height = 96 + 'px'
} }
document.getElementById('placeholder').style.height = document.getElementById('boxFixed').offsetHeight + 'px'
}, },
initHeight() { initHeight() {
var timeOut = null var timeOut = null
...@@ -427,7 +432,9 @@ export default { ...@@ -427,7 +432,9 @@ export default {
timeOut = setTimeout(() => { timeOut = setTimeout(() => {
var scrollTop = document.querySelector('#container').scrollTop var scrollTop = document.querySelector('#container').scrollTop
this.isFixed = scrollTop > this.offsetTop ? true : false this.isFixed = scrollTop > this.offsetTop ? true : false
console.log(this.isFixed) if (!this.isFixed) {
document.getElementById('placeholder').style.height = document.getElementById('boxFixed').offsetHeight + 'px'
}
}, 200) }, 200)
}, },
//获取标签数据 //获取标签数据
...@@ -482,6 +489,7 @@ export default { ...@@ -482,6 +489,7 @@ export default {
}, },
// 添加已选标签 // 添加已选标签
selectedLabelFn(groupData, data) { selectedLabelFn(groupData, data) {
this.addClick = true
if (this.selectedArray.length > 0) { if (this.selectedArray.length > 0) {
for (let i = 0; i < this.selectedArray.length; i++) { for (let i = 0; i < this.selectedArray.length; i++) {
if (this.selectedArray[i].groupId == groupData.groupId) { if (this.selectedArray[i].groupId == groupData.groupId) {
...@@ -520,6 +528,7 @@ export default { ...@@ -520,6 +528,7 @@ export default {
let idArray = [] let idArray = []
if (this.selectedArray[i].labelUnitList.length == 0) { if (this.selectedArray[i].labelUnitList.length == 0) {
this.selectedArray.splice(i--, 1) this.selectedArray.splice(i--, 1)
return
} }
for (let j = 0; j < this.selectedArray[i].labelUnitList.length; j++) { for (let j = 0; j < this.selectedArray[i].labelUnitList.length; j++) {
array.push(this.selectedArray[i].labelUnitList[j].labelName) array.push(this.selectedArray[i].labelUnitList[j].labelName)
...@@ -527,16 +536,14 @@ export default { ...@@ -527,16 +536,14 @@ export default {
} }
this.selectedArray[i].labelIdList = idArray this.selectedArray[i].labelIdList = idArray
this.selectedArray[i].combination = array.join('、') this.selectedArray[i].combination = array.join('、')
console.log(this.checkName(this.selectedArray[i].groupName))
let length = 40 - this.checkName(this.selectedArray[i].groupName) let length = 40 - this.checkName(this.selectedArray[i].groupName)
console.log(length)
this.selectedArray[i].combinationtext = this.cutMaxCharStr(this.selectedArray[i].combination, length) this.selectedArray[i].combinationtext = this.cutMaxCharStr(this.selectedArray[i].combination, length)
console.log(this.selectedArray[i].combinationtext)
this.$set(this.selectedArray, i, this.selectedArray[i]) this.$set(this.selectedArray, i, this.selectedArray[i])
} }
}, },
//删除选中标签 //删除选中标签
closeTag(data, index) { closeTag(data, index) {
this.addClick = true
this.selectedArray.splice(index, 1) this.selectedArray.splice(index, 1)
this.tableData.forEach(t => { this.tableData.forEach(t => {
if (t.groupId == data.groupId) { if (t.groupId == data.groupId) {
...@@ -546,15 +553,18 @@ export default { ...@@ -546,15 +553,18 @@ export default {
} }
}) })
//条件重置 //条件重置
this.$nextTick(() => {
document.getElementById('tagBox').style.height = 'auto' document.getElementById('tagBox').style.height = 'auto'
let height = document.getElementById('tagBox').offsetHeight let height = document.getElementById('selectTagBox').offsetHeight
if (height > 127) { console.log(height, '删除')
document.getElementById('tagBox').style.height = 128 + 'px' if (height > 96) {
document.getElementById('tagBox').style.height = 96 + 'px'
this.isDom = true this.isDom = true
} else { } else {
document.getElementById('tagBox').style.height = 'auto' document.getElementById('tagBox').style.height = 'auto'
this.isDom = false this.isDom = false
} }
})
}, },
//点击标签组搜索 //点击标签组搜索
labelFilter(data) { labelFilter(data) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!