Commit b0480a3e authored by shangtx's avatar shangtx

feat: 服务详情图片

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