Commit 7deeea54 by 前端

提交

1 parent b669ebab
......@@ -277,8 +277,8 @@
type="file"
style="opacity: 0"
:id="item.type + 'file'"
ref="file"
class="welcome-input"
ref="fileVideo"
class="welcome-input upload-video"
:accept="item.accept || 'video/*'"
@change="(e) => handleVideoChange(e)"
/>
......@@ -646,6 +646,7 @@ export default {
ATT_TYPE.VEDIO
)
}
document.querySelector('.upload-video').value = ''
var reader = new FileReader()
reader.readAsDataURL(file)
reader.onload = (e) => {
......@@ -655,7 +656,6 @@ export default {
const fileUrl = splitStr[splitStr.length - 1] + '@' + arrBase64[1]
// const base64 = file.name.split('.')[1] + '@' + imgFile.split(',')[1]
this.videoList.uploadApi({ file: fileUrl }).then((res) => {
console.log(res)
if (res) {
this.$notify({
title: '提示',
......@@ -707,7 +707,7 @@ export default {
return new Promise((resolve, reject) => {
let file = e.srcElement.files[0]
// 默认10MB
const limitSize = this.videoList.limitSize || 10
const limitSize = this.videoList.limitSize || 50
const isLt = file.size / 1024 / 1024 < limitSize
if (!isLt) {
_this.$message.error('上传视频大小不能超过' + limitSize + 'MB!')
......
......@@ -24,10 +24,10 @@
<el-form-item label='所属业务场景'>
<el-select v-model='profitSearchForm.businessScene' placeholder='所属业务场景'>
<el-option label='全部' value=''></el-option>
<el-option label='1.0 新车权益升级' value='0'></el-option>
<el-option label='1.1 新车精品升级' value='1'></el-option>
<el-option label='1.2 新车膨胀金活动' value='2'></el-option>
<el-option label='1.3 售后直播众筹活动' value='3'></el-option>
<el-option label='1.0 新车权益销售' value='0'></el-option>
<el-option label='1.1 次新车精品升级' value='1'></el-option>
<el-option label='1.2 次新车线上转化' value='2'></el-option>
<el-option label='1.3 存量用户众筹' value='3'></el-option>
</el-select>
</el-form-item>
<el-form-item label='所属商户:'>
......
......@@ -14,10 +14,10 @@
:pageConf='pageConf'
>
<div slot="businessScene" slot-scope="scope">
<span v-if="scope.scope.businessScene == '0'">1.0 新车权益升级</span>
<span v-if="scope.scope.businessScene == '1'">1.1 新车精品升级</span>
<span v-if="scope.scope.businessScene == '2'">1.2 新车膨胀金活动</span>
<span v-if="scope.scope.businessScene == '3'">1.3 售后直播众筹活动</span>
<span v-if="scope.scope.businessScene == '0'">1.0 新车权益销售</span>
<span v-if="scope.scope.businessScene == '1'">1.1 次新车精品升级</span>
<span v-if="scope.scope.businessScene == '2'">1.2 次新车线上转化</span>
<span v-if="scope.scope.businessScene == '3'">1.3 存量用户众筹</span>
</div>
<div slot="channel" slot-scope="scope">
<span v-if="scope.scope.channel == '1'">广联</span>
......
......@@ -16,7 +16,7 @@
size="small"
:disabled="isEditor"
>
<el-option label="1.3存量用户众筹" :value="3"></el-option>
<el-option label="1.3 售后直播众筹活动" :value="3"></el-option>
</el-select>
</el-form-item>
<el-form-item label="商户:" prop="merchantId">
......@@ -168,13 +168,19 @@
<el-form-item
:prop="'missionList.' + index1 + '.missionMaterialList'"
:rules="taskFormRules.attachmentList"
v-if="itm.missonType && itm.missonType != 1"
v-if="itm.missonType && itm.missonType == 2"
>
<label slot="label" class="required">分享素材:</label>
<GLEditor
:id="'missionList' + itm.id + 'welcome'"
:key="'missionList' + itm.id + 'welcome'"
:ref="'missionList' + itm.id + 'welcome'"
:id="
'missionList' + (itm.taskid || itm.id) + 'welcome'
"
:key="
'missionList' + (itm.taskid || itm.id) + 'welcome'
"
:ref="
'missionList' + (itm.taskid || itm.id) + 'welcome'
"
:form="'customer'"
style="line-height: 12px"
:btnList="btnList"
......@@ -241,6 +247,7 @@
oninput="value=value.replace(/^0[0-9]|[^0-9]/g, '')"
size="small"
:disabled="isEditor && activityStatus == 2"
placeholder="0表示不做限制"
></el-input>
</el-form-item>
<el-form-item
......@@ -275,6 +282,20 @@
</el-form-item>
<el-form-item
v-if="itm.rewardType == 1"
label="最低指标:"
>
<el-input
v-model="itm.minTriggerValue"
type="number"
:min="1"
oninput="value=value.replace(/^0|[^0-9]/g, '')"
size="small"
:disabled="isEditor && activityStatus == 2"
placeholder="默认为从1开始判断循环奖励"
></el-input>
</el-form-item>
<el-form-item
v-if="itm.rewardType == 1"
label="触发值:"
:prop="'missionList.' + index1 + '.triggerValue'"
:rules="taskFormRules.triggerValue"
......@@ -409,7 +430,7 @@ export default {
name: '视频',
funcName: '',
type: 'video',
limitSize: 10, // 限制视频大小
// limitSize: 10, // 限制视频大小
limitNum: 1, // 限制视频数量
uploadApi: commonApi.uploadImgApi,
},
......@@ -431,7 +452,7 @@ export default {
activityImage: '',
// 公共任务类型
basicObj: {
id: '',
taskid: '',
missonType: '',
missionName: '',
missonDesc: '',
......@@ -447,7 +468,7 @@ export default {
},
// 浏览指标任务类型
browseObj: {
missionMaterialList: [],
// missionMaterialList: [],
rewardType: '',
rewardCount: '',
repeatCount: '',
......@@ -456,14 +477,14 @@ export default {
},
// 访客指标任务类型
visitorObj: {
missionMaterialList: [],
// missionMaterialList: [],
rewardType: '',
triggerValue: '',
minTriggerValue: '',
},
// 成单指标任务类型
orderObj: {
missionMaterialList: [],
// missionMaterialList: [],
rewardType: '',
triggerValue: '',
minTriggerValue: '',
......@@ -706,7 +727,7 @@ export default {
this.taskList[index].missionList.unshift({
...this.basicObj,
})
this.taskList[index].missionList[0].id = this.getUuid()
this.taskList[index].missionList[0].taskid = this.getUuid()
console.log(this.taskList[index].missionList[0])
},
// 任务选择类型切换
......@@ -763,7 +784,7 @@ export default {
}
// 沿用任务名称以及id
taskItem.missonType = task.missonType
taskItem.id = task.id
taskItem.taskid = task.taskid
// 任务类型=浏览、访客、成单时,默认添加活动专属链接
if (taskItem.missonType != 1 && taskItem.missonType != 2) {
taskItem.linkStatus = true
......@@ -778,9 +799,11 @@ export default {
}
this.$nextTick(() => {
this.$set(this.taskList[dateTaskIndex].missionList, taskIndex, taskItem)
var box = document.getElementById('missionList' + task.id + 'welcome')
var box = document.getElementById(
'missionList' + task.taskid + 'welcome'
)
if (box) {
var editName = 'missionList' + task.id + 'welcome'
var editName = 'missionList' + task.taskid + 'welcome'
console.log(this.$refs[editName])
this.$refs[editName][0].resetItem()
}
......@@ -906,11 +929,12 @@ export default {
this.$nextTick(() => {
this.$set(itm, 'triggerValue', '')
this.$set(itm, 'rewardCount', '')
this.$set(itm, 'minTriggerValue', '')
})
} else {
this.$nextTick(() => {
this.$set(itm, 'rewardCount', '')
this.$set(itm, 'minTriggerValue', '')
this.$set(itm, 'minTriggerValue', '1')
})
}
},
......@@ -965,13 +989,19 @@ export default {
},
// 提交任务
submitTask() {
// 遍历重复次数
// 遍历
this.taskList.map((item) => {
item.missionList.map((itm) => {
// 重复次数处理
if (itm.repeatCount || itm.repeatFlag) {
itm.repeatCount = itm.repeatCount ? itm.repeatCount : -1
}
delete itm.id
// 最低指标处理
if (itm.rewardType == 1 && !itm.minTriggerValue) {
itm.minTriggerValue = 1
}
// 删除自定义唯一uuid
delete itm.taskid
})
})
try {
......
......@@ -5,8 +5,7 @@
<p>{{ item.missonTypeName }}</p>
<p>{{ item.missionName }}</p>
<p>{{ item.missonDesc }}</p>
<template
v-if='item.platformMerchantMissionMaterialResponseList && item.platformMerchantMissionMaterialResponseList.length'>
<template v-if='item.platformMerchantMissionMaterialResponseList && item.platformMerchantMissionMaterialResponseList.length'>
<div v-for='(sub,idx,) in item.platformMerchantMissionMaterialResponseList' :key='idx'>
<template v-if="sub.materialType == '1'">
<p v-html='tramWord(sub.materialContent)'></p>
......@@ -18,7 +17,7 @@
<video class='displayImg' :src='sub.materialContent' />
</template>
<template v-if="sub.materialType == '4'">
<p class='content'>{{ sub.materialContent }}</p>
<p class='content'>{{sub.materialContent}}</p>
</template>
</div>
</template>
......@@ -31,7 +30,6 @@
</span>
<span v-if='item.triggerValue'>触发值:{{ item.triggerValue }}</span>
<span v-if='item.rewardScore'>奖励积分值:{{ item.rewardScore }}</span>
<span v-if='item.minTriggerValue'>最低指标:{{ item.minTriggerValue }}</span>
</div>
</div>
</div>
......@@ -45,7 +43,6 @@
<script>
import { taskManagementApi } from '@/api/taskManagement'
import emoji from '@/utils/emo'
export default {
name: 'TaskDetails',
props: {
......@@ -68,7 +65,7 @@ export default {
} else if (index >= 10 && index < 100) {
index = '0' + index
}
return `<img style='width:25px;height:25px' src='https://img01.glsx.com.cn/weapp/resource/saas/scrm/emoji/${index}.png'>`
return `<img style='width:25px;height:25px' src="https://img01.glsx.com.cn/weapp/resource/saas/scrm/emoji/${index}.png">`
})
return htm
},
......@@ -100,17 +97,14 @@ export default {
padding: 20px;
margin-bottom: 20px;
}
.leftContent {
.leftContent{
width: 70%;
}
.content {
.content{
height: auto;
word-wrap: break-word;
word-break: break-all;
}
.taskAward {
display: flex;
justify-content: space-between;
......@@ -127,13 +121,11 @@ export default {
padding-bottom: 8px;
width: 50%;
}
.copyLine {
color: #409EFF;
cursor: pointer;
}
.displayImg {
.displayImg{
width: 500px;
height: 300px;
}
......
......@@ -34,7 +34,6 @@
</span>
<span v-if='displayList.triggerValue'>触发值:{{ displayList.triggerValue }}</span>
<span v-if='displayList.rewardScore'>奖励积分值:{{ displayList.rewardScore }}</span>
<span v-if='displayList.minTriggerValue'>最低指标:{{ displayList.minTriggerValue }}</span>
</div>
</div>
</el-tab-pane>
......
......@@ -59,10 +59,14 @@
:pageConf="pageConf"
>
<div slot="businessScene" slot-scope="scope">
<span v-if="scope.scope.businessScene == 0">1.0新车权益销售</span>
<span v-if="scope.scope.businessScene == 1">1.1次新车精品升级</span>
<span v-if="scope.scope.businessScene == 2">1.2次新车线上转化</span>
<span v-if="scope.scope.businessScene == 3">1.3存量用户众筹</span>
<span v-if="scope.scope.businessScene == 0">1.0 新车权益升级</span>
<span v-if="scope.scope.businessScene == 1">1.1 新车精品升级</span>
<span v-if="scope.scope.businessScene == 2"
>1.2 次新车膨胀金活动</span
>
<span v-if="scope.scope.businessScene == 3"
>1.3 售后直播众筹活动</span
>
</div>
<div slot="activityStatus" slot-scope="scope">
<span v-if="scope.scope.activityStatus == statusNum.UNPUBLISH"
......
......@@ -22,13 +22,6 @@
placeholder='请输入员工手机号'
></el-input>
</el-form-item>
<el-form-item label='门店名称'>
<el-input
clearable
v-model='withdrawalSearchForm.merchantName'
placeholder='请输入门店名称'
></el-input>
</el-form-item>
<el-form-item label='状态'>
<el-select v-model='withdrawalSearchForm.status' placeholder='请选择状态'>
<el-option label='全部' value=''></el-option>
......
......@@ -49,10 +49,6 @@ export default {
prop: 'staffPhone'
},
{
label: '门店名称',
prop: 'merchantName'
},
{
label: '积分值',
prop: 'withdrawalScore'
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!