Commit ce08325a by 黑潮

fix: 素材组件

parent 5c372776
......@@ -42,6 +42,6 @@
<script src="//web-1251519181.file.myqcloud.com/components/card.2.0.20.js"></script><!-- 卡券弹窗 -->
<script src="//web-1251519181.file.myqcloud.com/components/radio-transfer.1.0.13.js"></script><!-- 单选穿梭框 -->
<script src="//web-1251519181.file.myqcloud.com/components/steps.1.0.1.js"></script>
<script src="//web-1251519181.file.myqcloud.com/components/material.1.0.6.js"></script>
<script src="//web-1251519181.file.myqcloud.com/components/material.1.0.7.js"></script>
</body>
</html>
......@@ -7,8 +7,8 @@
<p style="margin-top:12px;color:#606266">
<span>群发内容:</span>
<span v-for="(el, index) in materials" :key="el">
<template v-if="index !== 0">/</template>
{{ el }}
<template v-if="index !== 0"> / </template>
<span v-html="el"></span>
</span>
</p>
</div>
......@@ -39,10 +39,10 @@ export default {
6: '小程序'
};
let res = JSON.parse(this.item.qfxx.chatContent || '[]');
const item = res.find(el => el.statusFlag == 0);
const items = res.filter(el => el.statusFlag == 0);
return [...new Set(res.map(el => el.type))].map(el => {
if (item && item.type == el) {
return `${mapName[el]} (已失效)`;
if (items.length > 0 && items.some(item => item.type == el)) {
return `${mapName[el]} (<span style="color:#F56C6C">已失效</span>)`;
} else {
return mapName[el];
}
......
......@@ -15,7 +15,7 @@
<div slot="content" style="width:376px;line-height: 22px;">计划创建后编辑任务标题,历史创建任务的标题不会更新,新下发任务按编辑后标题展示</div>
</el-tooltip>
</template>
<el-input show-word-limit v-model="form.title" :maxlength="20" :disabled="readOnly"></el-input>
<el-input show-word-limit v-model.trim="form.title" :maxlength="20" :disabled="readOnly"></el-input>
</el-form-item>
<el-form-item label="任务描述" prop="remark">
<template slot="label">
......
......@@ -18,6 +18,7 @@
<component :is="v.comName" :item="v.item" :isSupportVar="isSupportVar"></component>
<template v-if="!readOnly">
<i class="el-icon-edit dm-marketing__opt--icon" v-if="showEdit(v) && (v.comName === 'item-teltask' || v.comName === 'item-text' || v.comName === 'item-wxa' || v.comName === 'item-integral' || v.comName === 'item-qywx' || v.comName === 'item-qfxx')" @click="editItem(v)"></i>
<i v-else-if="v.comName == 'item-qywx' || v.comName == 'item-qfxx'" class="el-icon-view dm-marketing__opt--icon" @click="editItem(v, true)"></i>
<dm-delete :tips="showDeleteTooltip ? '是否确定删除该营销事件?删除后,该计划营销分析数据可能会不准确。' : '是否删除?'" @confirm="delItem(v)">
<i class="el-icon-delete dm-marketing__opt--icon"></i>
</dm-delete>
......@@ -33,7 +34,7 @@
</transition>
</div>
<!-- 弹窗组件 -->
<component :is="dialogCom" @sendItem="saveToList" :showOutCouponIcon="showOutCouponIcon" :item="currentItem" :show.sync="dialogShow" :isSupportVar="isSupportVar" :cardLimitType="cardLimitType" :integralMultiple="integralMultiple" :singleFlag="singleFlag" :read-only="readOnly"></component>
<component :is="dialogCom" @sendItem="saveToList" :showOutCouponIcon="showOutCouponIcon" :item="currentItem" :show.sync="dialogShow" :isSupportVar="isSupportVar" :cardLimitType="cardLimitType" :integralMultiple="integralMultiple" :singleFlag="singleFlag" :read-only="readOnly || showView"></component>
</section>
</template>
......@@ -156,6 +157,7 @@ export default {
},
data() {
return {
showView: false,
list: [],
dialogShow: false,
dialogCom: '',
......@@ -496,12 +498,13 @@ export default {
});
},
// 编辑前置
editItem(obj) {
editItem(obj, showView) {
this.currentItem = obj.item;
this.dialogCom = 'lib-' + obj.comName.slice(5);
this.$nextTick(_ => {
this.dialogShow = true;
});
this.showView = !!showView;
},
/*------------------辅助方法--------------*/
......@@ -556,7 +559,7 @@ export default {
this.$emit('has-card', item);
},
showEdit(item) {
return this.options.find(i => {
return this.options.some(i => {
return 'item-' + i.value == item.comName;
});
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment