Commit b0480a3e authored by shangtx's avatar shangtx

feat: 服务详情图片

parent 76761cdb
......@@ -18,7 +18,7 @@
<a-input v-decorator="['description']" />
</a-form-item>
</a-col>
<a-col :span="11">
<a-col :span="5">
<ImageUpload
label="图片"
decoration="img"
......@@ -28,6 +28,16 @@
:form="form"
/>
</a-col>
<a-col :span="5" :offset="1">
<ImageUpload
label="详情图片"
decoration="detailImg"
:formItemLayout="null"
:required="true"
ref="detailImg"
:form="form"
/>
</a-col>
<a-col :span="11" :offset="1">
<a-form-item label="排序">
<a-input-number v-decorator="['sequence']" />
......@@ -35,7 +45,7 @@
</a-col>
<a-col :span="23">
<a-form-item label="服务详情">
<RichText ref="RichText" />
<RichText ref="RichText" :height="700" />
</a-form-item>
</a-col>
</a-row>
......@@ -74,6 +84,7 @@ export default {
getSubDetails(this.id).then(({ data }) => {
this.form.setFieldsValue(data)
this.$refs.image.setValue([data.img])
this.$refs.detailImg.setValue([data.detailImg])
this.$refs.RichText.setContent(data.textDescription)
})
}
......@@ -83,6 +94,7 @@ export default {
this.categoryId = null
this.categoryName = ''
this.$refs.image.reset()
this.$refs.detailImg.reset()
this.form.resetFields()
this.$refs.RichText.clear()
this.visible = false
......@@ -95,6 +107,7 @@ export default {
const reqData = {
...values,
img: this.$refs.image.getValue()[0],
detailImg: this.$refs.detailImg.getValue()[0],
id: this.id,
categoryId: this.categoryId,
textDescription: this.$refs.RichText.getContent()
......
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