瀏覽代碼

Merge branch 'master' of http://121.40.40.223:3000/zizhong.wang/Lexus-media

liuYb 4 年之前
父節點
當前提交
743c522b5f

+ 3 - 1
src/App.vue

@@ -60,6 +60,7 @@ export default {
       let token = query.token || '';
       console.log('token:', token);
       if(!token) {
+        localStorage.setItem("userId", '');
         return
       }
       this.$http({
@@ -73,12 +74,13 @@ export default {
         if(res.status === 200){
           if(res.data.code === 200) {
             let userInfo = res.data.data;
-            if (userInfo.role === '1') {
+            if (userInfo.role == '1') {
               this.isManufacturer = 'manufacturer';
             } else {
               this.isManufacturer = 'distributor';
             }
             this.userAccount = userInfo.userAccount;
+            localStorage.setItem("userId", userInfo.userAccount);
           }else {
             let message = res.data.message;
             console.log('message', message);

+ 20 - 5
src/views/account/AccountManage.vue

@@ -59,6 +59,7 @@ export default {
       tableHeader: ["平台名称", "平台账号", "是否认证", "粉丝数", "操作"],
       tableData: [],
       editData: {},
+      accountId: "",
       // dictList: [],
       // mediaPlatName: [],
     };
@@ -90,12 +91,15 @@ export default {
       //this.addDataList(account, fansNum, flag, editData);
       let data = {
         id: editData["id"],
-        authorizationName : flag === "是" ? true : false,
+        authorization: flag === "是" ? true : false,
         fansCount: fansNum,
-        accountCode: account
+        accountCode: account,
       };
       this.updateMediaAccountInfo(data).then(() => {
-        this.selectMediaAccountPage();
+        let req = {
+          accountId: this.accountId,
+        };
+        this.selectMediaAccountPage(req);
       });
     },
     toggleModal: function (i) {
@@ -192,10 +196,11 @@ export default {
     // },
     //
     // 获取列表数据  接口
-    selectMediaAccountPage: function () {
+    selectMediaAccountPage: function (data) {
       this.$http({
         method: "post",
         url: "/sys/mediaAccount/selectMediaAccountPage",
+        data,
       })
         .then((res) => {
           if (res.data && res.data.code === 200) {
@@ -234,7 +239,17 @@ export default {
     },
   },
   mounted() {
-    this.selectMediaAccountPage();
+    let userId = localStorage.getItem("userId");
+    if (userId) {
+      this.accountId = userId;
+    } else {
+      this.accountId = "";
+    }
+    let data = {
+      accountId: this.accountId,
+    };
+    this.selectMediaAccountPage(data);
+
     // this.selectSysDataDictList()
     //   .then(() => {
     //     this.getDateList();

文件差異過大導致無法顯示
+ 984 - 958
src/views/data/UploadLink.vue


+ 1 - 1
src/views/data/UploadRecord.vue

@@ -185,7 +185,7 @@ export default {
           },
         })
           .then((res) => {
-            console.log(res);
+            console.log(res, 222);
             if (res.data && res.data.code === 200) {
               alert("删除成功");
               resolve();

+ 136 - 136
src/views/data/components/UploadLinksTable.vue

@@ -1,136 +1,136 @@
-<template>
-  <div class="table">
-    <table>
-      <thead>
-        <tr>
-          <td colspan="7">基础信息</td>
-          <td colspan="8">论坛传播情况汇总</td>
-        </tr>
-        <tr>
-          <td>NO.</td>
-          <td>DLR Code</td>
-          <td>经销商名称</td>
-          <td>所属区域</td>
-          <td>发布日期</td>
-          <td>资料名称</td>
-          <td>反馈日期</td>
-          <td>车系</td>
-          <td>车型</td>
-          <td>发布平台</td>
-          <td>发布版块</td>
-          <td>项目分类</td>
-          <td>内容分类1</td>
-          <td>内容分类2</td>
-          <td>标题</td>
-        </tr>
-      </thead>
-      <tbody>
-        <tr
-          v-for="(obj, index) in tableData"
-          :key="index"
-          :class="{ table_gray: index % 2 === 0 }"
-        >
-          <td style="width: 80px">{{ index + 1 }}</td>
-          <td>{{ obj.dlrCode }}</td>
-          <td style="width: 180px">{{ obj.dlrName }}</td>
-          <td>{{ obj.localArea }}</td>
-          <td>{{ obj.publishDate }}</td>
-          <td style="width: 180px">{{ obj.informationName }}</td>
-          <td>{{ obj.reportDate }}</td>
-          <td>{{ obj.carSeries }}</td>
-          <td>{{ obj.carTypeName }}</td>
-          <td>{{ obj.publishPlatformName }}</td>
-          <td>{{ obj.publishSourceName }}</td>
-          <td>{{ obj.projectTypeName }}</td>
-          <td>{{ obj.contentTypeName }}</td>
-          <td>{{ obj.contentClass2 }}</td>
-          <td style="width: 240px">
-            <div class="blueStyle" @click="ulrJump(obj.mediaUrl)">
-              {{ obj.mediaTitle }}
-            </div>
-          </td>
-        </tr>
-      </tbody>
-    </table>
-  </div>
-</template>
-
-<script>
-export default {
-  props: {
-    // 表数据
-    tableData: {
-      type: Array,
-      default: () => {
-        return [];
-      },
-    },
-    pageSize: {
-      type: Number,
-      default: 20,
-    },
-    currentPage: {
-      type: Number,
-      default: 1,
-    },
-  },
-  mounted() {},
-  data() {
-    return {};
-  },
-  methods: {
-    ulrJump: function (url) {
-      console.log(url);
-      this.$emit("go_detail", url);
-    },
-  },
-};
-</script>
-
-<style scoped lang="less">
-.table {
-  background-color: #fff;
-  width: 100%;
-  margin-top: 5px;
-  text-align: center;
-  table {
-    width: 1800px;
-    border-collapse: collapse;
-    border: none;
-    thead {
-      td {
-        background: #8d9092;
-        height: 36px;
-        color: #fff;
-        border: 1px solid #ccc;
-      }
-    }
-    tbody {
-      tr {
-        background: #fff;
-      }
-      td {
-        height: 36px;
-        border: 1px solid #ccc;
-        width: 120px;
-      }
-      .operation {
-        span {
-          color: #00f;
-          margin: 0 20px;
-          &:hover {
-            cursor: pointer;
-          }
-        }
-      }
-    }
-  }
-}
-.table_gray {
-  background: #f5f5f5 !important;
-}
-.blueStyle {
-  color: #0056a0;
-  text-decoration: none;
-}
-</style>
+<template>
+  <div class="table">
+    <table>
+      <thead>
+        <tr>
+          <td colspan="7">基础信息</td>
+          <td colspan="8">论坛传播情况汇总</td>
+        </tr>
+        <tr>
+          <td>NO.</td>
+          <td>DLR Code</td>
+          <td>经销商名称</td>
+          <td>所属区域</td>
+          <td>发布日期</td>
+          <td>资料名称</td>
+          <td>反馈日期</td>
+          <td>车系</td>
+          <td>车型</td>
+          <td>发布平台</td>
+          <td>发布版块</td>
+          <td>项目分类</td>
+          <td>内容分类1</td>
+          <td>内容分类2</td>
+          <td>标题</td>
+        </tr>
+      </thead>
+      <tbody>
+        <tr
+          v-for="(obj, index) in tableData"
+          :key="index"
+          :class="{ table_gray: index % 2 === 0 }"
+        >
+          <td style="width: 80px">{{ index + 1 }}</td>
+          <td>{{ obj.dlrCode }}</td>
+          <td style="width: 180px">{{ obj.dlrName }}</td>
+          <td>{{ obj.localArea }}</td>
+          <td>{{ obj.publishDate }}</td>
+          <td style="width: 180px">{{ obj.informationName }}</td>
+          <td>{{ obj.reportDate }}</td>
+          <td>{{ obj.carTypeName }}</td>
+          <td>{{ obj.carPlatformName }}</td>
+          <td>{{ obj.publishPlatformName || '-' }}</td>
+          <td>{{ obj.publishSourceName }}</td>
+          <td>{{ obj.projectTypeName || '-'}}</td>
+          <td>{{ obj.contentTypeName }}</td>
+          <td>{{ obj.contentClass2 || '-'}}</td>
+          <td style="width: 240px">
+            <div class="blueStyle" @click="ulrJump(obj.mediaUrl)">
+              {{ obj.mediaTitle }}
+            </div>
+          </td>
+        </tr>
+      </tbody>
+    </table>
+  </div>
+</template>
+
+<script>
+export default {
+  props: {
+    // 表数据
+    tableData: {
+      type: Array,
+      default: () => {
+        return [];
+      },
+    },
+    pageSize: {
+      type: Number,
+      default: 20,
+    },
+    currentPage: {
+      type: Number,
+      default: 1,
+    },
+  },
+  mounted() {},
+  data() {
+    return {};
+  },
+  methods: {
+    ulrJump: function (url) {
+      console.log(url);
+      this.$emit("go_detail", url);
+    },
+  },
+};
+</script>
+
+<style scoped lang="less">
+.table {
+  background-color: #fff;
+  width: 100%;
+  margin-top: 5px;
+  text-align: center;
+  table {
+    width: 1800px;
+    border-collapse: collapse;
+    border: none;
+    thead {
+      td {
+        background: #8d9092;
+        height: 36px;
+        color: #fff;
+        border: 1px solid #ccc;
+      }
+    }
+    tbody {
+      tr {
+        background: #fff;
+      }
+      td {
+        height: 36px;
+        border: 1px solid #ccc;
+        width: 120px;
+      }
+      .operation {
+        span {
+          color: #00f;
+          margin: 0 20px;
+          &:hover {
+            cursor: pointer;
+          }
+        }
+      }
+    }
+  }
+}
+.table_gray {
+  background: #f5f5f5 !important;
+}
+.blueStyle {
+  color: #0056a0;
+  text-decoration: none;
+}
+</style>

+ 2 - 1
src/views/parameter/PlatformModule.vue

@@ -11,7 +11,8 @@
           @edit="edit"
           @delet_data="deleteData"
           @jump_router="jumpRouter"
-          :pageSize="sum"
+          :pageSize="pageSize"
+          :currentPage='currentPage'
         ></Table>
       </div>
       <div class="page">

+ 7 - 3
src/views/parameter/components/PlatformModule/PlatformTable.vue

@@ -26,7 +26,7 @@
             <span @click="edit(index)" v-if="!editFlag[index]">编辑</span>
             <span @click="submitEdit(index)" v-else>确定</span>
             <span @click="showModal(index)">删除</span>
-            <span @click="plate(index)" v-if="index === 0">平台板块></span>
+            <span @click="plate(index)" v-if="index === 0 && currentPage === 1">平台板块></span>
             <span v-else class="nono">展位模块></span>
           </td>
         </tr>
@@ -54,7 +54,11 @@ export default {
     //  表格一页共有多少数据
     pageSize: {
       type: Number,
-      default: 2,
+      default: 20,
+    },
+    currentPage: {
+      type: Number,
+      default: 1,
     },
   },
   components: {
@@ -104,7 +108,7 @@ export default {
     closeModal: function () {
       this.deleteModalFlag = false;
     },
-    // 生成点击编辑按钮所用flag,
+    // 生成点击编辑按钮所用flag,
     getEditArr: function () {
       let arr = new Array(this.pageSize).fill(false);
       this.editFlag = arr;