|
@@ -181,7 +181,7 @@
|
|
|
|
|
|
|
|
<!-- 企微分配规则 -->
|
|
<!-- 企微分配规则 -->
|
|
|
<el-form-item label="企微分配规则" prop="allocationRule">
|
|
<el-form-item label="企微分配规则" prop="allocationRule">
|
|
|
- <el-radio-group v-model="form.allocationRule" @change="handleAllocationRuleChange" :disabled="isDetail">
|
|
|
|
|
|
|
+ <el-radio-group v-model="form.allocationRule" @change="handleAllocationRuleChange" :disabled="!form.launchType || isDetail">
|
|
|
<el-radio
|
|
<el-radio
|
|
|
label="1"
|
|
label="1"
|
|
|
:border="true"
|
|
:border="true"
|
|
@@ -210,7 +210,7 @@
|
|
|
<el-option
|
|
<el-option
|
|
|
v-for="item in allocationRuleList"
|
|
v-for="item in allocationRuleList"
|
|
|
:key="item.id"
|
|
:key="item.id"
|
|
|
- :label="item.allocationRuleName"
|
|
|
|
|
|
|
+ :label="item.ruleName"
|
|
|
:value="item.id"
|
|
:value="item.id"
|
|
|
/>
|
|
/>
|
|
|
</el-select>
|
|
</el-select>
|
|
@@ -218,21 +218,21 @@
|
|
|
|
|
|
|
|
<el-form-item
|
|
<el-form-item
|
|
|
v-if="form.allocationRule === '0'"
|
|
v-if="form.allocationRule === '0'"
|
|
|
- label="群活码"
|
|
|
|
|
|
|
+ :label="form.launchType === 1 ? '群活码' : '企业微信活码'"
|
|
|
prop="allocationRuleId"
|
|
prop="allocationRuleId"
|
|
|
class="slide-fade"
|
|
class="slide-fade"
|
|
|
>
|
|
>
|
|
|
<el-select
|
|
<el-select
|
|
|
v-model="form.allocationRuleId"
|
|
v-model="form.allocationRuleId"
|
|
|
- placeholder="请选择群活码"
|
|
|
|
|
|
|
+ :placeholder="form.launchType === 1 ? '请选择群活码' : '请选择企业微信活码'"
|
|
|
style="width: 100%"
|
|
style="width: 100%"
|
|
|
filterable
|
|
filterable
|
|
|
:disabled="isDetail"
|
|
:disabled="isDetail"
|
|
|
>
|
|
>
|
|
|
<el-option
|
|
<el-option
|
|
|
- v-for="item in groupActiveList"
|
|
|
|
|
|
|
+ v-for="item in form.launchType === 1 ? groupActiveList : contactWayList"
|
|
|
:key="item.id"
|
|
:key="item.id"
|
|
|
- :label="item.groupActiveName"
|
|
|
|
|
|
|
+ :label="form.launchType === 1 ? item.groupName : item.name"
|
|
|
:value="item.id"
|
|
:value="item.id"
|
|
|
/>
|
|
/>
|
|
|
</el-select>
|
|
</el-select>
|
|
@@ -543,8 +543,9 @@ import { pageCallbackAccount, getCallbackAccount, queryEventType, saveEventType
|
|
|
import { pageDomain } from "@/api/adv/domain";
|
|
import { pageDomain } from "@/api/adv/domain";
|
|
|
import { pageProject as pageChannel } from "@/api/adv/channel";
|
|
import { pageProject as pageChannel } from "@/api/adv/channel";
|
|
|
import { pageProject } from "@/api/adv/project";
|
|
import { pageProject } from "@/api/adv/project";
|
|
|
-import { listAllocationRule } from "@/api/qw/allocationRule";
|
|
|
|
|
-import { listGroupActive } from "@/api/qw/groupActual";
|
|
|
|
|
|
|
+import { pageAssignRule } from "@/api/qw/assignRule";
|
|
|
|
|
+import { pageGroupLiveCode } from "@/api/qw/groupLiveCode";
|
|
|
|
|
+import { listContactWay } from "@/api/qw/contactWay";
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
name: "Site",
|
|
name: "Site",
|
|
@@ -594,6 +595,8 @@ export default {
|
|
|
allocationRuleList: [],
|
|
allocationRuleList: [],
|
|
|
// 群活码列表
|
|
// 群活码列表
|
|
|
groupActiveList: [],
|
|
groupActiveList: [],
|
|
|
|
|
+ // 企业微信活码列表
|
|
|
|
|
+ contactWayList: [],
|
|
|
// 回传账号列表
|
|
// 回传账号列表
|
|
|
callbackAccountList: [],
|
|
callbackAccountList: [],
|
|
|
// 投放域名列表
|
|
// 投放域名列表
|
|
@@ -703,6 +706,7 @@ export default {
|
|
|
this.launchDomainList = [];
|
|
this.launchDomainList = [];
|
|
|
this.allocationRuleList = [];
|
|
this.allocationRuleList = [];
|
|
|
this.groupActiveList = [];
|
|
this.groupActiveList = [];
|
|
|
|
|
+ this.contactWayList = [];
|
|
|
this.conversionEvents = [];
|
|
this.conversionEvents = [];
|
|
|
this.advertiserEventOptions = [];
|
|
this.advertiserEventOptions = [];
|
|
|
this.systemEventOptions = [];
|
|
this.systemEventOptions = [];
|
|
@@ -982,16 +986,26 @@ export default {
|
|
|
this.advertiserEventOptions = [];
|
|
this.advertiserEventOptions = [];
|
|
|
this.systemEventOptions = [];
|
|
this.systemEventOptions = [];
|
|
|
|
|
|
|
|
- // 重置企微分配规则相关数据
|
|
|
|
|
|
|
+ // 重置企业微信分配规则相关数据
|
|
|
this.form.allocationRule = undefined;
|
|
this.form.allocationRule = undefined;
|
|
|
this.form.allocationRuleId = undefined;
|
|
this.form.allocationRuleId = undefined;
|
|
|
this.allocationRuleList = [];
|
|
this.allocationRuleList = [];
|
|
|
this.groupActiveList = [];
|
|
this.groupActiveList = [];
|
|
|
|
|
+ this.contactWayList = [];
|
|
|
|
|
|
|
|
// 根据投放类型加载广告商列表
|
|
// 根据投放类型加载广告商列表
|
|
|
if (launchType) {
|
|
if (launchType) {
|
|
|
this.loadAdvertiserList(launchType);
|
|
this.loadAdvertiserList(launchType);
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ // 根据投放类型重新加载活码数据(如果已选择活码分配)
|
|
|
|
|
+ if (this.form.allocationRule === '0') {
|
|
|
|
|
+ if (launchType === 1) {
|
|
|
|
|
+ this.loadGroupActiveList();
|
|
|
|
|
+ } else if (launchType === 2) {
|
|
|
|
|
+ this.loadContactWayList();
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
/** 加载广告商列表 */
|
|
/** 加载广告商列表 */
|
|
|
loadAdvertiserList(launchType) {
|
|
loadAdvertiserList(launchType) {
|
|
@@ -1209,20 +1223,29 @@ export default {
|
|
|
this.form.allocationRuleId = undefined;
|
|
this.form.allocationRuleId = undefined;
|
|
|
this.allocationRuleList = [];
|
|
this.allocationRuleList = [];
|
|
|
this.groupActiveList = [];
|
|
this.groupActiveList = [];
|
|
|
|
|
+ this.contactWayList = [];
|
|
|
|
|
|
|
|
// 根据不同的分配规则加载对应数据
|
|
// 根据不同的分配规则加载对应数据
|
|
|
if (allocationRule === '1') {
|
|
if (allocationRule === '1') {
|
|
|
// 加载企业微信分配规则列表
|
|
// 加载企业微信分配规则列表
|
|
|
this.loadAllocationRuleList();
|
|
this.loadAllocationRuleList();
|
|
|
} else if (allocationRule === '0') {
|
|
} else if (allocationRule === '0') {
|
|
|
- // 加载群活码列表
|
|
|
|
|
- this.loadGroupActiveList();
|
|
|
|
|
|
|
+ // 根据投放类型加载群活码或企业微信活码
|
|
|
|
|
+ if (this.form.launchType === 1) {
|
|
|
|
|
+ this.loadGroupActiveList();
|
|
|
|
|
+ } else if (this.form.launchType === 2) {
|
|
|
|
|
+ this.loadContactWayList();
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
/** 加载企业微信分配规则列表 */
|
|
/** 加载企业微信分配规则列表 */
|
|
|
loadAllocationRuleList() {
|
|
loadAllocationRuleList() {
|
|
|
- listAllocationRule().then(response => {
|
|
|
|
|
- this.allocationRuleList = response.data || [];
|
|
|
|
|
|
|
+ pageAssignRule({
|
|
|
|
|
+ pageNum: 1,
|
|
|
|
|
+ pageSize: 1000,
|
|
|
|
|
+ status: 1
|
|
|
|
|
+ }).then(response => {
|
|
|
|
|
+ this.allocationRuleList = response.data.records || [];
|
|
|
}).catch(error => {
|
|
}).catch(error => {
|
|
|
console.error('加载企业微信分配规则列表失败:', error);
|
|
console.error('加载企业微信分配规则列表失败:', error);
|
|
|
this.allocationRuleList = [];
|
|
this.allocationRuleList = [];
|
|
@@ -1230,13 +1253,27 @@ export default {
|
|
|
},
|
|
},
|
|
|
/** 加载群活码列表 */
|
|
/** 加载群活码列表 */
|
|
|
loadGroupActiveList() {
|
|
loadGroupActiveList() {
|
|
|
- listGroupActive().then(response => {
|
|
|
|
|
- this.groupActiveList = response.data || [];
|
|
|
|
|
|
|
+ pageGroupLiveCode({
|
|
|
|
|
+ pageNum: 1,
|
|
|
|
|
+ pageSize: 1000,
|
|
|
|
|
+ status: 1
|
|
|
|
|
+ }).then(response => {
|
|
|
|
|
+ this.groupActiveList = response.data.records || [];
|
|
|
}).catch(error => {
|
|
}).catch(error => {
|
|
|
console.error('加载群活码列表失败:', error);
|
|
console.error('加载群活码列表失败:', error);
|
|
|
this.groupActiveList = [];
|
|
this.groupActiveList = [];
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
|
|
+ /** 加载企业微信活码列表 */
|
|
|
|
|
+ loadContactWayList() {
|
|
|
|
|
+ // 调用/qw/contactWay/list接口获取企业微信活码数据
|
|
|
|
|
+ listContactWay().then(response => {
|
|
|
|
|
+ this.contactWayList = response.data || [];
|
|
|
|
|
+ }).catch(error => {
|
|
|
|
|
+ console.error('加载企业微信活码列表失败:', error);
|
|
|
|
|
+ this.contactWayList = [];
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
/** 保存转换事件 */
|
|
/** 保存转换事件 */
|
|
|
saveConversionEvents() {
|
|
saveConversionEvents() {
|
|
|
// 调用保存接口
|
|
// 调用保存接口
|