diff --git a/src/assets/less/common.less b/src/assets/less/common.less index 6e18961b..be70f67c 100644 --- a/src/assets/less/common.less +++ b/src/assets/less/common.less @@ -169,61 +169,6 @@ } } -.item-model { - width: calc(100% - 130px); - display: inline-block; - margin-top: 2px; - height: 40px; - margin-bottom: 24px; - - /deep/ .ant-form-item-control-wrapper { - width: 100%; - } -} - -.item-model-textarea { - width: calc(100% - 130px); - display: inline-block; - margin-top: 2px; - - /deep/ .ant-form-item-control-wrapper { - width: 100% !important; - } -} - -.box-input { - /deep/ .ant-select-selection--single { - height: 38px; - } - - /deep/ .ant-select-selection--multiple { - height: 38px; - - .ant-select-selection__rendered > ul > li { - margin-top: 6px; - } - } - - /deep/ .ant-select-selection__rendered { - line-height: 38px; - height: 38px; - } - - /deep/ .ant-calendar-picker { - line-height: 38px; - height: 38px; - } - - /deep/ .ant-calendar-picker-input { - height: 38px; - } - - /deep/ .ant-input-number-input-wrap { - line-height: 38px; - height: 38px; - } -} - .box-title-text { line-height: 1.4; display: flex; @@ -252,7 +197,7 @@ width: calc(100% - 130px); display: inline-block; margin-top: 2px; - height: 100%; + height: 40px; margin-bottom: 24px; /deep/ .ant-form-item-control-wrapper { @@ -308,17 +253,6 @@ } } -.box-input { - display: inline-block; - height: 38px; - width: 100%; -} - -.required { - color: red; - margin-right: 4px; -} - .title-text-text { margin-top: 9px; } diff --git a/src/common/lang/zh-cn.js b/src/common/lang/zh-cn.js index 0c21a0a1..6abb6c41 100644 --- a/src/common/lang/zh-cn.js +++ b/src/common/lang/zh-cn.js @@ -7,7 +7,7 @@ module.exports = { pleaseSelect: '请选择', pleaseEnter: '请输入', query: '查询', - reset: '重置', + reset: '清空', putAway: '收起', open: '展开', edit: '编辑', diff --git a/src/components/JMultipleDatePicker.vue b/src/components/JMultipleDatePicker.vue index 40b07d6d..12c80916 100644 --- a/src/components/JMultipleDatePicker.vue +++ b/src/components/JMultipleDatePicker.vue @@ -1,8 +1,10 @@ - + + + @@ -24,13 +26,17 @@ export default { value: { type: String, default: '' + }, + fieldName: { + type: String, + default: '' } }, watch: { value (val) { if (!val) { this.checkedValue = [] - document.getElementsByClassName('ant-calendar-picker-input')[0].value = '' + document.getElementById(this.fieldName).children[0].children[0].value = '' this.$emit('change', '') } } @@ -47,12 +53,12 @@ export default { if (open) { this.open = open setTimeout(() => { - document.getElementsByClassName('ant-calendar-input')[0].value = this.checkedValue.join(',') + document.getElementsByClassName(this.fieldName + '-drop')[0].children[0].children[0].children[0].children[0].children[0].value = this.checkedValue.join(',') }, 100) } else { this.open = open this.$nextTick(() => { - document.getElementsByClassName('ant-calendar-picker-input')[0].value = this.checkedValue.join(',') + document.getElementById(this.fieldName).children[0].children[0].value = this.checkedValue.join(',') }) } }, @@ -62,30 +68,31 @@ export default { return true } }, + // 点击日期,加日期或者减日期 clickCalendarDate (current) { const currentStr = current.format('YYYY-MM-DD') if (!this.checkedValue.includes(currentStr)) { console.log('加日期') this.checkedValue.push(currentStr) - // event.target.className += ' blue' } else { console.log('减日期') this.checkedValue = this.checkedValue.filter(item => item !== currentStr) - // console.log(event.target.className) - // // 选中日期不存在该日期,该日期有blue类时删掉该类 - // if (event.target.className.split(' ').includes('blue')) { - // event.target.className = event.target.className.split(' ').filter(item => item !== 'blue').join(' ') - // } } - document.getElementsByClassName('ant-calendar-input')[0].value = this.checkedValue.join(',') - }, - handleOk () { - this.open = false this.$nextTick(() => { - document.getElementsByClassName('ant-calendar-picker-input')[0].value = this.checkedValue.join(',') + document.getElementsByClassName(this.fieldName + '-drop')[0].children[0].children[0].children[0].children[0].children[0].value = this.checkedValue.join(',') }) this.$emit('change', this.checkedValue.join(',')) } + // 点击日期弹出框中的确定按钮 + // handleOk () { + // this.open = false + // this.$nextTick(() => { + // // 改变外侧日期显示框的数据 + // document.getElementById(this.fieldName).children[0].children[0].value = this.checkedValue.join(',') + // // document.getElementsByClassName(this.fieldName)[0].children[0].children[0].value = this.checkedValue.join(',') + // }) + // this.$emit('change', this.checkedValue.join(',')) + // } }, model: { prop: 'value', diff --git a/src/components/customField/AddForm.vue b/src/components/customField/AddForm.vue index 712a12cd..b7cfd38e 100644 --- a/src/components/customField/AddForm.vue +++ b/src/components/customField/AddForm.vue @@ -63,7 +63,7 @@ {{item.dbFieldTxt}} - @@ -184,27 +184,27 @@ - - - - - - - - - - - - - - - - - - - - - + + +
+
+ * + {{item.dbFieldTxt}} +
+ + + +
+
diff --git a/src/components/customField/Search.vue b/src/components/customField/Search.vue index 5c5a33e1..bac36897 100644 --- a/src/components/customField/Search.vue +++ b/src/components/customField/Search.vue @@ -1,82 +1,91 @@