NEZ-925 fix: 提交修复内容
This commit is contained in:
@@ -196,7 +196,7 @@ export default {
|
|||||||
if (item.inputWidth !== oldInputWidth) {
|
if (item.inputWidth !== oldInputWidth) {
|
||||||
this.$refs[`${type}_${item.id}_cascader`][0].$el.querySelector('.el-input__inner').style.width = `${item.inputWidth}px`
|
this.$refs[`${type}_${item.id}_cascader`][0].$el.querySelector('.el-input__inner').style.width = `${item.inputWidth}px`
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.needMore(type, item)
|
this.needMore(type, item, true)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -268,7 +268,7 @@ export default {
|
|||||||
casFocus (item, isFocus, e) {
|
casFocus (item, isFocus, e) {
|
||||||
this.$set(item, 'isFocus', isFocus)
|
this.$set(item, 'isFocus', isFocus)
|
||||||
},
|
},
|
||||||
needMore (type, item) {
|
needMore (type, item, expand) {
|
||||||
const contentWidth = this.$refs.searchContentBox[0].offsetWidth - 210
|
const contentWidth = this.$refs.searchContentBox[0].offsetWidth - 210
|
||||||
// 窗口尺寸没改变,则只重排当前type
|
// 窗口尺寸没改变,则只重排当前type
|
||||||
if (type && contentWidth === this.contentWidth) {
|
if (type && contentWidth === this.contentWidth) {
|
||||||
@@ -280,11 +280,12 @@ export default {
|
|||||||
if (this.titleSearchListCopy[type].width > this.contentWidth) {
|
if (this.titleSearchListCopy[type].width > this.contentWidth) {
|
||||||
showMore = true
|
showMore = true
|
||||||
this.titleSearchListCopy[type].index = i
|
this.titleSearchListCopy[type].index = i
|
||||||
|
expand && (this.titleSearchListCopy[type].showMore = true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
if (!showMore) {
|
if (!showMore) {
|
||||||
this.titleSearchListCopy[type].index = this.titleSearchListCopy[type].children.length - 1
|
this.titleSearchListCopy[type].index = this.titleSearchListCopy[type].children.length
|
||||||
}
|
}
|
||||||
} else { // 全体重排
|
} else { // 全体重排
|
||||||
this.contentWidth = contentWidth
|
this.contentWidth = contentWidth
|
||||||
@@ -315,9 +316,10 @@ export default {
|
|||||||
width = html.offsetWidth
|
width = html.offsetWidth
|
||||||
return width
|
return width
|
||||||
},
|
},
|
||||||
changShowMore (key) {
|
changShowMore (type) {
|
||||||
this.titleSearchListCopy[key].showMore = !this.titleSearchListCopy[key].showMore
|
this.titleSearchListCopy[type].showMore = !this.titleSearchListCopy[type].showMore
|
||||||
}
|
},
|
||||||
|
|
||||||
},
|
},
|
||||||
destroyed () {
|
destroyed () {
|
||||||
window.removeEventListener('resize', this.needMore)
|
window.removeEventListener('resize', this.needMore)
|
||||||
|
|||||||
@@ -84,10 +84,10 @@ export default {
|
|||||||
rules: {
|
rules: {
|
||||||
name: [
|
name: [
|
||||||
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
|
||||||
],
|
|
||||||
state: [
|
|
||||||
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
|
|
||||||
]
|
]
|
||||||
|
// state: [
|
||||||
|
// { required: true, message: this.$t('validate.required'), trigger: 'blur' }
|
||||||
|
// ]
|
||||||
},
|
},
|
||||||
areaData: [],
|
areaData: [],
|
||||||
coordinateFlag: false
|
coordinateFlag: false
|
||||||
@@ -118,6 +118,7 @@ export default {
|
|||||||
if (this.editDc.id) {
|
if (this.editDc.id) {
|
||||||
const param = { ...this.editDc }
|
const param = { ...this.editDc }
|
||||||
const attr = this.$refs.latlngPicker.getAttribute()
|
const attr = this.$refs.latlngPicker.getAttribute()
|
||||||
|
console.log(attr)
|
||||||
param.latitude = attr.latitude
|
param.latitude = attr.latitude
|
||||||
param.longitude = attr.longitude
|
param.longitude = attr.longitude
|
||||||
this.$put('/dc', param).then(response => {
|
this.$put('/dc', param).then(response => {
|
||||||
@@ -134,6 +135,9 @@ export default {
|
|||||||
if (param.area) {
|
if (param.area) {
|
||||||
param.areaId = param.area.id
|
param.areaId = param.area.id
|
||||||
}
|
}
|
||||||
|
const attr = this.$refs.latlngPicker.getAttribute()
|
||||||
|
param.latitude = attr.latitude
|
||||||
|
param.longitude = attr.longitude
|
||||||
if (!regNum.test(param.longitude)) {
|
if (!regNum.test(param.longitude)) {
|
||||||
param.longitude = null
|
param.longitude = null
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user