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

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

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

Loading…
Cancel
Save