|
@@ -8,7 +8,7 @@
|
|
|
>
|
|
|
<a-form :form="form" :label-col="{ span: 5 }" :wrapper-col="{ span: 17 }">
|
|
|
<a-form-item v-show="false" >
|
|
|
- <a-input v-decorator="['id']" type="hidden"/>
|
|
|
+ <a-input v-decorator="['sbId']" type="hidden"/>
|
|
|
</a-form-item>
|
|
|
<a-form-item label="更改内容">
|
|
|
<a-textarea
|
|
@@ -20,7 +20,6 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import pick from 'lodash.pick'
|
|
|
import { updateLogBySbId } from '@/api/sb/info'
|
|
|
|
|
|
export default {
|
|
@@ -35,8 +34,13 @@ export default {
|
|
|
base (record) {
|
|
|
this.visible = true
|
|
|
const { form: { setFieldsValue } } = this
|
|
|
- setFieldsValue(Object.assign(pick(record, ['id'])))
|
|
|
- console.log(record)
|
|
|
+ this.$nextTick(() => {
|
|
|
+ setFieldsValue(Object.assign({
|
|
|
+ 'sbId': record.id
|
|
|
+ }))
|
|
|
+ })
|
|
|
+
|
|
|
+ console.log(record.id)
|
|
|
},
|
|
|
handleOk (e) {
|
|
|
const { form: { validateFieldsAndScroll } } = this
|
|
@@ -47,6 +51,7 @@ export default {
|
|
|
this.confirmLoading = false
|
|
|
this.$message.error(errors)
|
|
|
}
|
|
|
+ console.log(values)
|
|
|
updateLogBySbId(values).then(res => {
|
|
|
this.visible = false
|
|
|
this.$message.success('操作成功')
|
|
@@ -57,6 +62,7 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
handleCancel (e) {
|
|
|
+ this.confirmLoading = false
|
|
|
this.visible = false
|
|
|
}
|
|
|
}
|