|
@@ -0,0 +1,543 @@
|
|
|
+<template>
|
|
|
+ <el-form :model="formCallback" label-position="right" label-width="120px" ref="form" v-loading="loading" class="pr-4">
|
|
|
+ <el-form-item label="人群包名称" prop="name" :rules="[{ required: true, message: '人群包名称必须填写' }]" label-width="120px">
|
|
|
+ <el-input v-model="formCallback.name" auto-complete="off" placeholder="请输入人群包名称"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="配置公众号" prop="gzh_ids" :rules="[{ required: true, message: '公众号必须选择' }]" label-width="120px">
|
|
|
+ <configPublicPlus :isShowButton="false" :required="true" @change="configPublicChange"></configPublicPlus>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="选择标签" prop="name" :rules="[{ required: false, message: '' }]" label-width="90px">
|
|
|
+ <div>
|
|
|
+ <el-tabs type="card">
|
|
|
+ <el-tab-pane label="活跃信息">
|
|
|
+ <el-form-item label="仅48小时内和公众号有互动的粉丝才能收到" label-width="300px"
|
|
|
+ :rules="[{ required: false, message: '金额项必须填写' }]">
|
|
|
+ <div class="flex items-center mb-3 mr-3">
|
|
|
+ <el-radio-group v-model="formCallback.tags.in_48_hour">
|
|
|
+ <el-radio :label="1">是</el-radio>
|
|
|
+ <el-radio :label="2">否</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </div>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="关注时间" label-width="120px" :rules="[{ required: false, message: '' }]">
|
|
|
+ <div class="flex items-center mb-3 mr-3">
|
|
|
+ <el-radio-group v-model="formCallback.tags.attention_hour">
|
|
|
+ <el-radio label="">不限</el-radio>
|
|
|
+ <el-radio label="0-6">6h以内</el-radio>
|
|
|
+ <el-radio label="24-28">24-28h</el-radio>
|
|
|
+ <el-radio label="0-48">48h以内</el-radio>
|
|
|
+ <el-radio label="custom">自定义</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ <el-tooltip placement="top">
|
|
|
+ <template #content>
|
|
|
+ <span>
|
|
|
+ 可自主选择用户上次互动时间范围,只填写左侧输入框即为n小时以上(包含n小时),只填写右侧输入框即为n小时以内(包含n小时)</span> <br />
|
|
|
+ </template>
|
|
|
+ <el-icon>
|
|
|
+ <InfoFilled />
|
|
|
+ </el-icon>
|
|
|
+ </el-tooltip>
|
|
|
+ </div>
|
|
|
+ <div v-if="formCallback.tags.attention_hour == 'custom'" class="flex">
|
|
|
+ <div class="flex flex-col">
|
|
|
+ <el-input style="width:150px;margin:0 5px;" :min="0"
|
|
|
+ v-model.number="formCallback._tags.attention_hour.min" type="number">
|
|
|
+ <template #append>h</template>
|
|
|
+ </el-input>
|
|
|
+ </div>
|
|
|
+ <span>—</span>
|
|
|
+ <div class="flex flex-col">
|
|
|
+ <el-input style="width:150px;margin:0 5px;" :min="formCallback?._tags?.attention_hour?.min ?? 0"
|
|
|
+ v-model.number="formCallback._tags.attention_hour.max" :max="720" type="number">
|
|
|
+ <template #append>h</template>
|
|
|
+ </el-input>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="上次互动时间" label-width="120px" :rules="[{ required: false, message: '' }]">
|
|
|
+ <div class="flex items-center mb-3 mr-3">
|
|
|
+ <el-radio-group v-model="formCallback.tags.interact_hour">
|
|
|
+ <el-radio label="">不限</el-radio>
|
|
|
+ <el-radio label="0-1">1h以内</el-radio>
|
|
|
+ <el-radio label="1-6">1-6h</el-radio>
|
|
|
+ <el-radio label="6-12">6-12h</el-radio>
|
|
|
+ <el-radio label="12-36">12-36h</el-radio>
|
|
|
+ <el-radio label="36-48">36-48h</el-radio>
|
|
|
+ <el-radio label="custom">自定义</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ <el-tooltip placement="top">
|
|
|
+ <template #content>
|
|
|
+ <span>
|
|
|
+ 可自主选择用户上次互动时间范围,只填写左侧输入框即为n小时以上(包含n小时),只填写右侧输入框即为n小时以内(包含n小时)</span> <br />
|
|
|
+ </template>
|
|
|
+ <el-icon>
|
|
|
+ <InfoFilled />
|
|
|
+ </el-icon>
|
|
|
+ </el-tooltip>
|
|
|
+ </div>
|
|
|
+ <div v-if="formCallback.tags.interact_hour == 'custom'" class="flex">
|
|
|
+ <div class="flex flex-col">
|
|
|
+ <el-input style="width:150px;margin:0 5px;" :min="0"
|
|
|
+ v-model.number="formCallback._tags.interact_hour.min" type="number">
|
|
|
+ <template #append>h</template>
|
|
|
+ </el-input>
|
|
|
+ </div>
|
|
|
+ <span>—</span>
|
|
|
+ <div class="flex flex-col">
|
|
|
+ <el-input style="width:150px;margin:0 5px;" :min="formCallback?._tags?.interact_hour?.min ?? 0"
|
|
|
+ v-model.number="formCallback._tags.interact_hour.max" :max="720" type="number">
|
|
|
+ <template #append>h</template>
|
|
|
+ </el-input>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="最近观看日期" label-width="120px" :rules="[{ required: false, message: '' }]">
|
|
|
+ <div class="flex items-center mb-3 mr-3">
|
|
|
+ <el-radio-group v-model="formCallback.tags.last_watch_day">
|
|
|
+ <el-radio label="">不限</el-radio>
|
|
|
+ <el-radio label="0-2">近两天内</el-radio>
|
|
|
+ <el-radio label="2-5">2-5天内</el-radio>
|
|
|
+ <el-radio label="5-7">2-5天内</el-radio>
|
|
|
+ <el-radio label="7-15">7-15天内</el-radio>
|
|
|
+ <el-radio label="15-30">15-30天内</el-radio>
|
|
|
+ <el-radio label="custom">自定义</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ <el-tooltip placement="top">
|
|
|
+ <template #content>
|
|
|
+ <span>
|
|
|
+ 可自主选择用户最近阅读日期范围,只填写左侧输入框即为距离今天n天前(包含n天),只填写右侧输入框即为距离今天n天以内(包含n天)</span> <br />
|
|
|
+ </template>
|
|
|
+ <el-icon>
|
|
|
+ <InfoFilled />
|
|
|
+ </el-icon>
|
|
|
+ </el-tooltip>
|
|
|
+ </div>
|
|
|
+ <div v-if="formCallback.tags.last_watch_day == 'custom'" class="flex">
|
|
|
+ <div class="flex flex-col">
|
|
|
+ <el-input style="width:150px;margin:0 5px;" :min="0"
|
|
|
+ v-model.number="formCallback._tags.last_watch_day.min" type="number">
|
|
|
+ <template #append>天</template>
|
|
|
+ </el-input>
|
|
|
+ </div>
|
|
|
+ <span>—</span>
|
|
|
+ <div class="flex flex-col">
|
|
|
+ <el-input style="width:150px;margin:0 5px;" :min="formCallback?._tags?.last_watch_day?.min ?? 0"
|
|
|
+ v-model.number="formCallback._tags.last_watch_day.max" :max="30" type="number">
|
|
|
+ <template #append>天</template>
|
|
|
+ </el-input>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="用户注册日期" label-width="120px" :rules="[{ required: false, message: '' }]">
|
|
|
+ <div class="flex items-center mb-3 mr-3">
|
|
|
+ <el-radio-group v-model="formCallback.tags.register_day">
|
|
|
+ <el-radio label="">不限</el-radio>
|
|
|
+ <el-radio label="0-2">近两天内</el-radio>
|
|
|
+ <el-radio label="2-5">2-5天内</el-radio>
|
|
|
+ <el-radio label="5-7">2-5天内</el-radio>
|
|
|
+ <el-radio label="7-15">7-15天内</el-radio>
|
|
|
+ <el-radio label="15-30">15-30天内</el-radio>
|
|
|
+ <el-radio label="custom">自定义</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ <el-tooltip placement="top">
|
|
|
+ <template #content>
|
|
|
+ <span>可自主选择用户最近阅读日期范围,只填写左侧输入框即为距离今天n天前(包含n天),只填写右侧输入框即为距离今天n天以内(包含n天)</span> <br />
|
|
|
+ </template>
|
|
|
+ <el-icon>
|
|
|
+ <InfoFilled />
|
|
|
+ </el-icon>
|
|
|
+ </el-tooltip>
|
|
|
+ </div>
|
|
|
+ <div v-if="formCallback.tags.register_day == 'custom'" class="flex">
|
|
|
+ <div class="flex flex-col">
|
|
|
+ <el-input style="width:150px;margin:0 5px;" :min="0"
|
|
|
+ v-model.number="formCallback._tags.register_day.min" type="number">
|
|
|
+ <template #append>天</template>
|
|
|
+ </el-input>
|
|
|
+ </div>
|
|
|
+ <span>—</span>
|
|
|
+ <div class="flex flex-col">
|
|
|
+ <el-input style="width:150px;margin:0 5px;" :min="formCallback?._tags?.register_day?.min ?? 0"
|
|
|
+ v-model.number="formCallback._tags.register_day.max" :max="30" type="number">
|
|
|
+ <template #append>天</template>
|
|
|
+ </el-input>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="累计观看天数" label-width="120px" :rules="[{ required: false, message: '' }]">
|
|
|
+ <div class="flex items-center mb-3 mr-3">
|
|
|
+ <el-radio-group v-model="formCallback.tags.total_watch_day">
|
|
|
+ <el-radio label="">不限</el-radio>
|
|
|
+ <el-radio label="0-2">近两天内</el-radio>
|
|
|
+ <el-radio label="2-5">2-5天内</el-radio>
|
|
|
+ <el-radio label="5-7">2-5天内</el-radio>
|
|
|
+ <el-radio label="7-15">7-15天内</el-radio>
|
|
|
+ <el-radio label="15-30">15-30天内</el-radio>
|
|
|
+ <el-radio label="custom">自定义</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ <el-tooltip placement="top">
|
|
|
+ <template #content>
|
|
|
+ <span>可自主选择用户累计观看天数范围,只填写左侧输入框即为n天以上(包含n天),只填写右侧输入框即为n天以内(包含n天),自定义最大范围在30天以内</span> <br />
|
|
|
+ </template>
|
|
|
+ <el-icon>
|
|
|
+ <InfoFilled />
|
|
|
+ </el-icon>
|
|
|
+ </el-tooltip>
|
|
|
+ </div>
|
|
|
+ <div v-if="formCallback.tags.total_watch_day == 'custom'" class="flex">
|
|
|
+ <div class="flex flex-col">
|
|
|
+ <el-input style="width:150px;margin:0 5px;" :min="0"
|
|
|
+ v-model.number="formCallback._tags.total_watch_day.min" type="number">
|
|
|
+ <template #append>天</template>
|
|
|
+ </el-input>
|
|
|
+ </div>
|
|
|
+ <span>—</span>
|
|
|
+ <div class="flex flex-col">
|
|
|
+ <el-input style="width:150px;margin:0 5px;" :min="formCallback?._tags?.total_watch_day?.min ?? 0"
|
|
|
+ v-model.number="formCallback._tags.total_watch_day.max" :max="30" type="number">
|
|
|
+ <template #append>天</template>
|
|
|
+ </el-input>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-form-item>
|
|
|
+ </el-tab-pane>
|
|
|
+ <el-tab-pane label="付费信息">
|
|
|
+ <el-form-item label="付费情况" label-width="120px" :rules="[{ required: false, message: '' }]">
|
|
|
+ <div class="flex items-center mb-3 mr-3">
|
|
|
+ <el-radio-group v-model="formCallback.tags.charge_type">
|
|
|
+ <el-radio label="">不限</el-radio>
|
|
|
+ <el-radio :label="1">未付费</el-radio>
|
|
|
+ <el-radio :label="2">待支付</el-radio>
|
|
|
+ <el-radio :label="3">已付费</el-radio>
|
|
|
+ <el-radio :label="4">vip用户</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </div>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="累计充值金额" label-width="120px" :rules="[{ required: false, message: '' }]">
|
|
|
+ <div class="flex items-center mb-3 mr-3">
|
|
|
+ <el-radio-group v-model="formCallback.tags.total_charge_money">
|
|
|
+ <el-radio label="">不限</el-radio>
|
|
|
+ <el-radio label="custom">自定义</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ <el-tooltip placement="top">
|
|
|
+ <template #content>
|
|
|
+ <span>可自主选择用户累计充值金额范围,只填写左侧输入框即为n元以上(包含n元),只填写右侧输入框即为n元以内(包含n元),左右输入框一致即为n元</span> <br />
|
|
|
+ </template>
|
|
|
+ <el-icon>
|
|
|
+ <InfoFilled />
|
|
|
+ </el-icon>
|
|
|
+ </el-tooltip>
|
|
|
+ </div>
|
|
|
+ <div v-if="formCallback.tags.total_charge_money == 'custom'" class="flex">
|
|
|
+ <div class="flex flex-col">
|
|
|
+ <el-input style="width:150px;margin:0 5px;" :min="0"
|
|
|
+ v-model.number="formCallback._tags.total_charge_money.min" type="number">
|
|
|
+ <template #append>元</template>
|
|
|
+ </el-input>
|
|
|
+ </div>
|
|
|
+ <span>—</span>
|
|
|
+ <div class="flex flex-col">
|
|
|
+ <el-input style="width:150px;margin:0 5px;" :min="formCallback?._tags?.total_charge_money?.min ?? 0"
|
|
|
+ v-model.number="formCallback._tags.total_charge_money.max" type="number">
|
|
|
+ <template #append>元</template>
|
|
|
+ </el-input>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="平均充值金额" label-width="120px" :rules="[{ required: false, message: '' }]">
|
|
|
+ <div class="flex items-center mb-3 mr-3">
|
|
|
+ <el-radio-group v-model="formCallback.tags.avg_charge_money">
|
|
|
+ <el-radio label="">不限</el-radio>
|
|
|
+ <el-radio label="custom">自定义</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ <el-tooltip placement="top">
|
|
|
+ <template #content>
|
|
|
+ <span>可自主选择用户累计充值金额范围,只填写左侧输入框即为n元以上(包含n元),只填写右侧输入框即为n元以内(包含n元),左右输入框一致即为n元</span> <br />
|
|
|
+ </template>
|
|
|
+ <el-icon>
|
|
|
+ <InfoFilled />
|
|
|
+ </el-icon>
|
|
|
+ </el-tooltip>
|
|
|
+ </div>
|
|
|
+ <div v-if="formCallback.tags.avg_charge_money == 'custom'" class="flex">
|
|
|
+ <div class="flex flex-col">
|
|
|
+ <el-input style="width:150px;margin:0 5px;" :min="0"
|
|
|
+ v-model.number="formCallback._tags.avg_charge_money.min" type="number">
|
|
|
+ <template #append>元</template>
|
|
|
+ </el-input>
|
|
|
+ </div>
|
|
|
+ <span>—</span>
|
|
|
+ <div class="flex flex-col">
|
|
|
+ <el-input style="width:150px;margin:0 5px;" :min="formCallback?._tags?.avg_charge_money?.min ?? 0"
|
|
|
+ v-model.number="formCallback._tags.avg_charge_money.max" type="number">
|
|
|
+ <template #append>元</template>
|
|
|
+ </el-input>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="充值次数" label-width="120px" :rules="[{ required: false, message: '' }]">
|
|
|
+ <div class="flex items-center mb-3 mr-3">
|
|
|
+ <el-radio-group v-model="formCallback.tags.charge_num">
|
|
|
+ <el-radio label="">不限</el-radio>
|
|
|
+ <el-radio label="0-0">0次</el-radio>
|
|
|
+ <el-radio label="1-1">1次</el-radio>
|
|
|
+ <el-radio label="3-3">3次</el-radio>
|
|
|
+ <el-radio label="5-5">5次</el-radio>
|
|
|
+ <el-radio label="10-0">10次以上</el-radio>
|
|
|
+ <el-radio label="custom">自定义</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ <el-tooltip placement="top">
|
|
|
+ <template #content>
|
|
|
+ <span>可自主选择用户充值次数范围,只填写左侧输入框即为n次以上(包含n次),只填写右侧输入框即为n次(包含n次)以内,左右输入框一致即为n次</span> <br />
|
|
|
+ </template>
|
|
|
+ <el-icon>
|
|
|
+ <InfoFilled />
|
|
|
+ </el-icon>
|
|
|
+ </el-tooltip>
|
|
|
+ </div>
|
|
|
+ <div v-if="formCallback.tags.charge_num == 'custom'" class="flex">
|
|
|
+ <div class="flex flex-col">
|
|
|
+ <el-input style="width:150px;margin:0 5px;" :min="0" v-model.number="formCallback._tags.charge_num.min"
|
|
|
+ type="number">
|
|
|
+ <template #append>次</template>
|
|
|
+ </el-input>
|
|
|
+ </div>
|
|
|
+ <span>—</span>
|
|
|
+ <div class="flex flex-col">
|
|
|
+ <el-input style="width:150px;margin:0 5px;" :min="formCallback?._tags?.charge_num?.min ?? 0"
|
|
|
+ v-model.number="formCallback._tags.charge_num.max" type="number">
|
|
|
+ <template #append>次</template>
|
|
|
+ </el-input>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="看币余额" label-width="120px" :rules="[{ required: false, message: '' }]">
|
|
|
+ <div class="flex items-center mb-3 mr-3">
|
|
|
+ <el-radio-group v-model="formCallback.tags.remain_coin">
|
|
|
+ <el-radio label="">不限</el-radio>
|
|
|
+ <el-radio label="custom">自定义</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ <el-tooltip placement="top">
|
|
|
+ <template #content>
|
|
|
+ <span>可自主选择用户书币余额范围,只填写左侧输入框即为n书币以上(包含n书币),只填写右侧输入框即为n书币以内(包含n书币),左右输入框一致即为n书币</span> <br />
|
|
|
+ </template>
|
|
|
+ <el-icon>
|
|
|
+ <InfoFilled />
|
|
|
+ </el-icon>
|
|
|
+ </el-tooltip>
|
|
|
+ </div>
|
|
|
+ <div v-if="formCallback.tags.remain_coin == 'custom'" class="flex">
|
|
|
+ <div class="flex flex-col">
|
|
|
+ <el-input style="width:150px;margin:0 5px;" :min="0" v-model.number="formCallback._tags.remain_coin.min"
|
|
|
+ type="number">
|
|
|
+ <template #append>元</template>
|
|
|
+ </el-input>
|
|
|
+ </div>
|
|
|
+ <span>—</span>
|
|
|
+ <div class="flex flex-col">
|
|
|
+ <el-input style="width:150px;margin:0 5px;" :min="formCallback?._tags?.remain_coin?.min ?? 0"
|
|
|
+ v-model.number="formCallback._tags.remain_coin.max" type="number">
|
|
|
+ <template #append>元</template>
|
|
|
+ </el-input>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="上次充值日期" label-width="120px" :rules="[{ required: false, message: '' }]">
|
|
|
+ <div class="flex items-center mb-3 mr-3">
|
|
|
+ <el-radio-group v-model="formCallback.tags.last_charge_day">
|
|
|
+ <el-radio label="">不限</el-radio>
|
|
|
+ <el-radio label="0-2">近两天内</el-radio>
|
|
|
+ <el-radio label="2-5">2-5天内</el-radio>
|
|
|
+ <el-radio label="5-7">2-5天内</el-radio>
|
|
|
+ <el-radio label="7-15">7-15天内</el-radio>
|
|
|
+ <el-radio label="15-30">15-30天内</el-radio>
|
|
|
+ <el-radio label="custom">自定义</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ <el-tooltip placement="top">
|
|
|
+ <template #content>
|
|
|
+ <span>可自主选择用户上次充值日期范围,只填写左侧输入框即为距离今天n天前(包含n天),只填写右侧输入框即为距离今天n天以内(包含n天)</span> <br />
|
|
|
+ </template>
|
|
|
+ <el-icon>
|
|
|
+ <InfoFilled />
|
|
|
+ </el-icon>
|
|
|
+ </el-tooltip>
|
|
|
+ </div>
|
|
|
+ <div v-if="formCallback.tags.last_charge_day == 'custom'" class="flex">
|
|
|
+ <div class="flex flex-col">
|
|
|
+ <el-input style="width:150px;margin:0 5px;" :min="0"
|
|
|
+ v-model.number="formCallback._tags.last_charge_day.min" type="number">
|
|
|
+ <template #append>h</template>
|
|
|
+ </el-input>
|
|
|
+ </div>
|
|
|
+ <span>—</span>
|
|
|
+ <div class="flex flex-col">
|
|
|
+ <el-input style="width:150px;margin:0 5px;" :min="formCallback?._tags?.last_charge_day?.min ?? 0"
|
|
|
+ v-model.number="formCallback._tags.last_charge_day.max" :max="30" type="number">
|
|
|
+ <template #append>h</template>
|
|
|
+ </el-input>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-form-item>
|
|
|
+ </el-tab-pane>
|
|
|
+ </el-tabs>
|
|
|
+ </div>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="历史观看的短剧" prop="video_watch" label-width="130px"
|
|
|
+ :rules="[{ required: false, message: '请选择历史观看的短剧' }]">
|
|
|
+ <el-select v-model="formCallback.video_watch" class="w-full" multiple clearable filterable remote
|
|
|
+ :remote-method="remoteMethod" placeholder="请选择历史观看的短剧">
|
|
|
+ <el-option v-for="item in videoList" :key="item.id" :label="item.name" :value="item.id" />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="充值过的短剧" prop="video_charge" label-width="130px"
|
|
|
+ :rules="[{ required: false, message: '请选择充值过的短剧' }]">
|
|
|
+ <el-select v-model="formCallback.video_charge" multiple class="w-full" clearable filterable remote
|
|
|
+ :remote-method="remoteMethod" placeholder="请选择充值过的短剧">
|
|
|
+ <el-option v-for="item in videoList" :key="item.id" :label="item.name" :value="item.id" />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="备注" prop="remark" :rules="[{ required: false, message: '备注必须填写' }]" label-width="130px">
|
|
|
+ <el-input v-model="formCallback.remark" auto-complete="off" type="textarea" placeholder="请输入备注"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <div class="flex justify-end">
|
|
|
+ <el-button type="primary" @click="submitForm(form)">{{
|
|
|
+ $t('system.confirm')
|
|
|
+ }}</el-button>
|
|
|
+ </div>
|
|
|
+ </el-form>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script lang="ts" setup>
|
|
|
+import { Delete, InfoFilled } from '@element-plus/icons-vue';
|
|
|
+import { validation } from './validation'
|
|
|
+import configPublicPlus from '@/views/officialAccount/components/configPublicPlus.vue'
|
|
|
+import { videoStockVideoList } from '@/api/video/index'
|
|
|
+import { FormInstance } from 'element-plus';
|
|
|
+import { useRouter, useRoute } from 'vue-router'
|
|
|
+import { audienceManageUserGroupAdd } from '@/api/customer/segment/index'
|
|
|
+const router = useRouter()
|
|
|
+const route = useRoute()
|
|
|
+const props = defineProps({
|
|
|
+ primary: Object | null,
|
|
|
+});
|
|
|
+const videoList = ref([])
|
|
|
+const emit = defineEmits(['close']);
|
|
|
+const loading = ref(false)
|
|
|
+const form = ref<FormInstance>()
|
|
|
+const promotion = ref<string | null | number>('')
|
|
|
+const formCallback = ref({
|
|
|
+ name: '',
|
|
|
+ remark: '',
|
|
|
+ gzh_ids: [],
|
|
|
+ video_watch: [],
|
|
|
+ video_charge: [],
|
|
|
+ tags: {
|
|
|
+ in_48_hour: 1,
|
|
|
+ charge_type: '',
|
|
|
+ attention_hour: '',
|
|
|
+ interact_hour: '',
|
|
|
+ last_watch_day: '',
|
|
|
+ register_day: '',
|
|
|
+ total_watch_day: '',
|
|
|
+ total_charge_money: '',
|
|
|
+ avg_charge_money: '',
|
|
|
+ charge_num: '',
|
|
|
+ remain_coin: '',
|
|
|
+ last_charge_day: '',
|
|
|
+ },
|
|
|
+ _tags: {
|
|
|
+ attention_hour: {},
|
|
|
+ interact_hour: {},
|
|
|
+ last_watch_day: {},
|
|
|
+ register_day: {},
|
|
|
+ total_watch_day: {},
|
|
|
+ total_charge_money: {},
|
|
|
+ avg_charge_money: {},
|
|
|
+ charge_num: {},
|
|
|
+ remain_coin: {},
|
|
|
+ last_charge_day: {},
|
|
|
+ }
|
|
|
+})
|
|
|
+const configPublicChange = (e: any) => {
|
|
|
+ console.log(e, 'configPublicChangeconfigPublicChange');
|
|
|
+ formCallback.value.gzh_ids = e
|
|
|
+}
|
|
|
+const initVideoList = (params?: object) => {
|
|
|
+ videoStockVideoList({ limit: 999, ...params }).then(res => {
|
|
|
+ console.log(res);
|
|
|
+ videoList.value = res.data
|
|
|
+ })
|
|
|
+}
|
|
|
+const remoteMethod = (query: string) => {
|
|
|
+ if (query) {
|
|
|
+ initVideoList({ videoName: query })
|
|
|
+ } else {
|
|
|
+ initVideoList()
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+// 提交回传配置
|
|
|
+const submitForm = (formEl: FormInstance | undefined) => {
|
|
|
+ if (!formEl) return;
|
|
|
+ loading.value = true;
|
|
|
+ if (!formEl) return;
|
|
|
+ formEl
|
|
|
+ .validate(valid => {
|
|
|
+ if (valid) {
|
|
|
+ if (!validation(formCallback.value)) return loading.value = false;
|
|
|
+ console.log(formCallback.value, 'formCallback.value');
|
|
|
+ let params = {
|
|
|
+ name: formCallback.value.name,
|
|
|
+ remark: formCallback.value.remark,
|
|
|
+ gzh_ids: formCallback.value.gzh_ids,
|
|
|
+ tags: {
|
|
|
+ attention_hour: formCallback.value?.tags?.attention_hour,
|
|
|
+ in_48_hour: formCallback.value?.tags?.in_48_hour,
|
|
|
+ interact_hour: formCallback.value?.tags?.interact_hour,
|
|
|
+ last_watch_day: formCallback.value?.tags?.last_watch_day,
|
|
|
+ register_day: formCallback.value?.tags?.register_day,
|
|
|
+ total_watch_day: formCallback.value?.tags?.total_watch_day,
|
|
|
+ charge_type: formCallback.value?.tags?.charge_type,
|
|
|
+ total_charge_money: formCallback.value?.tags?.total_charge_money,
|
|
|
+ avg_charge_money: formCallback.value?.tags?.avg_charge_money,
|
|
|
+ charge_num: formCallback.value?.tags?.charge_num,
|
|
|
+ remain_coin: formCallback.value?.tags?.remain_coin,
|
|
|
+ last_charge_day: formCallback.value?.tags?.last_charge_day,
|
|
|
+ video_watch: formCallback.value.video_watch,
|
|
|
+ video_charge: formCallback.value.video_charge,
|
|
|
+ }
|
|
|
+ }
|
|
|
+ audienceManageUserGroupAdd(params).then(res => {
|
|
|
+ console.log(res, 'audienceManageUserGroupAdd');
|
|
|
+ ElMessage.success(res.message)
|
|
|
+ loading.value = false;
|
|
|
+ emit('close')
|
|
|
+ }).catch(e => {
|
|
|
+ loading.value = false;
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ loading.value = false;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .then(() => { });
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+if (props.primary) {
|
|
|
+ formCallback.value = JSON.parse(JSON.stringify(props.primary))
|
|
|
+}
|
|
|
+onMounted(() => {
|
|
|
+ initVideoList()
|
|
|
+});
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="scss" scoped>
|
|
|
+:deep(.small-title) {
|
|
|
+ font-size: 10px;
|
|
|
+ color: grey;
|
|
|
+}
|
|
|
+
|
|
|
+:deep(.el-radio-group) {
|
|
|
+ flex-wrap: nowrap;
|
|
|
+}
|
|
|
+</style>
|