Commit 1a012274 by liimin

修改接口路径

2 parents 7b749ade 2192eff6
...@@ -12,7 +12,7 @@ const __mergeBg = `${path}/background/merge` ...@@ -12,7 +12,7 @@ const __mergeBg = `${path}/background/merge`
const getExpList = { const getExpList = {
p: [__expressionList], p: [__expressionList],
req: params => GlAxios.post(__expressionList, params) req: params => GlAxios.post(__expressionList, params, { headers: { 'Content-Type': 'application/json; charset=utf-8' }, requestType: 'jsonString' })
} }
const grayscaleuser = { const grayscaleuser = {
......
import { import {
GlAxios GlAxios
} from 'glsx-vue-common' } from 'glsx-vue-common'
const path = '/admin-ddh-aimanager' const path = 'admin-ddh-aimanager'
const __sVoiceList = `${path}/voice/activity/search` const __sVoiceList = `${path}/voice/activity/search`
const __sGetManufacturer = `${path}/manufacturer/search` const __sGetManufacturer = `${path}/manufacturer/search`
const __sGetMerchant = `${path}/merchant/search` const __sGetMerchant = `${path}/merchant/search`
......
...@@ -13,12 +13,14 @@ ...@@ -13,12 +13,14 @@
clearable clearable
/> />
</gl-form-item> </gl-form-item>
<Manufacturers <gl-form-item>
width="200px" <Manufacturers
:eventBus="idPassvalue" width="200px"
:value.sync="manufacturer" :eventBus="idPassvalue"
:manufactureOnly="true" :value.sync="manufacturer"
:manufactureOnly="true"
/> />
</gl-form-item>
<gl-form-item> <gl-form-item>
<gl-button <gl-button
type="primary" type="primary"
...@@ -44,16 +46,16 @@ ...@@ -44,16 +46,16 @@
:table="tableData" :table="tableData"
v-loading="tableLoading" v-loading="tableLoading"
> >
<gl-table-column align="center" v-for="(i, index) in tableData.column" :key="index" :label='i.label' :prop='i.prop' :width='i.width' > <!-- <gl-table-column align="center" v-for="(i, index) in tableData.column" :key="index" :label='i.label' :prop='i.prop' :width='i.width' >
<template slot-scope="scope"> <template slot-scope="scope">
<template v-if='i.prop === "ipBackgroundList"'> <template v-if='i.prop === "ipBackgroundList"'>
<img class="tableImg" :src="tableData.data[scope.scope.$index][i.prop]"> <img class="tableImg" :src="tableData.data[scope.scope.$index][i.prop]">
</template> </template>
<template v-else> <template v-else>
{{tableData.data[scope.scope.$index][i.prop]}} {{tableData.data[scope.scope.$index][i.prop]}}
</template> </template>
</template> </template>
</gl-table-column> </gl-table-column> -->
</gl-table> </gl-table>
<gl-pagination <gl-pagination
background background
...@@ -101,6 +103,7 @@ export default { ...@@ -101,6 +103,7 @@ export default {
tableData: { tableData: {
border: true, border: true,
align: 'center', align: 'center',
height: 400,
// height: parseInt(this.$client_height() - 140), // height: parseInt(this.$client_height() - 140),
data: [], data: [],
column: [ column: [
...@@ -116,22 +119,22 @@ export default { ...@@ -116,22 +119,22 @@ export default {
label: '默认IP表情', label: '默认IP表情',
prop: 'packagePath' prop: 'packagePath'
}, },
{ // {
label: '默认IP背景', // label: '默认IP背景',
prop: 'ipBackgroundList', // prop: 'ipBackgroundList',
formatter: (cellValue) => { // formatter: (cellValue) => {
if (cellValue.ipBackgroundList) { // if (cellValue.ipBackgroundList) {
var imgUrl = '' // var imgUrl = ''
cellValue.ipBackgroundList.forEach((item, index) => { // cellValue.ipBackgroundList.forEach((item, index) => {
if (item.backgroundType === 'DEFAULT') { // if (item.backgroundType === 'DEFAULT') {
imgUrl = item.backgroundPath // imgUrl = item.backgroundPath
return false // return false
} // }
}) // })
return imgUrl // return imgUrl
} // }
} // }
}, // },
{ {
label: '变更时间', label: '变更时间',
prop: 'updatedDate', prop: 'updatedDate',
...@@ -162,7 +165,7 @@ export default { ...@@ -162,7 +165,7 @@ export default {
{ {
type: 'primary', type: 'primary',
icon: 'el-icon-edit', icon: 'el-icon-edit',
callback: (index, rows) => this.dialog(rows[index].id) callback: (index, rows) => this.dialog(rows[index])
}, },
{ {
type: 'primary', type: 'primary',
...@@ -228,10 +231,10 @@ export default { ...@@ -228,10 +231,10 @@ export default {
this.updateVisible = !this.updateVisible this.updateVisible = !this.updateVisible
this.idPassvalue.$emit('expressionId', objId) this.idPassvalue.$emit('expressionId', objId)
}, },
updateDialogClose() { updateDialogClose(isCancel) {
console.log('关闭') // console.log('关闭')
this.updateVisible = !this.updateVisible this.updateVisible = !this.updateVisible
this.loadingGetList() !isCancel && this.loadingGetList()
}, },
deleteExp(objId) { deleteExp(objId) {
if (objId) { if (objId) {
......
...@@ -3,7 +3,9 @@ ...@@ -3,7 +3,9 @@
<gl-col :span="(manufactureOnly||!in_row)?24:12"> <gl-col :span="(manufactureOnly||!in_row)?24:12">
<gl-form-item label='品牌厂商:'> <gl-form-item label='品牌厂商:'>
<gl-select <gl-select
v-model="model.manufacturerId" v-model="model.manufacturerName"
filterable
clearable
placeholder="请选择品牌厂商" placeholder="请选择品牌厂商"
name="manufacturerId" name="manufacturerId"
data-vv-as="品牌厂商" data-vv-as="品牌厂商"
...@@ -13,9 +15,13 @@ ...@@ -13,9 +15,13 @@
<gl-option <gl-option
v-for="item in manufacturer_list" v-for="item in manufacturer_list"
:key="item.manufacturerName" :key="item.manufacturerName"
:label="item.manufacturerName" :label="item.merchantName"
:value="item.manufacturer" :value="item.manufacturer"
/> >
<span style="float: left">{{ item.merchantName }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.manufacturer }}</span>
<!-- <span>{{item.manufacturerName}}[{{item.manufacturer}}]</span> -->
</gl-option>
</gl-select> </gl-select>
<span <span
v-show="errorBags && errorBags.has('manufacturerId')" v-show="errorBags && errorBags.has('manufacturerId')"
...@@ -34,23 +40,25 @@ ...@@ -34,23 +40,25 @@
v-model="model.merchantId" v-model="model.merchantId"
placeholder="请选择渠道商" placeholder="请选择渠道商"
style="width:100%" style="width:100%"
name="merchantId"
data-vv-as="渠道商"
v-validate="'required'"
> >
<!-- name="merchantId"
data-vv-as="渠道商" -->
<gl-option <gl-option
v-for="item in merchant_list" v-for="item in merchant_list"
:key="item.merchantName" :key="item.merchantName"
:label="item.merchantName" :label="item.merchantName"
:value="item.merchantId" :value="item.merchantId"
/> >
<span style="float: left">{{ item.merchantName }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.merchantId }}</span>
</gl-option>
</gl-select> </gl-select>
<span <!-- <span
v-show="errorBags && errorBags.has('merchantId')" v-show="errorBags && errorBags.has('merchantId')"
class="error" class="error"
> >
{{ errorBags && errorBags.first('merchantId') }} {{ errorBags && errorBags.first('merchantId') }}
</span> </span> -->
</gl-form-item> </gl-form-item>
</gl-col> </gl-col>
<gl-col <gl-col
...@@ -93,7 +101,7 @@ ...@@ -93,7 +101,7 @@
:before-upload="beforeUpload_grayscaleuser" :before-upload="beforeUpload_grayscaleuser"
:on-remove="onRemove_grayscaleuser" :on-remove="onRemove_grayscaleuser"
v-model="result.grayscaleUserList" v-model="result.grayscaleUserList"
name="grayscaleUserList" name="file"
data-vv-as="灰度用户" data-vv-as="灰度用户"
v-validate="'required'" v-validate="'required'"
:file-list="model.file_list" :file-list="model.file_list"
...@@ -110,10 +118,10 @@ ...@@ -110,10 +118,10 @@
>支持格式: .Excel表格,批量上传设备号</div> >支持格式: .Excel表格,批量上传设备号</div>
</gl-upload> </gl-upload>
<span <span
v-show="errorBags && errorBags.has('grayscaleUserList')" v-show="errorBags && errorBags.has('file')"
class="error" class="error"
> >
{{ errorBags && errorBags.first('grayscaleUserList') }} {{ errorBags && errorBags.first('file') }}
</span> </span>
<a <a
:href="template_url" :href="template_url"
...@@ -128,20 +136,20 @@ ...@@ -128,20 +136,20 @@
import { manufacturers, merchants, grayscaleuser } from '@/api' import { manufacturers, merchants, grayscaleuser } from '@/api'
import { NoticeMixin } from '@/mixins' import { NoticeMixin } from '@/mixins'
const manufacturer_list_back_up = [ const manufacturer_list_back_up = [
{ // {
manufacturer: null, // manufacturer: null,
manufacturerName: '请选择品牌厂商', // manufacturerName: '',
merchantId: 0, // merchantId: 0,
merchantName: '' // merchantName: ''
} // }
] ]
const merchant_list_back_up = [ const merchant_list_back_up = [
{ // {
merchantId: null, // merchantId: null,
merchantName: '请选择渠道商', // merchantName: '',
merchantStatus: 0, // merchantStatus: 0,
merchantType: 401 // merchantType: 401
} // }
] ]
export default { export default {
name: 'Manufacturers', name: 'Manufacturers',
...@@ -179,6 +187,11 @@ export default { ...@@ -179,6 +187,11 @@ export default {
// } // }
// }) // })
// }), // }),
__eventBus.$on('defalut_setting', __value => {
console.log('setting default value')
// console.log(__value)
this.__setDefault(__value)
})
__eventBus.$on('clear_error', () => { __eventBus.$on('clear_error', () => {
this.$validator.errors.clear() this.$validator.errors.clear()
}) })
...@@ -216,10 +229,10 @@ export default { ...@@ -216,10 +229,10 @@ export default {
this.$emit('update:value', __back__data__) this.$emit('update:value', __back__data__)
} }
}, },
'model.manufacturerId': { 'model.manufacturerName': {
handler(__value) { handler(__value) {
this.result.manufacturers = this.manufacturer_list.filter( this.result.manufacturers = this.manufacturer_list.filter(
obj => this.model.manufacturerId === obj.manufacturer obj => this.model.manufacturerName === obj.manufacturer
)[0] )[0]
const __back__data__ = this.$deep_clone(this.result) const __back__data__ = this.$deep_clone(this.result)
this.$emit('update:value', __back__data__) this.$emit('update:value', __back__data__)
...@@ -246,6 +259,7 @@ export default { ...@@ -246,6 +259,7 @@ export default {
{ label: '指定用户(灰度)', value: 'LIST' } { label: '指定用户(灰度)', value: 'LIST' }
], ],
model: { model: {
manufacturerName: '',
merchantId: '', merchantId: '',
manufacturerId: '', manufacturerId: '',
file_list: [] // 文件列表 file_list: [] // 文件列表
...@@ -306,6 +320,7 @@ export default { ...@@ -306,6 +320,7 @@ export default {
}, },
__reset() { __reset() {
// 初始化 // 初始化
this.model.manufacturerName = null
this.model.manufacturerId = null this.model.manufacturerId = null
this.model.merchantId = null this.model.merchantId = null
this.result = { this.result = {
...@@ -319,6 +334,7 @@ export default { ...@@ -319,6 +334,7 @@ export default {
__setDefault(__default) { __setDefault(__default) {
this.model.merchantId = __default.merchantId this.model.merchantId = __default.merchantId
this.model.manufacturerId = __default.manufacturerId this.model.manufacturerId = __default.manufacturerId
this.model.manufacturerName = __default.manufacturerName
this.result.influenceScope = __default.influenceScope this.result.influenceScope = __default.influenceScope
this.model.file_list = __default.file_list this.model.file_list = __default.file_list
this.result.grayscaleUserList = __default.grayscaleuser this.result.grayscaleUserList = __default.grayscaleuser
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
:title="title" :title="title"
:visible.sync="updateVisible" :visible.sync="updateVisible"
:before-close="handleClose" :before-close="handleClose"
:close-on-click-modal="false"
width="900px" width="900px"
> >
<gl-form <gl-form
...@@ -145,9 +146,6 @@ ...@@ -145,9 +146,6 @@
v-model="editForm.activityForm" v-model="editForm.activityForm"
placeholder="请选择活动" placeholder="请选择活动"
style="width:100%" style="width:100%"
name="activityForm"
v-validate="'required'"
data-vv-as="活动内容"
> >
<gl-option <gl-option
v-for="item in contents" v-for="item in contents"
...@@ -156,12 +154,12 @@ ...@@ -156,12 +154,12 @@
:value="item.value" :value="item.value"
/> />
</gl-select> </gl-select>
<span <!-- <span
v-show="errorBags.has('activityForm')" v-show="errorBags.has('activityForm')"
class="error" class="error"
> >
{{ errorBags.first('activityForm') }} {{ errorBags.first('activityForm') }}
</span> </span> -->
</gl-form-item> </gl-form-item>
</gl-col> </gl-col>
<gl-col :span="14"> <gl-col :span="14">
...@@ -204,16 +202,13 @@ ...@@ -204,16 +202,13 @@
<gl-table <gl-table
:table="coupons" :table="coupons"
ref="multipleTable" ref="multipleTable"
name="gift"
v-validate="'required'"
data-vv-as="优惠券"
v-model="activityConfig.giftId" v-model="activityConfig.giftId"
></gl-table> ></gl-table>
<span <span
v-show="errorBags.has('gift')" v-show="hasGift"
class="error" class="error"
> >
{{ errorBags.first('gift') }} 优惠券不能为空
</span> </span>
</gl-col> </gl-col>
</gl-row> </gl-row>
...@@ -227,9 +222,7 @@ ...@@ -227,9 +222,7 @@
:on-remove="on_remove_gif" :on-remove="on_remove_gif"
:accept="gif.accept" :accept="gif.accept"
:on-preview="copy_path" :on-preview="copy_path"
name="dynamicEffectIcon" name="file"
v-validate="'required'"
data-vv-as="动效图标"
:limit="1" :limit="1"
v-model="activityConfig.dynamicEffectIcon" v-model="activityConfig.dynamicEffectIcon"
:file-list="activityConfig.dynamicEffectIcon?[{name:activityConfig.dynamicEffectIcon,url:activityConfig.dynamicEffectIcon}]:[]" :file-list="activityConfig.dynamicEffectIcon?[{name:activityConfig.dynamicEffectIcon,url:activityConfig.dynamicEffectIcon}]:[]"
...@@ -246,10 +239,10 @@ ...@@ -246,10 +239,10 @@
>动效图标必填</div> >动效图标必填</div>
</gl-upload> </gl-upload>
<span <span
v-show="errorBags.has('dynamicEffectIcon')" v-show="hasDynamicEffect"
class="error" class="error"
> >
{{ errorBags.first('dynamicEffectIcon') }} 动效图标不能为空
</span> </span>
</gl-col> </gl-col>
<gl-col :span="12"> <gl-col :span="12">
...@@ -352,6 +345,8 @@ export default { ...@@ -352,6 +345,8 @@ export default {
}) })
this.eventBus.$on('edit_event_data', data => { this.eventBus.$on('edit_event_data', data => {
this.title = data ? '编辑活动' : '新增活动' this.title = data ? '编辑活动' : '新增活动'
this.hasGift = false
this.hasDynamicEffect = false
let checked_gift = {} let checked_gift = {}
this.eventBus.$emit('reset') // 广播 ---- 清空 组件 数据 this.eventBus.$emit('reset') // 广播 ---- 清空 组件 数据
if (!data) { if (!data) {
...@@ -363,6 +358,7 @@ export default { ...@@ -363,6 +358,7 @@ export default {
const __clone = this.$deep_clone(data) // 拷贝列表传入数据 const __clone = this.$deep_clone(data) // 拷贝列表传入数据
this.editForm = __clone this.editForm = __clone
const { const {
manufacturerName,
manufacturerId, manufacturerId,
merchantId, merchantId,
influenceScope, influenceScope,
...@@ -373,6 +369,7 @@ export default { ...@@ -373,6 +369,7 @@ export default {
} = __clone } = __clone
this.default_value = { this.default_value = {
// 设置组件默认值 // 设置组件默认值
manufacturerName,
manufacturerId, manufacturerId,
merchantId, merchantId,
influenceScope, influenceScope,
...@@ -479,7 +476,9 @@ export default { ...@@ -479,7 +476,9 @@ export default {
prop: 'giftName' prop: 'giftName'
} }
] ]
} },
hasGift: false,
hasDynamicEffect: false
} }
}, },
mounted() { mounted() {
...@@ -489,13 +488,53 @@ export default { ...@@ -489,13 +488,53 @@ export default {
// this.manufacturer_component = this.$refs['m'] // this.manufacturer_component = this.$refs['m']
}, },
methods: { methods: {
// 活动内容验证
giftValidate() {
if (this.editForm.activityForm === 'GIFT') {
if (this.activityConfig.giftId) {
this.hasGift = false
} else {
this.hasGift = true
}
return !this.hasGift
} else if (this.editForm.activityForm === 'DYNAMIC_EFFECT') {
if (this.activityConfig.dynamicEffectIcon) {
this.hasDynamicEffect = false
} else {
this.hasDynamicEffect = true
}
return !this.hasDynamicEffect
} else {
if (this.activityConfig.giftId && !this.activityConfig.dynamicEffectIcon) {
this.hasGift = false
this.hasDynamicEffect = true
} else if (this.activityConfig.dynamicEffectIcon && !this.activityConfig.giftId) {
this.hasDynamicEffect = false
this.hasGift = true
} else if (this.activityConfig.giftId && this.activityConfig.dynamicEffectIcon) {
this.hasGift = false
this.hasDynamicEffect = false
} else {
this.hasGift = true
this.hasDynamicEffect = true
}
return !this.hasGift && !this.hasDynamicEffect
}
// if (this.editForm.activityForm === 'GIFT' && this.activityConfig.giftId) {
// this.hasGift = false
// } else {
// this.hasGift = true
// }
// return !this.hasGift
},
// 提交数据 // 提交数据
handleSubmit() { handleSubmit() {
Promise.all([ Promise.all([
this.$validator.validateAll(), this.$validator.validateAll(),
this.$refs['m'].$validator.validateAll() this.$refs['m'].$validator.validateAll(),
this.giftValidate()
]).then(result => { ]).then(result => {
if (result[0] && result[1]) { if (result[0] && result[1] && result[2]) {
this.fix_params().then(params => { this.fix_params().then(params => {
this.updateLoading = true this.updateLoading = true
;(this.editForm.id ? mergeActivity : addActivity) ;(this.editForm.id ? mergeActivity : addActivity)
...@@ -537,45 +576,50 @@ export default { ...@@ -537,45 +576,50 @@ export default {
delete form.createdBy delete form.createdBy
delete form.count delete form.count
delete form.status delete form.status
if (!form.manufacturer) {
let beginTime = this.time[0]
let endTime = this.time[1]
if (typeof beginTime === 'number') {
beginTime = new Date(beginTime).format(this.time_format)
endTime = new Date(endTime).format(this.time_format)
} else if (typeof beginTime === 'object') {
beginTime = beginTime.format(this.time_format)
endTime = endTime.format(this.time_format)
}
form.beginTime = beginTime
form.endTime = endTime
const {
manufacturers,
merchants,
influenceScope,
grayscaleUserList
} = this.com_value
let beginTime = this.time[0] // manufacturer
let endTime = this.time[1] const { manufacturer } = manufacturers
if (typeof beginTime === 'number') { form.manufacturer = manufacturer
beginTime = new Date(beginTime).format(this.time_format) form.manufacturerName = manufacturers.merchantName
endTime = new Date(endTime).format(this.time_format) form.manufacturerId = manufacturers.merchantId
} else if (typeof beginTime === 'object') {
beginTime = beginTime.format(this.time_format)
endTime = endTime.format(this.time_format)
}
form.beginTime = beginTime
form.endTime = endTime
const {
manufacturers,
merchants,
influenceScope,
grayscaleUserList
} = this.com_value
// manufacturer
const { manufacturer } = manufacturers
form.manufacturer = manufacturer
form.manufacturerName = manufacturers.merchantName
form.manufacturerId = manufacturers.merchantId
// merchants // merchants
const { const {
merchantId, merchantId,
merchantName merchantName
// merchantStatus, // merchantStatus,
// merchantType // merchantType
} = merchants
form.merchantId = merchantId } = merchants
form.merchantName = merchantName form.merchantId = merchantId
// influenceScope,,,grayscaleUserList form.merchantName = merchantName
form.influenceScope = influenceScope // influenceScope,,,grayscaleUserList
form.grayscaleUserList = grayscaleUserList form.influenceScope = influenceScope
form.activityConfig = JSON.stringify(this.activityConfig) form.grayscaleUserList = grayscaleUserList
resolve(form) form.activityConfig = JSON.stringify(this.activityConfig)
resolve(form)
} else {
form.activityConfig = JSON.stringify(this.activityConfig)
resolve(form)
}
} catch (error) { } catch (error) {
console.log(error) console.log(error)
this.error(error) this.error(error)
...@@ -596,6 +640,7 @@ export default { ...@@ -596,6 +640,7 @@ export default {
// ) // )
this.activityConfig = this.$merge(this.activityConfig, data) this.activityConfig = this.$merge(this.activityConfig, data)
this.coupons.data = [this.activityConfig] this.coupons.data = [this.activityConfig]
// this.giftValidate()
this.eventBus.$emit('checked_gift', data) this.eventBus.$emit('checked_gift', data)
}, },
...@@ -607,9 +652,10 @@ export default { ...@@ -607,9 +652,10 @@ export default {
// } // }
// __cfg.dynamicEffectIcon=res.fileUrl // __cfg.dynamicEffectIcon=res.fileUrl
// this.editForm.activityConfig = JSON.stringify(__cfg) // this.editForm.activityConfig = JSON.stringify(__cfg)
this.activityConfig.dynamicEffectIcon = res.fileUrl this.activityConfig.dynamicEffectIcon = res.data.fileUrl
}, },
before_upload_gif(file) { before_upload_gif(file) {
// console.log(file)
const { size } = this.gif const { size } = this.gif
const isSize = file.size / 1024 / 1024 < size const isSize = file.size / 1024 / 1024 < size
!isSize && this.$message.error(`上传图标文件大小不能超过${size}MB`) !isSize && this.$message.error(`上传图标文件大小不能超过${size}MB`)
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
title="选择活动礼品" title="选择活动礼品"
:visible.sync="giftVisible" :visible.sync="giftVisible"
:before-close="handleClose" :before-close="handleClose"
:close-on-click-modal="false"
width='800px ' width='800px '
> >
<gl-row> <gl-row>
......
...@@ -112,6 +112,11 @@ export default { ...@@ -112,6 +112,11 @@ export default {
data: [], data: [],
column: [ column: [
{ {
label: '主题ID',
prop: 'id',
width:90
},
{
label: '品牌厂商', label: '品牌厂商',
prop: 'manufacturerName' prop: 'manufacturerName'
}, },
...@@ -158,42 +163,43 @@ export default { ...@@ -158,42 +163,43 @@ export default {
prop: 'updatedBy' prop: 'updatedBy'
} }
], ],
number: { // number: {
label: '序号', // label: '序号',
width: '50px', // width: '60px',
index: index => { // index: index => {
++index // ++index
return index < 10 && index > 0 ? '0' + index : index // return index < 10 && index > 0 ? '0' + index : index
} // }
}, // },
console: { console: {
show: true, show: true,
label: '操作', label: '操作',
prop: 'options', prop: 'options',
width: '200px',
button: [ button: [
{ // {
label: '上架', // label: '上架',
type: 'text', // type: 'text',
formatter: rows => // formatter: rows =>
rows.status === { ON: '上架', OF: '下架' }[rows.status], // rows.status === { ON: '上架', OF: '下架' }[rows.status],
callback: (index, rows) => { // callback: (index, rows) => {
const { id, status } = rows[index] // const { id, status } = rows[index]
this.$confirm( // this.$confirm(
`确定${{ ON: '下架', OF: '上架' }[status]}该活动?`, // `确定${{ ON: '下架', OF: '上架' }[status]}该活动?`,
'', // '',
{ // {
type: 'warning' // type: 'warning'
} // }
) // )
.then(() => { // .then(() => {
this.updateActivity({ // this.updateActivity({
id, // id,
status: { ON: 'OF', OF: 'ON' }[status] // status: { ON: 'OF', OF: 'ON' }[status]
}) // })
}) // })
.catch(err => console.log(err)) // .catch(err => console.log(err))
} // }
}, // },
{ {
type: '', type: '',
icon: 'el-icon-edit', icon: 'el-icon-edit',
...@@ -209,7 +215,7 @@ export default { ...@@ -209,7 +215,7 @@ export default {
.then(() => { .then(() => {
this.updateActivity({ this.updateActivity({
id: rows[index].id, id: rows[index].id,
deletedFlag: 'true' deletedFlag: 'D'
}) })
}) })
.catch(err => this.error(err)) .catch(err => this.error(err))
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!