|
@@ -44,7 +44,7 @@
|
|
|
<span>{{ parseTime(scope.row.createTime) }}</span>
|
|
<span>{{ parseTime(scope.row.createTime) }}</span>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
- <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="360" fixed="right">
|
|
|
|
|
|
|
+ <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="420" fixed="right">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
<el-button
|
|
<el-button
|
|
|
size="mini"
|
|
size="mini"
|
|
@@ -76,6 +76,12 @@
|
|
|
icon="el-icon-delete"
|
|
icon="el-icon-delete"
|
|
|
@click="handleDelete(scope.row)"
|
|
@click="handleDelete(scope.row)"
|
|
|
>删除</el-button>
|
|
>删除</el-button>
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ size="mini"
|
|
|
|
|
+ type="text"
|
|
|
|
|
+ icon="el-icon-link"
|
|
|
|
|
+ @click="handleGenerateUrl(scope.row)"
|
|
|
|
|
+ >生成投放url</el-button>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
</el-table>
|
|
</el-table>
|
|
@@ -98,6 +104,40 @@
|
|
|
:disabled="isDetail"
|
|
:disabled="isDetail"
|
|
|
/>
|
|
/>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
+ <el-form-item label="渠道" prop="channelId">
|
|
|
|
|
+ <el-select
|
|
|
|
|
+ v-model="form.channelId"
|
|
|
|
|
+ placeholder="请选择渠道"
|
|
|
|
|
+ style="width: 100%"
|
|
|
|
|
+ filterable
|
|
|
|
|
+ @change="handleChannelChange"
|
|
|
|
|
+ :disabled="isDetail"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-option
|
|
|
|
|
+ v-for="item in channelList"
|
|
|
|
|
+ :key="item.id"
|
|
|
|
|
+ :label="item.channelName"
|
|
|
|
|
+ :value="item.id"
|
|
|
|
|
+ />
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item label="项目" prop="projectId">
|
|
|
|
|
+ <el-select
|
|
|
|
|
+ v-model="form.projectId"
|
|
|
|
|
+ placeholder="请选择项目"
|
|
|
|
|
+ style="width: 100%"
|
|
|
|
|
+ filterable
|
|
|
|
|
+ @change="handleProjectChange"
|
|
|
|
|
+ :disabled="isDetail"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-option
|
|
|
|
|
+ v-for="item in projectList"
|
|
|
|
|
+ :key="item.id"
|
|
|
|
|
+ :label="item.projectName"
|
|
|
|
|
+ :value="item.id"
|
|
|
|
|
+ />
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ </el-form-item>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<!-- 投放配置 -->
|
|
<!-- 投放配置 -->
|
|
@@ -138,6 +178,65 @@
|
|
|
/>
|
|
/>
|
|
|
</el-select>
|
|
</el-select>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 企微分配规则 -->
|
|
|
|
|
+ <el-form-item label="企微分配规则" prop="allocationRule">
|
|
|
|
|
+ <el-radio-group v-model="form.allocationRule" @change="handleAllocationRuleChange" :disabled="isDetail">
|
|
|
|
|
+ <el-radio
|
|
|
|
|
+ label="1"
|
|
|
|
|
+ :border="true"
|
|
|
|
|
+ >个人码分配</el-radio>
|
|
|
|
|
+ <el-radio
|
|
|
|
|
+ label="0"
|
|
|
|
|
+ :border="true"
|
|
|
|
|
+ >活码分配</el-radio>
|
|
|
|
|
+ </el-radio-group>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 根据选择的分配规则显示不同的下拉框 -->
|
|
|
|
|
+ <el-form-item
|
|
|
|
|
+ v-if="form.allocationRule === '1'"
|
|
|
|
|
+ label="企业微信"
|
|
|
|
|
+ prop="allocationRuleId"
|
|
|
|
|
+ class="slide-fade"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-select
|
|
|
|
|
+ v-model="form.allocationRuleId"
|
|
|
|
|
+ placeholder="请选择企业微信"
|
|
|
|
|
+ style="width: 100%"
|
|
|
|
|
+ filterable
|
|
|
|
|
+ :disabled="isDetail"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-option
|
|
|
|
|
+ v-for="item in allocationRuleList"
|
|
|
|
|
+ :key="item.id"
|
|
|
|
|
+ :label="item.allocationRuleName"
|
|
|
|
|
+ :value="item.id"
|
|
|
|
|
+ />
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+
|
|
|
|
|
+ <el-form-item
|
|
|
|
|
+ v-if="form.allocationRule === '0'"
|
|
|
|
|
+ label="群活码"
|
|
|
|
|
+ prop="allocationRuleId"
|
|
|
|
|
+ class="slide-fade"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-select
|
|
|
|
|
+ v-model="form.allocationRuleId"
|
|
|
|
|
+ placeholder="请选择群活码"
|
|
|
|
|
+ style="width: 100%"
|
|
|
|
|
+ filterable
|
|
|
|
|
+ :disabled="isDetail"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-option
|
|
|
|
|
+ v-for="item in groupActiveList"
|
|
|
|
|
+ :key="item.id"
|
|
|
|
|
+ :label="item.groupActiveName"
|
|
|
|
|
+ :value="item.id"
|
|
|
|
|
+ />
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ </el-form-item>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<!-- 广告商信息 -->
|
|
<!-- 广告商信息 -->
|
|
@@ -347,6 +446,12 @@
|
|
|
<span v-else-if="detail.distributeType === 2">自动分配</span>
|
|
<span v-else-if="detail.distributeType === 2">自动分配</span>
|
|
|
<span v-else>-</span>
|
|
<span v-else>-</span>
|
|
|
</el-descriptions-item>
|
|
</el-descriptions-item>
|
|
|
|
|
+ <el-descriptions-item label="一级分配规则">
|
|
|
|
|
+ <span v-if="detail.allocationRule === '1'">选择员工"个人码"分配规则</span>
|
|
|
|
|
+ <span v-else-if="detail.allocationRule === '0'">选择员工"活码"分配规则</span>
|
|
|
|
|
+ <span v-else>-</span>
|
|
|
|
|
+ </el-descriptions-item>
|
|
|
|
|
+ <el-descriptions-item label="二级分配汇总">{{ detail.allocationRuleId || '-' }}</el-descriptions-item>
|
|
|
<el-descriptions-item label="分配规则">{{ detail.distributeRule || '-' }}</el-descriptions-item>
|
|
<el-descriptions-item label="分配规则">{{ detail.distributeRule || '-' }}</el-descriptions-item>
|
|
|
<el-descriptions-item label="来源名称">{{ detail.sourceName || '-' }}</el-descriptions-item>
|
|
<el-descriptions-item label="来源名称">{{ detail.sourceName || '-' }}</el-descriptions-item>
|
|
|
<el-descriptions-item label="项目名称">{{ detail.projectName || '-' }}</el-descriptions-item>
|
|
<el-descriptions-item label="项目名称">{{ detail.projectName || '-' }}</el-descriptions-item>
|
|
@@ -390,6 +495,40 @@
|
|
|
<el-button @click="statisticsOpen = false">关 闭</el-button>
|
|
<el-button @click="statisticsOpen = false">关 闭</el-button>
|
|
|
</div>
|
|
</div>
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 生成投放url对话框 -->
|
|
|
|
|
+ <el-dialog title="生成投放url" :visible.sync="urlDialogOpen" width="500px" append-to-body>
|
|
|
|
|
+ <el-form label-width="100px">
|
|
|
|
|
+ <el-form-item label="投放链接">
|
|
|
|
|
+ <div class="url-container">
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ v-model="launchUrl"
|
|
|
|
|
+ readonly
|
|
|
|
|
+ class="url-input"
|
|
|
|
|
+ />
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ type="primary"
|
|
|
|
|
+ size="small"
|
|
|
|
|
+ icon="el-icon-document-copy"
|
|
|
|
|
+ @click="copyUrl"
|
|
|
|
|
+ >复制</el-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item label="二维码">
|
|
|
|
|
+ <div id="qrcode" class="qrcode-container"></div>
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ type="primary"
|
|
|
|
|
+ size="small"
|
|
|
|
|
+ icon="el-icon-download"
|
|
|
|
|
+ @click="downloadQrcode"
|
|
|
|
|
+ style="margin-top: 10px;"
|
|
|
|
|
+ >下载</el-button>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-form>
|
|
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
|
|
+ <el-button @click="urlDialogOpen = false">关 闭</el-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -398,9 +537,14 @@ import { listSite, getSite, addSite, updateSite, delSite, getSiteStatistics, ena
|
|
|
import { pageAdvertiser } from "@/api/adv/advertiser";
|
|
import { pageAdvertiser } from "@/api/adv/advertiser";
|
|
|
import { pagePromotionAccount } from "@/api/adv/promotionAccount";
|
|
import { pagePromotionAccount } from "@/api/adv/promotionAccount";
|
|
|
import { pageTemplate } from "@/api/adv/landingPageTemplate";
|
|
import { pageTemplate } from "@/api/adv/landingPageTemplate";
|
|
|
|
|
+import QRCode from 'qrcode';
|
|
|
|
|
|
|
|
import { pageCallbackAccount, getCallbackAccount, queryEventType, saveEventType } from "@/api/adv/callbackAccount";
|
|
import { pageCallbackAccount, getCallbackAccount, queryEventType, saveEventType } from "@/api/adv/callbackAccount";
|
|
|
import { pageDomain } from "@/api/adv/domain";
|
|
import { pageDomain } from "@/api/adv/domain";
|
|
|
|
|
+import { pageProject as pageChannel } from "@/api/adv/channel";
|
|
|
|
|
+import { pageProject } from "@/api/adv/project";
|
|
|
|
|
+import { listAllocationRule } from "@/api/qw/allocationRule";
|
|
|
|
|
+import { listGroupActive } from "@/api/qw/groupActive";
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
name: "Site",
|
|
name: "Site",
|
|
@@ -446,17 +590,28 @@ export default {
|
|
|
promotionAccountList: [],
|
|
promotionAccountList: [],
|
|
|
// 落地页模板列表
|
|
// 落地页模板列表
|
|
|
landingPageTemplateList: [],
|
|
landingPageTemplateList: [],
|
|
|
-
|
|
|
|
|
|
|
+ // 企业微信分配规则列表
|
|
|
|
|
+ allocationRuleList: [],
|
|
|
|
|
+ // 群活码列表
|
|
|
|
|
+ groupActiveList: [],
|
|
|
// 回传账号列表
|
|
// 回传账号列表
|
|
|
callbackAccountList: [],
|
|
callbackAccountList: [],
|
|
|
// 投放域名列表
|
|
// 投放域名列表
|
|
|
launchDomainList: [],
|
|
launchDomainList: [],
|
|
|
|
|
+ // 渠道列表
|
|
|
|
|
+ channelList: [],
|
|
|
|
|
+ // 项目列表
|
|
|
|
|
+ projectList: [],
|
|
|
// 转换事件列表
|
|
// 转换事件列表
|
|
|
conversionEvents: [],
|
|
conversionEvents: [],
|
|
|
// 广告商事件选项(systemBuiltin='0')
|
|
// 广告商事件选项(systemBuiltin='0')
|
|
|
advertiserEventOptions: [],
|
|
advertiserEventOptions: [],
|
|
|
// 系统事件选项(systemBuiltin='1')
|
|
// 系统事件选项(systemBuiltin='1')
|
|
|
systemEventOptions: [],
|
|
systemEventOptions: [],
|
|
|
|
|
+ // 生成url对话框
|
|
|
|
|
+ urlDialogOpen: false,
|
|
|
|
|
+ // 投放链接
|
|
|
|
|
+ launchUrl: "",
|
|
|
// 表单校验
|
|
// 表单校验
|
|
|
rules: {
|
|
rules: {
|
|
|
siteName: [
|
|
siteName: [
|
|
@@ -533,14 +688,21 @@ export default {
|
|
|
promotionAccountName: undefined,
|
|
promotionAccountName: undefined,
|
|
|
launchPageId: undefined,
|
|
launchPageId: undefined,
|
|
|
launchPageName: undefined,
|
|
launchPageName: undefined,
|
|
|
-
|
|
|
|
|
|
|
+ projectId: undefined,
|
|
|
|
|
+ projectName: undefined,
|
|
|
|
|
+ channelId: undefined,
|
|
|
|
|
+ channelName: undefined,
|
|
|
launchDomain: undefined,
|
|
launchDomain: undefined,
|
|
|
configCallback: 0,
|
|
configCallback: 0,
|
|
|
callbackAccountId: undefined,
|
|
callbackAccountId: undefined,
|
|
|
- callbackAccountName: undefined
|
|
|
|
|
|
|
+ callbackAccountName: undefined,
|
|
|
|
|
+ allocationRule: undefined,
|
|
|
|
|
+ allocationRuleId: undefined
|
|
|
};
|
|
};
|
|
|
this.promotionAccountList = [];
|
|
this.promotionAccountList = [];
|
|
|
this.launchDomainList = [];
|
|
this.launchDomainList = [];
|
|
|
|
|
+ this.allocationRuleList = [];
|
|
|
|
|
+ this.groupActiveList = [];
|
|
|
this.conversionEvents = [];
|
|
this.conversionEvents = [];
|
|
|
this.advertiserEventOptions = [];
|
|
this.advertiserEventOptions = [];
|
|
|
this.systemEventOptions = [];
|
|
this.systemEventOptions = [];
|
|
@@ -580,6 +742,14 @@ export default {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ // 如果服务持了批釋规则,加载对应的新批釋数据
|
|
|
|
|
+ if (this.form.allocationRule) {
|
|
|
|
|
+ if (this.form.allocationRule === '1') {
|
|
|
|
|
+ this.loadAllocationRuleList();
|
|
|
|
|
+ } else if (this.form.allocationRule === '0') {
|
|
|
|
|
+ this.loadGroupActiveList();
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
this.open = true;
|
|
this.open = true;
|
|
|
this.title = "修改站点";
|
|
this.title = "修改站点";
|
|
|
});
|
|
});
|
|
@@ -659,7 +829,7 @@ export default {
|
|
|
this.msgSuccess("删除成功");
|
|
this.msgSuccess("删除成功");
|
|
|
}).catch(function() {});
|
|
}).catch(function() {});
|
|
|
},
|
|
},
|
|
|
- /** 启用/停用按钮操作 */
|
|
|
|
|
|
|
+ /** 启用/停用按鑵操作 */
|
|
|
handleEnable(row) {
|
|
handleEnable(row) {
|
|
|
const statusText = row.status === 1 ? '停用' : '启用';
|
|
const statusText = row.status === 1 ? '停用' : '启用';
|
|
|
this.$confirm(`是否确认${statusText}站点"${row.siteName}"?`, "提示", {
|
|
this.$confirm(`是否确认${statusText}站点"${row.siteName}"?`, "提示", {
|
|
@@ -673,6 +843,67 @@ export default {
|
|
|
this.msgSuccess(`${statusText}成功`);
|
|
this.msgSuccess(`${statusText}成功`);
|
|
|
}).catch(function() {});
|
|
}).catch(function() {});
|
|
|
},
|
|
},
|
|
|
|
|
+ /** 生成投放url */
|
|
|
|
|
+ handleGenerateUrl(row) {
|
|
|
|
|
+ this.launchUrl = row.siteUrl || '';
|
|
|
|
|
+ this.urlDialogOpen = true;
|
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
|
+ this.generateQrcode();
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ /** 生成二维码 */
|
|
|
|
|
+ generateQrcode() {
|
|
|
|
|
+ const qrcodeElement = document.getElementById('qrcode');
|
|
|
|
|
+ if (qrcodeElement) {
|
|
|
|
|
+ qrcodeElement.innerHTML = '';
|
|
|
|
|
+ // 创建 canvas 元素
|
|
|
|
|
+ const canvas = document.createElement('canvas');
|
|
|
|
|
+ QRCode.toCanvas(canvas, this.launchUrl, {
|
|
|
|
|
+ errorCorrectionLevel: 'H',
|
|
|
|
|
+ type: 'image/jpeg',
|
|
|
|
|
+ quality: 0.95,
|
|
|
|
|
+ margin: 1,
|
|
|
|
|
+ width: 200
|
|
|
|
|
+ }).then(() => {
|
|
|
|
|
+ qrcodeElement.appendChild(canvas);
|
|
|
|
|
+ }).catch(error => {
|
|
|
|
|
+ console.error('生成二维码失败:', error);
|
|
|
|
|
+ this.msgError('生成二维码失败');
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ /** 复制url */
|
|
|
|
|
+ copyUrl() {
|
|
|
|
|
+ if (!this.launchUrl) {
|
|
|
|
|
+ this.msgError('投放链接为空');
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ navigator.clipboard.writeText(this.launchUrl).then(() => {
|
|
|
|
|
+ this.msgSuccess('复制成功');
|
|
|
|
|
+ }).catch(() => {
|
|
|
|
|
+ // 平台不支持新API,改成传统方法
|
|
|
|
|
+ const textarea = document.createElement('textarea');
|
|
|
|
|
+ textarea.value = this.launchUrl;
|
|
|
|
|
+ document.body.appendChild(textarea);
|
|
|
|
|
+ textarea.select();
|
|
|
|
|
+ document.execCommand('copy');
|
|
|
|
|
+ document.body.removeChild(textarea);
|
|
|
|
|
+ this.msgSuccess('复制成功');
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ /** 下载二维码 */
|
|
|
|
|
+ downloadQrcode() {
|
|
|
|
|
+ const qrcodeCanvas = document.querySelector('#qrcode canvas');
|
|
|
|
|
+ if (qrcodeCanvas) {
|
|
|
|
|
+ const link = document.createElement('a');
|
|
|
|
|
+ link.href = qrcodeCanvas.toDataURL();
|
|
|
|
|
+ link.download = `qrcode_${new Date().getTime()}.png`;
|
|
|
|
|
+ link.click();
|
|
|
|
|
+ this.msgSuccess('下载成功');
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.msgError('没有找到二维码');
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
/** 加载下拉选项数据 */
|
|
/** 加载下拉选项数据 */
|
|
|
loadSelectOptions() {
|
|
loadSelectOptions() {
|
|
|
// 加载广告商列表(已废弃,改用loadAdvertiserList)
|
|
// 加载广告商列表(已废弃,改用loadAdvertiserList)
|
|
@@ -716,6 +947,22 @@ export default {
|
|
|
console.error('加载域名失败:', error);
|
|
console.error('加载域名失败:', error);
|
|
|
this.launchDomainList = [];
|
|
this.launchDomainList = [];
|
|
|
});
|
|
});
|
|
|
|
|
+
|
|
|
|
|
+ // 加载渠道列表
|
|
|
|
|
+ pageChannel({ pageNum: 1, pageSize: 1000 }).then(response => {
|
|
|
|
|
+ this.channelList = response.data.records || [];
|
|
|
|
|
+ }).catch(error => {
|
|
|
|
|
+ console.error('加载渠道列表失败:', error);
|
|
|
|
|
+ this.channelList = [];
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ // 加载项目列表
|
|
|
|
|
+ pageProject({ pageNum: 1, pageSize: 1000 }).then(response => {
|
|
|
|
|
+ this.projectList = response.data.records || [];
|
|
|
|
|
+ }).catch(error => {
|
|
|
|
|
+ console.error('加载项目列表失败:', error);
|
|
|
|
|
+ this.projectList = [];
|
|
|
|
|
+ });
|
|
|
},
|
|
},
|
|
|
/** 投放类型变化时 */
|
|
/** 投放类型变化时 */
|
|
|
handleLaunchTypeChange(launchType) {
|
|
handleLaunchTypeChange(launchType) {
|
|
@@ -735,6 +982,12 @@ export default {
|
|
|
this.advertiserEventOptions = [];
|
|
this.advertiserEventOptions = [];
|
|
|
this.systemEventOptions = [];
|
|
this.systemEventOptions = [];
|
|
|
|
|
|
|
|
|
|
+ // 重置企微分配规则相关数据
|
|
|
|
|
+ this.form.allocationRule = undefined;
|
|
|
|
|
+ this.form.allocationRuleId = undefined;
|
|
|
|
|
+ this.allocationRuleList = [];
|
|
|
|
|
+ this.groupActiveList = [];
|
|
|
|
|
+
|
|
|
// 根据投放类型加载广告商列表
|
|
// 根据投放类型加载广告商列表
|
|
|
if (launchType) {
|
|
if (launchType) {
|
|
|
this.loadAdvertiserList(launchType);
|
|
this.loadAdvertiserList(launchType);
|
|
@@ -815,6 +1068,30 @@ export default {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
+
|
|
|
|
|
+ /** 渠道变化时 */
|
|
|
|
|
+ handleChannelChange(channelId) {
|
|
|
|
|
+ this.form.channelName = "";
|
|
|
|
|
+
|
|
|
|
|
+ if (channelId) {
|
|
|
|
|
+ const channel = this.channelList.find(item => item.id === channelId);
|
|
|
|
|
+ if (channel) {
|
|
|
|
|
+ this.form.channelName = channel.channelName;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ /** 项目变化时 */
|
|
|
|
|
+ handleProjectChange(projectId) {
|
|
|
|
|
+ this.form.projectName = "";
|
|
|
|
|
+
|
|
|
|
|
+ if (projectId) {
|
|
|
|
|
+ const project = this.projectList.find(item => item.id === projectId);
|
|
|
|
|
+ if (project) {
|
|
|
|
|
+ this.form.projectName = project.projectName;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
|
|
|
/** 回传账号变化时 */
|
|
/** 回传账号变化时 */
|
|
|
handleCallbackAccountChange(callbackAccountId) {
|
|
handleCallbackAccountChange(callbackAccountId) {
|
|
@@ -842,6 +1119,12 @@ export default {
|
|
|
this.advertiserEventOptions = [];
|
|
this.advertiserEventOptions = [];
|
|
|
this.systemEventOptions = [];
|
|
this.systemEventOptions = [];
|
|
|
|
|
|
|
|
|
|
+ // 重置企微分配规则相关数据
|
|
|
|
|
+ this.form.allocationRule = undefined;
|
|
|
|
|
+ this.form.allocationRuleId = undefined;
|
|
|
|
|
+ this.allocationRuleList = [];
|
|
|
|
|
+ this.groupActiveList = [];
|
|
|
|
|
+
|
|
|
// 如果选择配置回传,且已选择广告商,加载回传账号列表
|
|
// 如果选择配置回传,且已选择广告商,加载回传账号列表
|
|
|
if (value === 1 && this.form.advertiserId) {
|
|
if (value === 1 && this.form.advertiserId) {
|
|
|
this.loadCallbackAccountList(this.form.advertiserId);
|
|
this.loadCallbackAccountList(this.form.advertiserId);
|
|
@@ -920,6 +1203,40 @@ export default {
|
|
|
this.conversionEvents[index].systemEventTypeName = event.eventName;
|
|
this.conversionEvents[index].systemEventTypeName = event.eventName;
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
+ /** 企微分配规则变化 */
|
|
|
|
|
+ handleAllocationRuleChange(allocationRule) {
|
|
|
|
|
+ // 重置需要加载的数据列表
|
|
|
|
|
+ this.form.allocationRuleId = undefined;
|
|
|
|
|
+ this.allocationRuleList = [];
|
|
|
|
|
+ this.groupActiveList = [];
|
|
|
|
|
+
|
|
|
|
|
+ // 根据不同的分配规则加载对应数据
|
|
|
|
|
+ if (allocationRule === '1') {
|
|
|
|
|
+ // 加载企业微信分配规则列表
|
|
|
|
|
+ this.loadAllocationRuleList();
|
|
|
|
|
+ } else if (allocationRule === '0') {
|
|
|
|
|
+ // 加载群活码列表
|
|
|
|
|
+ this.loadGroupActiveList();
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ /** 加载企业微信分配规则列表 */
|
|
|
|
|
+ loadAllocationRuleList() {
|
|
|
|
|
+ listAllocationRule().then(response => {
|
|
|
|
|
+ this.allocationRuleList = response.data || [];
|
|
|
|
|
+ }).catch(error => {
|
|
|
|
|
+ console.error('加载企业微信分配规则列表失败:', error);
|
|
|
|
|
+ this.allocationRuleList = [];
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ /** 加载群活码列表 */
|
|
|
|
|
+ loadGroupActiveList() {
|
|
|
|
|
+ listGroupActive().then(response => {
|
|
|
|
|
+ this.groupActiveList = response.data || [];
|
|
|
|
|
+ }).catch(error => {
|
|
|
|
|
+ console.error('加载群活码列表失败:', error);
|
|
|
|
|
+ this.groupActiveList = [];
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
/** 保存转换事件 */
|
|
/** 保存转换事件 */
|
|
|
saveConversionEvents() {
|
|
saveConversionEvents() {
|
|
|
// 调用保存接口
|
|
// 调用保存接口
|
|
@@ -1253,5 +1570,27 @@ export default {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+// 投放链接对话框样式
|
|
|
|
|
+.url-container {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ gap: 10px;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+
|
|
|
|
|
+ .url-input {
|
|
|
|
|
+ flex: 1;
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.qrcode-container {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ justify-content: center;
|
|
|
|
|
+ padding: 20px 0;
|
|
|
|
|
+
|
|
|
|
|
+ canvas {
|
|
|
|
|
+ border: 1px solid #e0e0e0;
|
|
|
|
|
+ border-radius: 4px;
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
</style>
|
|
</style>
|
|
|
|
|
|