|
@@ -90,6 +90,18 @@
|
|
|
:min="1"
|
|
|
v-decorator="['sort', {initialValue:1,rules: [{required: true, message: '排序不能为空'}]}]" />
|
|
|
</a-form-item>
|
|
|
+ <row-item>
|
|
|
+ <a-form-item
|
|
|
+ label="图片"
|
|
|
+ :labelCol="BaseTool.Constant.labelCol"
|
|
|
+ :wrapperCol="BaseTool.Constant.wrapperCol"
|
|
|
+ >
|
|
|
+ <upload-spare-file
|
|
|
+ ref="imageUpload"
|
|
|
+ @catchImage="catchImage"
|
|
|
+ ></upload-spare-file>
|
|
|
+ </a-form-item>
|
|
|
+ </row-item>
|
|
|
<a-form-item
|
|
|
label="是否删除"
|
|
|
:labelCol="BaseTool.Constant.labelCol"
|
|
@@ -132,6 +144,7 @@ export default {
|
|
|
modalTitle: null,
|
|
|
form: this.$form.createForm(this),
|
|
|
visible: false,
|
|
|
+ img: '',
|
|
|
positionTypeMap: {},
|
|
|
delFlagMap: {},
|
|
|
userList: {},
|
|
@@ -176,6 +189,23 @@ export default {
|
|
|
'remark'
|
|
|
])))
|
|
|
})
|
|
|
+ this.img = record.img
|
|
|
+ const fileList = []
|
|
|
+ if (record.img) {
|
|
|
+ fileList.push({
|
|
|
+ uid: '-1',
|
|
|
+ name: record.name,
|
|
|
+ status: 'done',
|
|
|
+ url: this.BaseTool.Constant.FILE_URL + record.img,
|
|
|
+ originUrl: record.img
|
|
|
+ })
|
|
|
+ }
|
|
|
+ this.$refs.imageUpload.base(1, fileList)
|
|
|
+ },
|
|
|
+ catchImage (fileList) {
|
|
|
+ if (fileList.length !== 0) {
|
|
|
+ this.img = fileList[0].url
|
|
|
+ }
|
|
|
},
|
|
|
save () {
|
|
|
const { form: { validateFieldsAndScroll } } = this
|
|
@@ -185,6 +215,7 @@ export default {
|
|
|
this.confirmLoading = false
|
|
|
return
|
|
|
}
|
|
|
+ values.img = this.img
|
|
|
if (this.BaseTool.String.isBlank(values.id)) {
|
|
|
addSbPosition(values)
|
|
|
.then(() => {
|