Commit 4ad51720 authored by huai.li's avatar huai.li

修复编辑问题

parent 9e76b2de
export default { export default {
data () { data () {
return { return {
item: '',
timeItem: '', timeItem: '',
inputSelectItem: 'rmb' inputSelectItem: 'rmb'
} }
}, },
computed: {
item: {
get () {
return this.formItem
},
set (val) {
this.$emit('update:item', val)
}
}
},
props: { props: {
formItem: { formItem: {
type: String type: Number
}, },
formTimeItem: { formTimeItem: {
type: String type: String
...@@ -51,19 +63,12 @@ export default { ...@@ -51,19 +63,12 @@ export default {
} }
}, },
watch: { watch: {
'formItem' (val) {
console.log(val)
this.item = val
},
'formTimeItem' (val) { 'formTimeItem' (val) {
this.timeItem = val this.timeItem = val
}, },
'formInputSelect' (val) { 'formInputSelect' (val) {
this.inputSelectItem = val this.inputSelectItem = val
}, },
'item' (val) {
this.$emit('update:item', val)
},
'timeItem' (val) { 'timeItem' (val) {
this.$emit('update:item', val) this.$emit('update:item', val)
}, },
......
<template> <template>
<section> <section>
<el-radio-group size="small" v-model="item"> <el-radio-group size="small" v-model="item">
<el-radio-button v-for="(radio, key) in optionsList" :key="key" :label="radio.name" :value="radio.value"></el-radio-button> <el-radio-button v-for="(radio, key) in optionsList" :key="key" :label="radio.name" :value="radio.value">{{ radio.value }}</el-radio-button>
</el-radio-group> </el-radio-group>
</section> </section>
</template> </template>
<script> <script>
import itemMixin from './singleItemMixin' import singleItemMixin from './singleItemMixin'
export default { export default {
name: 'single-radio', name: 'single-radio',
mixins: [itemMixin] mixins: [singleItemMixin]
} }
</script> </script>
......
...@@ -122,12 +122,12 @@ export default { ...@@ -122,12 +122,12 @@ export default {
}, },
is_public_array: [ is_public_array: [
{ {
'name': '共享', 'name': 1,
'value': 1 'value': '共享'
}, },
{ {
'name': '私人', 'name': 0,
'value': 0 'value': '私人'
} }
], ],
rules: {}, rules: {},
......
...@@ -38,6 +38,7 @@ export default { ...@@ -38,6 +38,7 @@ export default {
description: '', description: '',
time_type: '', time_type: '',
repeat_type: '', repeat_type: '',
is_public: '',
created_by: '' // 负责人 created_by: '' // 负责人
} }
} }
...@@ -45,7 +46,9 @@ export default { ...@@ -45,7 +46,9 @@ export default {
methods: { methods: {
show (model) { show (model) {
console.log(model)
model && UTIL.flatten(this.model, model) model && UTIL.flatten(this.model, model)
this.model.client_name = model.client.name
this.diaVis = true this.diaVis = true
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment