|
@@ -44,7 +44,11 @@
|
|
|
<a-button type="primary" @click="openBackDrawer">
|
|
|
回本数据
|
|
|
</a-button>
|
|
|
- <a-button type="primary" @click="openCustomLine" style="margin-left:10px;">
|
|
|
+ <a-button
|
|
|
+ type="primary"
|
|
|
+ @click="openCustomLine"
|
|
|
+ style="margin-left:10px;"
|
|
|
+ >
|
|
|
自定义列
|
|
|
</a-button>
|
|
|
</div>
|
|
@@ -57,7 +61,7 @@
|
|
|
@change="handleTableChange"
|
|
|
rowKey="id"
|
|
|
bordered
|
|
|
- :scroll="{ x: 1800, y: 700 }"
|
|
|
+ :scroll="{ x: 'max-content', y: 700 }"
|
|
|
>
|
|
|
<template #switch="{ text, record }">
|
|
|
<a-switch
|
|
@@ -252,7 +256,11 @@
|
|
|
></register-datad>
|
|
|
</a-drawer>
|
|
|
|
|
|
- <custom-cloumn :show="columnShow" @closeClomnShow="openCustomLine" @dineClounmList="dineClounmList"></custom-cloumn>
|
|
|
+ <custom-cloumn
|
|
|
+ :show="columnShow"
|
|
|
+ @closeClomnShow="openCustomLine"
|
|
|
+ @dineClounmList="dineClounmList"
|
|
|
+ ></custom-cloumn>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -323,7 +331,7 @@ const PutAdPlan = defineComponent({
|
|
|
showPop: false,
|
|
|
visible1: false,
|
|
|
registerVisable: false,
|
|
|
- columnShow:false,
|
|
|
+ columnShow: false,
|
|
|
register: {
|
|
|
ad_lid: 0,
|
|
|
back_platform: "",
|
|
@@ -450,7 +458,7 @@ const PutAdPlan = defineComponent({
|
|
|
"external_actions",
|
|
|
"ad_create_time",
|
|
|
];
|
|
|
- res.data.map((item: { desc: string; name: string }) => {
|
|
|
+ res.data.map((item: { desc: string; name: string;width?:number | string}) => {
|
|
|
let lolumnItem: {
|
|
|
title: string;
|
|
|
dataIndex: string;
|
|
@@ -461,7 +469,7 @@ const PutAdPlan = defineComponent({
|
|
|
} = {
|
|
|
title: item.desc,
|
|
|
dataIndex: item.name,
|
|
|
- width: 95,
|
|
|
+ width: item.width || 95,
|
|
|
ellipsis: true,
|
|
|
};
|
|
|
|
|
@@ -469,12 +477,16 @@ const PutAdPlan = defineComponent({
|
|
|
lolumnItem.slots = { customRender: "external_url" };
|
|
|
}
|
|
|
|
|
|
- if (item.name == "cpa_bid" || item.name == "budget") {
|
|
|
+ if (item.name == "cpa_bid") {
|
|
|
lolumnItem.slots = { customRender: item.name };
|
|
|
lolumnItem.width = 130;
|
|
|
}
|
|
|
if (item.name == "cost") {
|
|
|
lolumnItem.sorter = true;
|
|
|
+ // lolumnItem.width = 9;
|
|
|
+ }
|
|
|
+ if( item.name == "budget"){
|
|
|
+ delete lolumnItem.width;
|
|
|
}
|
|
|
if (extendList.includes(item.name)) {
|
|
|
state.innerClomuns.push(lolumnItem);
|
|
@@ -484,9 +496,9 @@ const PutAdPlan = defineComponent({
|
|
|
});
|
|
|
|
|
|
let newColunms = columns.filter(
|
|
|
- (item) =>
|
|
|
- !blackList.includes(item.dataIndex) &&
|
|
|
- !extendList.includes(item.dataIndex)
|
|
|
+ (item) => !blackList.includes(item.dataIndex)
|
|
|
+ /* !blackList.includes(item.dataIndex) &&
|
|
|
+ !extendList.includes(item.dataIndex) */
|
|
|
);
|
|
|
|
|
|
state.columns = [];
|
|
@@ -533,6 +545,7 @@ const PutAdPlan = defineComponent({
|
|
|
};
|
|
|
|
|
|
onMounted(() => {
|
|
|
+
|
|
|
getData({
|
|
|
campaign_id: route.query?.campaign_id ?? "",
|
|
|
current: 1,
|
|
@@ -541,6 +554,9 @@ const PutAdPlan = defineComponent({
|
|
|
|
|
|
return { ...toRefs(state), handleTableChange, onSearch, switchDate };
|
|
|
},
|
|
|
+ mounted(){
|
|
|
+ console.log(this.$root)
|
|
|
+ },
|
|
|
methods: {
|
|
|
moment,
|
|
|
onGo(record: any) {
|
|
@@ -662,11 +678,11 @@ const PutAdPlan = defineComponent({
|
|
|
openCustomLine() {
|
|
|
this.columnShow = !this.columnShow;
|
|
|
},
|
|
|
- dineClounmList(){
|
|
|
- setTimeout(()=>{
|
|
|
+ dineClounmList() {
|
|
|
+ setTimeout(() => {
|
|
|
location.reload();
|
|
|
- },1500)
|
|
|
- }
|
|
|
+ }, 1500);
|
|
|
+ },
|
|
|
},
|
|
|
});
|
|
|
|