Explorar o código

RING:隐藏数据中心

ringcode %!s(int64=3) %!d(string=hai) anos
pai
achega
e4355f7982
Modificáronse 2 ficheiros con 12 adicións e 7 borrados
  1. 2 1
      src/router/async.ts
  2. 10 6
      src/views/material/component/common-table.vue

+ 2 - 1
src/router/async.ts

@@ -235,6 +235,7 @@ export const ForgetPwd: RouteConfig = {
 
 
 
-const asyncRoutes: RouteConfig[] = [AccountManager, DataAnalysis, PutManager, Financial, QuickApp, ForgetPwd, MaterialCenter];
+// const asyncRoutes: RouteConfig[] = [AccountManager, DataAnalysis, PutManager, Financial, QuickApp, ForgetPwd, MaterialCenter];
+const asyncRoutes: RouteConfig[] = [AccountManager, PutManager, Financial, QuickApp, ForgetPwd, MaterialCenter];
 
 export default asyncRoutes;

+ 10 - 6
src/views/material/component/common-table.vue

@@ -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;
       }
     },
     // 点击预览