|
@@ -252,24 +252,6 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
show(row) {
|
|
|
- if (row) {
|
|
|
- const activitiesAddress = row.activitiesAddress !== DEFAULT_ACTIVITY_ADDRESS ? row.activitiesAddress : ''
|
|
|
- let activitiesAddressTemp = ''
|
|
|
- let activitiesDetailAddressTemp = ''
|
|
|
- if (activitiesAddress) {
|
|
|
- activitiesAddressTemp = (activitiesAddress.split(' ')[0] || '').replace('undefined', '')
|
|
|
- activitiesDetailAddressTemp = (activitiesAddress.split(' ')[1] || '').replace('undefined', '')
|
|
|
- this.selectAddressLabel = (activitiesAddress.split(' ')[0] || '').replace('undefined', '')
|
|
|
- }
|
|
|
- Object.assign(this.activityForm.activities, row, {
|
|
|
- activitiesAddress: activitiesAddressTemp,
|
|
|
- activitiesDetailAddress: activitiesDetailAddressTemp,
|
|
|
- id: row.id,
|
|
|
- typeEnum: getTypeEnumByValue(Number(row.type)),
|
|
|
- stateEnum: getStateEnumByValue(Number(row.state))
|
|
|
- })
|
|
|
- this.handleChangeTypeState()
|
|
|
- }
|
|
|
this.activityVisible = true
|
|
|
setTimeout(this.calcSwiperHeight)
|
|
|
// 拦截editor的图片上传 转码 -> 服务器上传
|
|
@@ -277,6 +259,25 @@ export default {
|
|
|
this.$nextTick(() => {
|
|
|
interceptQuillImageUpload(this, this.editorCustomOptions)
|
|
|
this.stopObserver = listenEditorContentHeightChange(this, this.calcSwiperHeight)
|
|
|
+ this.resetDialog()
|
|
|
+ if (row) {
|
|
|
+ const activitiesAddress = row.activitiesAddress !== DEFAULT_ACTIVITY_ADDRESS ? row.activitiesAddress : ''
|
|
|
+ let activitiesAddressTemp = ''
|
|
|
+ let activitiesDetailAddressTemp = ''
|
|
|
+ if (activitiesAddress) {
|
|
|
+ activitiesAddressTemp = (activitiesAddress.split(' ')[0] || '').replace('undefined', '')
|
|
|
+ activitiesDetailAddressTemp = (activitiesAddress.split(' ')[1] || '').replace('undefined', '')
|
|
|
+ this.selectAddressLabel = (activitiesAddress.split(' ')[0] || '').replace('undefined', '')
|
|
|
+ }
|
|
|
+ Object.assign(this.activityForm.activities, row, {
|
|
|
+ activitiesAddress: activitiesAddressTemp,
|
|
|
+ activitiesDetailAddress: activitiesDetailAddressTemp,
|
|
|
+ id: row.id,
|
|
|
+ typeEnum: getTypeEnumByValue(Number(row.type)),
|
|
|
+ stateEnum: getStateEnumByValue(Number(row.state))
|
|
|
+ })
|
|
|
+ this.handleChangeTypeState()
|
|
|
+ }
|
|
|
})
|
|
|
},
|
|
|
|
|
@@ -320,18 +321,22 @@ export default {
|
|
|
},
|
|
|
|
|
|
close() {
|
|
|
+ this.resetDialog()
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.activityVisible = false
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
+ resetDialog() {
|
|
|
this.activityForm = getDefaultActivityForm()
|
|
|
this.currentStep = 0
|
|
|
- this.$refs.elCarouselRef.setActiveItem('step-one')
|
|
|
+ this.$refs.elCarouselRef && this.$refs.elCarouselRef.setActiveItem('step-one')
|
|
|
this.$refs.activityModalFormRef.clearValidate()
|
|
|
this.$refs.activityNextModalFormRef.clearValidate()
|
|
|
this.$refs.activityModalFormRef.resetFields()
|
|
|
this.$refs.activityNextModalFormRef.resetFields()
|
|
|
this.selectAddressLabel = ''
|
|
|
typeof this.stopObserver === 'function' && this.stopObserver()
|
|
|
- this.$nextTick(() => {
|
|
|
- this.activityVisible = false
|
|
|
- })
|
|
|
},
|
|
|
|
|
|
// 计算swiper的高度
|