Commit 8d89ea61 by 王志慧

战报配置活动类型添加

1 parent 40bd88e8
......@@ -183,11 +183,21 @@ export default {
optionList: [],
optionId: 'confId',
optionLabel: 'confName'
},
{
label: '活动类型',
name: 'marketingType',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confName',
optionsName: 'activityTypeList'
}
],
tableSearchForm: {
merchantName: '',
activityName: ''
activityName: '',
activityType: ''
},
// 表格
userList: [],
......@@ -212,6 +222,14 @@ export default {
label: '活动门店',
prop: 'merchantName'
},
{
label: '活动类型',
prop: 'marketingType',
formatter: cellValue => {
const data = this.baseData.activityTypeList.filter(item => item.confId == cellValue.marketingType)
return data.length > 0 ? data[0].confName : '--'
}
},
{
label: '活动时间',
addHtml: 'activityTime'
......@@ -244,11 +262,18 @@ export default {
wechat: {
automaticName: '',
roomName: ''
},
baseData: {
activityTypeList: [
{ confId: '3', confName: '众筹' },
{ confId: '5', confName: '膨胀金' }
]
}
}
},
mounted() {
this.getOptionsList('searchFormData')
this.getCrowdfundingParams()
this.getMerchantList()
},
......@@ -287,6 +312,31 @@ export default {
}
},
methods: {
getOptionsList(formName, hasAll = true, refreshSigle) {
if (refreshSigle) {
var item = this[formName].find(k => k.name == refreshSigle)
var index = this[formName].findIndex(k => k.name == refreshSigle)
this.$set(this[formName][index], 'optionList', this.$common.utils.deepClone(this.baseData[item.optionsName]))
if (hasAll && this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this[formName][index].optionLabel] !== '全部') {
const temp = {}
temp[this[formName][index].optionId] = ''
temp[this[formName][index].optionLabel] = '全部'
this[formName][index].optionList.unshift(temp)
}
} else {
this[formName].forEach((item, index) => {
if (item.type === 'select' && this.baseData[item.optionsName]?.length) {
this.$set(this[formName][index], 'optionList', this.$common.utils.deepClone(this.baseData[item.optionsName]))
if (hasAll && this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this[formName][index].optionLabel] !== '全部') {
const temp = {}
temp[this[formName][index].optionId] = ''
temp[this[formName][index].optionLabel] = '全部'
this[formName][index].optionList.unshift(temp)
}
}
})
}
},
async getCrowdfundingParams() {
/**参数类型 1:众筹活动名称(返回类型String),2:众筹活动门店 */
const activity = await this.$apis.seckillActivity.getCrowdfundingParams({
......
......@@ -3,7 +3,7 @@ const packageName = require('./package.json').name
const node_env = process.env.NODE_ENV === 'production'
const publicPath = node_env ? `/child/${packageName}/` : '/'
const resolve = dir => path.join(__dirname, dir)
const CDN_DOMAIN = 'https://cdn.bootcdn.net/'
const CDN_DOMAIN = 'https://img02.glsx.com.cn/'
const cdn = {
css: [`${CDN_DOMAIN}ajax/libs/element-ui/2.11.1/theme-chalk/index.css`],
js: [`${CDN_DOMAIN}ajax/libs/vue/2.6.11/vue.min.js`, `${CDN_DOMAIN}ajax/libs/vue-router/3.2.0/vue-router.min.js`, `${CDN_DOMAIN}ajax/libs/element-ui/2.11.1/index.js`, `${CDN_DOMAIN}ajax/libs/vuex/3.6.2/vuex.min.js`, `${CDN_DOMAIN}ajax/libs/echarts/5.1.2/echarts.min.js`, 'https://webapi.amap.com/loader.js']
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!