|
@@ -57,7 +57,10 @@
|
|
|
<a-button style="padding: 0" @click="onOpenPush(record)" type="link"
|
|
|
>推送</a-button
|
|
|
>
|
|
|
- <a-popconfirm @confirm="onDelete(record)">
|
|
|
+ <a-popconfirm
|
|
|
+ @confirm="onDelete(record)"
|
|
|
+ :disabled="Number(record.is_mine_uploaded) !== 1"
|
|
|
+ >
|
|
|
<template #title>
|
|
|
<p>确认删除该素材吗</p>
|
|
|
</template>
|
|
@@ -162,7 +165,7 @@ const CommonTable = defineComponent({
|
|
|
advertiser: ref<string[]>([]), // 选择的广告主
|
|
|
previewVisible: false,
|
|
|
currentUrl: "",
|
|
|
- pushLoading: false
|
|
|
+ pushLoading: false,
|
|
|
});
|
|
|
const getList = async (page?: any) => {
|
|
|
state.loading = true;
|
|
@@ -183,6 +186,7 @@ const CommonTable = defineComponent({
|
|
|
() => props.searchForm,
|
|
|
(oldVal, newVal) => {
|
|
|
getList({ current: 1 });
|
|
|
+ state.selectedRowKeys = [];
|
|
|
}
|
|
|
);
|
|
|
return { ...toRefs(state), tablePageOptions, getList, onSelectChange };
|
|
@@ -235,11 +239,11 @@ const CommonTable = defineComponent({
|
|
|
this.currentId = item.id;
|
|
|
this.advertiser = [];
|
|
|
this.pushVisible = true;
|
|
|
- this.pushLoading = false
|
|
|
+ this.pushLoading = false;
|
|
|
},
|
|
|
// 确定推送
|
|
|
async onConfirmPush() {
|
|
|
- this.pushLoading = true
|
|
|
+ this.pushLoading = true;
|
|
|
console.log("IDS", this.currentId, this.advertiser);
|
|
|
try {
|
|
|
await pushMaterial({
|
|
@@ -252,8 +256,8 @@ const CommonTable = defineComponent({
|
|
|
this.pushVisible = false;
|
|
|
message.error("推送失败");
|
|
|
console.log(err);
|
|
|
- }finally{
|
|
|
- this.pushLoading = false
|
|
|
+ } finally {
|
|
|
+ this.pushLoading = false;
|
|
|
}
|
|
|
},
|
|
|
// 点击预览
|