28150
This commit is contained in:
@@ -154,6 +154,7 @@
|
||||
|
||||
<div class="form-item__wrapper">
|
||||
<input placeholder="请选择" disabled :value="field.fieldDictName || ''" />
|
||||
|
||||
<picker range-key="dictName" :range="$dict.getDict(field.dictionaryCode)" :data-index="index" :data-i="i" :data-dict="field.dictionaryCode" @change="onPickerChange">
|
||||
<div class="form-item__choose" hover-class="text-hover">选择</div>
|
||||
</picker>
|
||||
@@ -237,6 +238,20 @@ export default {
|
||||
this.$set(this.tableForm[this.index][this.i], 'fieldValue', value)
|
||||
},
|
||||
|
||||
onPickerChange(e) {
|
||||
console.log(e)
|
||||
const index = e.target.dataset.index
|
||||
const i = e.target.dataset.i
|
||||
const dict = e.target.dataset.dict
|
||||
const values = e.detail.value
|
||||
// const key = this.$dict.getLabel(dict, value)
|
||||
const value = this.$dict.getDict(dict)[values].dictValue
|
||||
const key = this.$dict.getDict(dict)[values].dictName
|
||||
|
||||
this.$set(this.tableForm[index][i], 'fieldValue', value)
|
||||
this.$set(this.tableForm[index][i], 'fieldDictName', key)
|
||||
},
|
||||
|
||||
// clear() {
|
||||
// this.isTouch = false
|
||||
// this.handwriting.retDraw()
|
||||
@@ -402,20 +417,6 @@ export default {
|
||||
this.$set(this.tableForm[index][i], 'fieldValue', `${value[0]}年${value[1]}月${value[2]}日`)
|
||||
},
|
||||
|
||||
onPickerChange(e) {
|
||||
console.log(e)
|
||||
const index = e.target.dataset.index
|
||||
const i = e.target.dataset.i
|
||||
const dict = e.target.dataset.dict
|
||||
// const value = e.detail.value
|
||||
// const key = this.$dict.getLabel(dict, value)
|
||||
const value = this.$dict.getDict(dict)[0].dictValue
|
||||
const key = this.$dict.getDict(dict)[0].dictName
|
||||
|
||||
this.$set(this.tableForm[index][i], 'fieldValue', value)
|
||||
this.$set(this.tableForm[index][i], 'fieldDictName', key)
|
||||
},
|
||||
|
||||
bindTimeChange(e) {
|
||||
const index = e.target.dataset.index
|
||||
const i = e.target.dataset.i
|
||||
|
||||
Reference in New Issue
Block a user