Browse Source

dd

shibei_master
13176889840 3 years ago
parent
commit
8de16eb6c1
  1. 11
      src/views/components/resiForm.vue
  2. 14
      src/views/modules/base/resi.vue

11
src/views/components/resiForm.vue

@ -205,14 +205,18 @@
</el-cascader>
<template v-else-if="n.itemType === 'radio'">
<el-radio v-for="ns in n.options" :key="ns.value" v-model.trim="form[n.columnName]"
:label="ns.value">
:label="ns.value" @change="hanldeChangeRadio(n)">
{{ ns.label }}
</el-radio>
<!-- <el-radio v-model.trim="form[n.columnName]" label="1">备选项</el-radio> -->
</template>
<template v-else-if="n.itemType === 'checkbox'">
<el-checkbox-group v-model.trim="form[n.columnName]">
<el-checkbox v-for="ns in n.options" :key="ns.value" :label="ns.value">{{ns.label}}</el-checkbox>
<template v-for="ns in n.options">
<el-checkbox v-if="ns.value != 'dangyuanzhongxinhu'" :key="ns.value" :label="ns.value">
{{ns.label}}
</el-checkbox>
</template>
<!-- <el-checkbox label="n.la"></el-checkbox> -->
</el-checkbox-group>
</template>
@ -487,6 +491,9 @@ export default {
// }
})
},
hanldeChangeRadio(n) {
this.$emit('changeradio', n)
},
handleValidBlur(n) {
console.log('n---', n)
if (n.columnName !== 'ID_CARD') return

14
src/views/modules/base/resi.vue

@ -197,7 +197,7 @@
<el-tabs v-model="activeName"
@tab-click="handleClick">
<el-tab-pane v-for="item in tabsList"
:key="item.columnName"
:key="item.groupId"
:label="item.label"
:name="'group' + item.groupId">
<resi-form :ref="'group' + item.groupId"
@ -245,7 +245,7 @@
<el-tabs v-model="activeName"
@tab-click="handleClick">
<el-tab-pane v-for="item in tabsList"
:key="item.columnName"
:key="item.groupId"
:label="item.label"
:name="'group' + item.groupId">
<edit-resi :ref="'group' + item.groupId"
@ -833,10 +833,11 @@ export default {
async handleChangeGroup (val) {
console.log('changeguoprrrrr----', val)
let { childGroup, value } = val
let hasT = false
let i = 0
// const list = { ...this.tabsList }
this.tabsList.forEach((item, index) => {
let list = [...this.tabsList]
list.forEach((item, index) => {
if (item.tableName === childGroup.tableName) {
hasT = true
i = index
@ -853,12 +854,13 @@ export default {
// console.log('')
}
})
this.tabsList.push(childGroup)
list.push(childGroup)
}
} else {
// console.log('changegroup----000', value)
if (hasT) this.tabsList.splice(i, 1)
if (hasT) list.splice(i, 1)
}
this.tabsList = [...list]
},
formetForm () {
const _baseForm = this.$refs.baseForm.handleForm()

Loading…
Cancel
Save