Browse Source

传播反馈查看跳转页面,其他细节修改

liuYb 5 years ago
parent
commit
6d8a87213c

+ 46 - 17
src/components/Modal.vue

@@ -7,7 +7,8 @@
       <div class="modal-body">
         <div class="bodyRow">
           <span>资料名称</span>
-          <select v-model="ziliaoId">
+          <div>{{ ziliaoName }}</div>
+          <!--   <select v-model="ziliaoId">
             <option
               v-for="(item, index) in dataName"
               :key="index"
@@ -15,7 +16,7 @@
             >
               {{ item.informationName }}
             </option>
-          </select>
+          </select> -->
         </div>
         <div class="bodyRow timeWidth">
           <span>发布时间</span
@@ -49,11 +50,11 @@
         </div>
         <div class="bodyRow">
           <div class="contentCol1">
-            <span>发布平台</span>
+            <span>发布渠道</span>
             <div>{{ selectedPlatform }}</div>
           </div>
           <div class="contentCol2">
-            <span>发布版块</span
+            <span>平台版块</span
             ><select name="" id="" v-model="releaseP">
               <option
                 v-for="(item, index) in releaseMedia"
@@ -65,15 +66,15 @@
             </select>
           </div>
         </div>
-        <div class="bodyRow">
+        <!--      <div class="bodyRow">
           <span>项目分类</span
           ><select name="" id="">
             <option value="">请选择</option>
           </select>
-        </div>
+        </div> -->
         <div class="bodyRow">
           <div class="contentCol1">
-            <span>内容分类1</span
+            <span>稿件类别</span
             ><select name="" id="" v-model="contentName1">
               <option
                 v-for="(item, index) in content1"
@@ -85,7 +86,7 @@
             </select>
           </div>
           <div class="contentCol2">
-            <span>内容分类2</span
+            <span>内容分类</span
             ><select name="" id="" v-model="contentName2">
               <option
                 v-for="(item, index) in content2"
@@ -98,10 +99,30 @@
           </div>
         </div>
         <div class="bodyRow">
+          <div class="contentCol1">
+            <span>阅读量</span>
+            <input type="number" placeholder="" v-model="mediaTitle" />
+          </div>
+          <div class="contentCol2">
+            <span>点赞</span>
+            <input type="number" placeholder="" v-model="mediaTitle" />
+          </div>
+        </div>
+        <div class="bodyRow">
+          <div class="contentCol1">
+            <span>评论</span>
+            <input type="number" placeholder="" v-model="mediaTitle" />
+          </div>
+          <div class="contentCol2">
+            <span>在看/转发</span>
+            <input type="number" placeholder="" v-model="mediaTitle" />
+          </div>
+        </div>
+        <div class="bodyRow longInput">
           <span>标题</span>
           <input type="text" placeholder="文章标题" v-model="mediaTitle" />
         </div>
-        <div class="bodyRow">
+        <div class="bodyRow longInput">
           <span>链接</span>
           <input type="text" placeholder="文章发布地址" v-model="mediaUrl" />
         </div>
@@ -203,10 +224,10 @@ export default {
 
       let config = {
         //url: "/dealerFeedback",
-       // url: "/updateDealerFeedback",
+        // url: "/updateDealerFeedback",
         url: "",
         data: {
-          id: '', //主键值
+          id: "", //主键值
           month: d,
           dealerId: "254",
           dataId: this.ziliaoId,
@@ -229,16 +250,14 @@ export default {
         },
       };
 
-      console.log("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", this.LinkData.id);
       if (this.LinkData.id) {
         config.url = "/updateDealerFeedback";
-        config.data.id=this.LinkData.id
+        config.data.id = this.LinkData.id;
         console.log(config.url);
-      }else{
-        config.url = "/dealerFeedback"
+      } else {
+        config.url = "/dealerFeedback";
       }
 
-      //console.log("edit2:", this.releaseP);
       this.$emit("update", config);
       this.$emit("closeme");
     },
@@ -257,6 +276,13 @@ export default {
           if (res.data.code === 200) {
             this.dataName = res.data.data;
             console.log(this.dataName);
+            //获取资料名
+            let obj = {};
+            let idVal = this.ziliaoId;
+            obj = this.dataName.find(function (item) {
+              return item.id === idVal;
+            });
+            this.ziliaoName = obj.informationName;
           }
         })
         .catch((err) => {
@@ -525,7 +551,10 @@ div {
   width: 120px;
 }
 .bodyRow input {
-  width: 480px;
+  width: 112px;
+}
+.longInput input {
+  width: 476px;
 }
 .bodyRow select,
 input {

+ 86 - 82
src/router/index.js

@@ -6,6 +6,8 @@ import UploadRecord from '../views/data/UploadRecord.vue'
 import UploadLinks from '../views/data/UploadLinks.vue'
 // 经销商链接上传
 import UploadLink from '../views/data/UploadLink.vue'
+//
+import sonUploadLink from '../views/data/UploadLink/sonUploadLink.vue'
 // 上传资料
 import UploadInfor from '../views/data/UploadInfor.vue'
 // 资料下载
@@ -27,97 +29,99 @@ import ContentCategory1 from '../views/parameter/ContentCategory1'
 //内容分类2
 import ContentCategory2 from '../views/parameter/ContentCategory2'
 // 媒体平台
-import MediaPlatform  from '../views/parameter/MediaPlatform'
+import MediaPlatform from '../views/parameter/MediaPlatform'
 // 权限分组
 import Grouping from '../views/parameter/Grouping'
 // 链接上传
-import LinkUpload  from '../views/parameter/LinkUpload'
+import LinkUpload from '../views/parameter/LinkUpload'
 // 常用参数
-import CommonParam  from '../views/parameter/CommonParam'
+import CommonParam from '../views/parameter/CommonParam'
 
 Vue.use(VueRouter)
 
-const routes = [
-  {
-    path: '/',
-    component: InforList,
-    redirect: '/inforList'
-  },
-  {
-    path: '/uploadRecord',
-    component: UploadRecord
-  },
-  {
-    path: '/uploadLink',
-    component: UploadLink
-  },
-  {
-    path: '/uploadLinks',
-    component:UploadLinks
-  },
-  {
-    path: '/uploadInfor',
-    component: UploadInfor
-  },
-  {
-    path: '/inforList',
-    component: InforList
-  },
-  {
-    path: '/accountIndex',
-    component: AccountIndex
-  },
-  {
-    path: '/accountManage',
-    component: AccountManage
-  },
-  {
-    path: '/parameterIndex',
-    component: ParameterIndex,
-    children: [
-      {
-        path: '',
-        component: CarSeries,
-        redirect: 'carSeries'
-      },
-      {
-        path: 'carSeries',
-        component: CarSeries
-      },
-      {
-        path: 'platformModule',
-        component: PlatformModule
-      },
-      {
-        path: 'contentCategory1',
-        component: ContentCategory1
-      },
-      {
-        path: 'contentCategory2',
-        component: ContentCategory2
-      },
-      {
-        path: 'mediaPlatform',
-        component: MediaPlatform
-      },
-      {
-        path: 'grouping',
-        component: Grouping
-      },
-      {
-        path: 'linkUpload',
-        component: LinkUpload
-      },
-      {
-        path: 'commonParam',
-        component: CommonParam
-      }
-    ]
-  }
+const routes = [{
+        path: '/',
+        component: InforList,
+        redirect: '/inforList'
+    },
+    {
+        path: '/uploadRecord',
+        component: UploadRecord
+    },
+    {
+        path: '/uploadLink',
+        component: UploadLink,
+        children: [{
+            path: 'sonUploadLink',
+            component: sonUploadLink,
+        }]
+    },
+    {
+        path: '/uploadLinks',
+        component: UploadLinks
+    },
+    {
+        path: '/uploadInfor',
+        component: UploadInfor
+    },
+    {
+        path: '/inforList',
+        component: InforList
+    },
+    {
+        path: '/accountIndex',
+        component: AccountIndex
+    },
+    {
+        path: '/accountManage',
+        component: AccountManage
+    },
+    {
+        path: '/parameterIndex',
+        component: ParameterIndex,
+        children: [{
+                path: '',
+                component: CarSeries,
+                redirect: 'carSeries'
+            },
+            {
+                path: 'carSeries',
+                component: CarSeries
+            },
+            {
+                path: 'platformModule',
+                component: PlatformModule
+            },
+            {
+                path: 'contentCategory1',
+                component: ContentCategory1
+            },
+            {
+                path: 'contentCategory2',
+                component: ContentCategory2
+            },
+            {
+                path: 'mediaPlatform',
+                component: MediaPlatform
+            },
+            {
+                path: 'grouping',
+                component: Grouping
+            },
+            {
+                path: 'linkUpload',
+                component: LinkUpload
+            },
+            {
+                path: 'commonParam',
+                component: CommonParam
+            }
+        ]
+    }
 ]
 
 const router = new VueRouter({
-  routes
+    routes
 })
 
-export default router
+export default router

+ 2 - 2
src/views/data/InforList.vue

@@ -70,7 +70,7 @@
                 <td>{{ obj.accountScope === 1 ? "共通" : "部分" }}</td>
                 <td>{{ obj.fileUploadDate || "2021/01/10 12:12" }}</td>
                 <td>{{ obj.download > 0 ? "已下载" : "未下载" }}</td>
-                <td>{{ obj.report === "1" ? "已反馈" : "未反馈" }}</td>
+                <td>{{ obj.report === "1" ? "已完成" : "待办" }}</td>
 
                 <td v-if="operation" :style="trStyle" class="operationStyle">
                   <span
@@ -137,7 +137,7 @@ export default {
         "经销商范围",
         "上传时间",
         "下载状态",
-        "反馈状态",
+        "任务状态",
         "操作",
       ],
       operation: [

+ 194 - 227
src/views/data/UploadLink.vue

@@ -1,11 +1,11 @@
 <template>
   <div class="upload_Link">
-    <!--  <span><b>经销商</b></span> -->
-    <span>针对论坛及其他平台链接上传</span>
-    <div class="contentHead">
+    <div v-if="isFather()">
+      <!--  <span><b>经销商</b></span> -->
+      <div class="topLeftTitle">针对论坛及其他平台链接上传</div>
+      <!--    <div class="contentHead">
       <span>上传平台</span>
       <select name="" id="" v-model="platformVal" @change="choosePlatform">
-        <!--  <option value="">请选择</option> -->
         <option
           v-for="(item, index) in platform"
           :key="index"
@@ -14,147 +14,176 @@
           {{ item.platformName }}
         </option>
       </select>
-    </div>
-    <div class="tableBox">
-      <table class="feedbackTable">
-        <thead class="theadStyle">
-          <tr class="tableHeadStyle1">
-            <td>论坛传播情况汇总</td>
-          </tr>
-          <tr class="tableHeadStyle2 tableHeadStyle3">
-            <td v-for="(item, index) in tableHeader" :key="index">
-              {{ item }}
-            </td>
-          </tr>
-        </thead>
-        <tbody class="bodyStyle">
-          <tr
-            class="bodyContent tableHeadStyle2"
-            v-for="(obj, index) in tableData"
-            :key="index"
-            :class="{ table_gray: index % 2 === 0 }"
-          >
-            <td v-if="flag">{{ index + 1 }}</td>
+    </div> -->
+      <div class="tableBox">
+        <table class="feedbackTable">
+          <thead class="theadStyle">
+            <tr class="tableHeadStyle1">
+              <td>论坛传播情况汇总</td>
+            </tr>
+            <tr class="tableHeadStyle2 tableHeadStyle3">
+              <td v-for="(item, index) in tableHeader" :key="index">
+                {{ item }}
+              </td>
+            </tr>
+          </thead>
+          <tbody class="bodyStyle">
+            <tr
+              class="bodyContent tableHeadStyle2"
+              v-for="(obj, index) in tableData"
+              :key="index"
+              :class="{ table_gray: index % 2 === 0 }"
+            >
+              <td v-if="flag">{{ index + 1 }}</td>
 
-            <td>{{ obj.publishDate }}</td>
-            <!-- 发布日期 -->
-            <td>{{ obj.informationName }}</td>
-            <!-- 资料名称 -->
-            <td>{{ obj.carTypeName }}</td>
-            <!-- 车系 -->
-            <td>{{ obj.carPlatformName }}</td>
-            <!-- 车型 -->
-            <td>{{ obj.publishSourceName }}</td>
-            <!-- 发布版块 -->
-            <td>{{ obj.projectTypeName }}</td>
-            <!-- 项目分类 -->
-            <td>{{ obj.mediaTypeName }}</td>
-            <!-- 内容分类1 -->
-            <td>{{ obj.contentTypeName }}</td>
-            <!-- 内容分类2 -->
-            <td>{{ obj.mediaTitle }}</td>
-            <!-- 稿件标题 -->
-            <td>
-              <a :href="obj.mediaUrl" target="blank">{{ obj.mediaUrl }}</a>
-            </td>
-            <!-- 链接 -->
+              <td>{{ obj.publishDate }}</td>
+              <!-- 发布日期 -->
+              <td>{{ obj.informationName }}</td>
+              <!-- 资料名称 -->
 
-            <td class="operationStyle" style="cursor: pointer">
-              <span @click="toggleModal(index)">编辑</span>
-              <span @click="toggleModal2(index)">删除</span>
-              <!-- 弹窗: 确定删除? -->
-              <deleteModal
-                v-if="showModal2"
-                @dataDel="toDel"
-                @hide_modal="closeme2"
-                :LinkData="modalData"
-                :showModalFlag="showModal2"
-                :chooseItemIndex="nowIndex"
-              ></deleteModal>
-            </td>
-          </tr>
-        </tbody>
-      </table>
-    </div>
-    <!-- 弹窗: 编辑表格内容 -->
-    <Modal
-      v-if="showModal"
-      v-on:closeme="closeme"
-      :LinkData="modalData"
-      @update="editTitle"
-      :selectedPlatform="selectedPlatform"
-      :releaseMedia="releaseMedia"
-    ></Modal>
+              <td>{{ obj.informationName }}</td>
+              <!-- 发布渠道 -->
 
-    <div class="timeLimitStyle">
-      <span>仅可对上传时间为{{ feedbackTimeLimit }}个月内的资料进行反馈</span>
-    </div>
-    <div class="pageBottom">
-      <div class="fileOperation">
-        <span
-          class="operationStyle xiahuaxian"
-          @click="importTemplate"
-          style="cursor: pointer"
-          >导入模板</span
-        >
-        <label
-          for="fileInput"
-          @change="getFileInfo($event)"
-          class="uploadFile"
-          style="cursor: pointer"
-          >导入<input
-            type="file"
-            name="fileName"
-            id="fileInput"
-            accept=".xlsx, .xls"
-            multiple
-        /></label>
-        <label for="fileOutput" @click="onOutputExcel()" style="cursor: pointer"
-          >导出</label
-        >
+              <td>{{ obj.publishSourceName }}</td>
+              <!-- 平台板块 发布版块-->
+
+              <td>{{ obj.informationName }}</td>
+              <!-- 阅读量 -->
+              <td>{{ obj.informationName }}</td>
+              <!-- 点赞 -->
+              <td>{{ obj.informationName }}</td>
+              <!-- 评论 -->
+              <td>{{ obj.informationName }}</td>
+              <!-- 在看/转发 -->
+
+              <!--  <td>{{ obj.carTypeName }}</td> -->
+              <!-- 车系 -->
+              <!--  <td>{{ obj.projectTypeName }}</td> -->
+              <!-- 项目分类 -->
+
+              <td>{{ obj.mediaTypeName }}</td>
+              <!-- 稿件类别 内容分类1 -->
+              <td>{{ obj.contentTypeName }}</td>
+              <!-- 内容分类 内容分类2 -->
+              <td>{{ obj.carPlatformName }}</td>
+              <!-- 车型 -->
+              <td>{{ obj.informationName }}</td>
+              <!-- 反馈状态 -->
+              <td>{{ obj.informationName }}</td>
+              <!-- 反馈截止日期 -->
+              <td>{{ obj.mediaTitle }}</td>
+              <!-- 稿件标题 -->
+              <td>
+                <a :href="obj.mediaUrl" target="blank">{{ obj.mediaUrl }}</a>
+              </td>
+              <!-- 链接 -->
+
+              <td class="operationStyle" style="cursor: pointer">
+                <span @click="toggleModal(index)">编辑</span>
+                <span @click="viewHistoryRecord(index)">查看</span>
+                <!--  <span @click="toggleModal2(index)">删除</span> -->
+                <!-- 弹窗: 确定删除? -->
+                <deleteModal
+                  v-if="showModal2"
+                  @dataDel="toDel"
+                  @hide_modal="closeme2"
+                  :LinkData="modalData"
+                  :showModalFlag="showModal2"
+                  :chooseItemIndex="nowIndex"
+                ></deleteModal>
+              </td>
+            </tr>
+          </tbody>
+        </table>
       </div>
-      <TablePage
-        :currentPage="currentPage"
-        :totalPage="totalPage"
-        @change_page="changePage"
-        @jump_page="jumpPage"
-        class="tablePageStyle"
-      ></TablePage>
-    </div>
+      <!-- 弹窗: 编辑表格内容 -->
+      <Modal
+        v-if="showModal"
+        v-on:closeme="closeme"
+        :LinkData="modalData"
+        @update="editTitle"
+        :selectedPlatform="selectedPlatform"
+        :releaseMedia="releaseMedia"
+      ></Modal>
 
-    <!-- 弹窗: 上传链接超过剩余限制数量,请修改后重新导入 -->
-    <div class="modal-backdrop" v-show="showModal3">
-      <div class="modal">
-        <div class="modal-body">
-          <div class="bodyRow">上传链接超过剩余限制数量,请修改后重新导入</div>
-        </div>
-        <div class="modal-footer">
-          <button type="button" class="btn-confirm" @click="closeme3()">
-            确定
-          </button>
-          <button type="button" class="btn-close" @click="closeme3">
-            取消
-          </button>
+      <div class="timeLimitStyle">
+        <span>仅可对上传时间为{{ feedbackTimeLimit }}个月内的资料进行反馈</span>
+      </div>
+
+      <div class="pageBottom">
+        <div class="fileOperation">
+          <span
+            class="operationStyle xiahuaxian"
+            @click="importTemplate"
+            style="cursor: pointer"
+            >导入模板</span
+          >
+          <label
+            for="fileInput"
+            @change="getFileInfo($event)"
+            class="uploadFile"
+            style="cursor: pointer"
+            >导入<input
+              type="file"
+              name="fileName"
+              id="fileInput"
+              accept=".xlsx, .xls"
+              multiple
+          /></label>
+          <label
+            for="fileOutput"
+            @click="onOutputExcel()"
+            style="cursor: pointer"
+            >导出</label
+          >
         </div>
+        <TablePage
+          :currentPage="currentPage"
+          :totalPage="totalPage"
+          @change_page="changePage"
+          @jump_page="jumpPage"
+          class="tablePageStyle"
+        ></TablePage>
       </div>
-    </div>
-    <!-- 弹窗: 资料名称无法匹配,请修改后重新导入 -->
-    <div class="modal-backdrop" v-show="showModal4">
-      <div class="modal">
-        <div class="modal-body">
-          <div class="bodyRow">资料名称无法匹配,请修改后重新导入</div>
-          <div class="bodyRow">成功{{ 1 }}条,失败{{ 1 }}条</div>
+
+      <!-- 弹窗: 上传链接超过剩余限制数量,请修改后重新导入 -->
+      <div class="modal-backdrop" v-show="showModal3">
+        <div class="modal">
+          <div class="modal-body">
+            <div class="bodyRow">
+              上传链接超过剩余限制数量,请修改后重新导入
+            </div>
+          </div>
+          <div class="modal-footer">
+            <button type="button" class="btn-confirm" @click="closeme3()">
+              确定
+            </button>
+            <button type="button" class="btn-close" @click="closeme3">
+              取消
+            </button>
+          </div>
         </div>
-        <div class="modal-footer" style="position: relative; top: 95px">
-          <button type="button" class="btn-confirm" @click="closeme4()">
-            确定
-          </button>
-          <button type="button" class="btn-close" @click="closeme4">
-            取消
-          </button>
+      </div>
+      <!-- 弹窗: 资料名称无法匹配,请修改后重新导入 -->
+      <div class="modal-backdrop" v-show="showModal4">
+        <div class="modal">
+          <div class="modal-body">
+            <div class="bodyRow">资料名称无法匹配,请修改后重新导入</div>
+            <div class="bodyRow">成功{{ 1 }}条,失败{{ 1 }}条</div>
+          </div>
+          <div class="modal-footer" style="position: relative; top: 95px">
+            <button type="button" class="btn-confirm" @click="closeme4()">
+              确定
+            </button>
+            <button type="button" class="btn-close" @click="closeme4">
+              取消
+            </button>
+          </div>
         </div>
       </div>
     </div>
+
+    <router-view></router-view>
   </div>
 </template>
 
@@ -176,6 +205,7 @@ export default {
   },
   data() {
     return {
+      isFatherFlag: true,
       publishCount: "",
       platform: [],
       platformVal: "",
@@ -199,18 +229,23 @@ export default {
         "NO.",
         "发布日期",
         "资料名称",
-        "车系",
-        "车型",
-        "发布版块",
-        "项目分类",
-        "内容分类1",
-        "内容分类2",
+        "发布渠道",
+        "平台板块",
+        "阅读量",
+        "点赞",
+        "评论",
+        "在看/转发",
+        "稿件类别",
+        "内容分类",
+        "涉及车型",
+        "反馈状态",
+        "反馈截止日期",
         "标题",
         "链接",
         "操作",
       ],
       tableData: [
-        /*  {
+         {
           informationId: "2021/03/04",
           publishDate: "雷克萨斯ES上市",
           carTypeName: "雷克萨斯ES",
@@ -220,7 +255,7 @@ export default {
           contentTypeName: "雷克萨斯ES",
           mediaTitle: "ES雷克萨斯",
           mediaUrl: "S雷克萨斯",
-        },*/
+        },
       ],
       flag: true,
       modalData: {}, //17:44
@@ -309,20 +344,8 @@ export default {
 
     toDel: function (n) {
       console.log("inToDel:", n);
-      //清空数据
-      /*  if (n == -2) {
-        this.tableData = "";
-      }
-      //清空某一项数据
-      {
-        let obj = this.tableData[n];
-        Object.keys(obj).forEach((key) => {
-          obj[key] = "";
-        });
-      } */
       this.showModal2 = !this.showModal2;
       //更新数据
-
       this.choosePlatform();
     },
     /* 表格翻页 */
@@ -425,40 +448,7 @@ export default {
       let url = this.onlineUrl + "/exportNoFactory";
       console.log("导出excel:", url);
       window.open(url);
-      /*   this.$http({
-        url: "/exportNoFactory",
-        method: "get",
-        params: {
-          //id: this.selectedPlatformId //当期平台id
-        },
-      })
-        .then((res) => {
-          console.log(res);
-          if (res.data.code === 200) {
-            console.log(res.data);
-          }
-        })
-        .catch((err) => {
-          console.log(err);
-        }); */
     },
-    //导入excel
-    /*   onImportExcel: function () {
-      this.$http({
-        url: "/importDealerFeedback",
-        method: "get",
-        params: {},
-      })
-        .then((res) => {
-          console.log(res);
-          if (res.data.code === 200) {
-            console.log(res.data);
-          }
-        })
-        .catch((err) => {
-          console.log(err);
-        });
-    }, */
     // 获取文件
     getFileInfo: function (event) {
       this.file = event.target.files;
@@ -559,7 +549,8 @@ export default {
         .then((res) => {
           if (res.data.code === 200) {
             console.log(res);
-            this.publishCount = res.data.data.length > 0 ?  res.data.data[0].publishCount : 0;
+            this.publishCount =
+              res.data.data.length > 0 ? res.data.data[0].publishCount : 0;
             let len = this.publishCount;
             let l = this.tableData.length;
             console.log("获取可发布数量", len, l);
@@ -603,44 +594,6 @@ export default {
       let url = this.onlineUrl + "/downloadTemplate?templateName=" + str;
       console.log("下载导入模板:", url);
       window.open(url);
-      /*   this.$http({
-        url: "/downloadTemplate",
-        method: "get",
-        params: {
-          templateName: "反馈链接上传导入表模板(经销商).xlsx",
-        },
-      })
-        .then((res) => {
-          console.log(res);
-          if (res.data.code === 200) {
-            console.log(res.data);
-          }
-        })
-        .catch((err) => {
-          console.log(err);
-        });
-      /*    return new Promise((resolve, reject) => {
-        this.$http({
-          url: "/exportNoFactory",
-          method: "get",
-          params: "反馈链接上传导入表模板(经销商).xlsx"
-        })
-          .then((res) => {
-            console.log(res);
-            resolve(res);
-            let link = document.createElement("a");
-            link.href = window.URL.createObjectURL(new Blob([res.data]));
-            link.target = "_blank";
-            //文件名和格式
-            link.download = "文件模板.xlsx";
-            document.body.appendChild(link);
-            link.click();
-            document.body.removeChild(link);
-          })
-          .catch((err) => {
-            reject(err);
-          });
-        }); */
     },
 
     // 上传时间为xx个月内的资料进行反馈  获取内容分类、媒体平台、常用参数接口的标识,再调接口时需要用到
@@ -688,6 +641,15 @@ export default {
           console.log(err);
         });
     },
+    viewHistoryRecord: function () {
+      this.$router.replace({
+        path: "/UploadLink/sonUploadLink",
+      });
+    },
+    isFather: function () {
+      console.log("isfffffff",this.$route.path.length)
+      return this.$route.path.length > 11 ? false: true;
+    },
   },
   mounted() {
     let localUserId = localStorage.getItem("userId");
@@ -947,5 +909,10 @@ export default {
   justify-content: space-between;
   align-items: center;
 }
+.topLeftTitle {
+  height: 50px;
+  display: flex;
+  align-items: center;
+  margin-bottom: 6px;
+}
 </style>
->>>>>>> bae6c489b4e688f713ae10f965a0bd6e0884dcd4

+ 642 - 0
src/views/data/UploadLink/sonUploadLink.vue

@@ -0,0 +1,642 @@
+<template>
+  <div class="upload_Link">
+    <div class="upHead">
+      <div class="topLeftTitle">针对论坛及其他平台链接上传</div>
+      <button class="addButton">新增反馈</button>
+    </div>
+    
+    <div class="tableBox">
+      <table class="feedbackTable">
+        <thead class="theadStyle">
+          <tr class="tableHeadStyle1">
+            <td>论坛传播情况汇总</td>
+          </tr>
+          <tr class="tableHeadStyle2 tableHeadStyle3">
+            <td v-for="(item, index) in tableHeader" :key="index">
+              {{ item }}
+            </td>
+          </tr>
+        </thead>
+        <tbody class="bodyStyle">
+          <tr
+            class="bodyContent tableHeadStyle2"
+            v-for="(obj, index) in tableData"
+            :key="index"
+            :class="{ table_gray: index % 2 === 0 }"
+          >
+            <td v-if="flag">{{ index + 1 }}</td>
+
+            <td>{{ obj.publishDate }}</td>
+            <!-- 发布日期 -->
+            <td>{{ obj.informationName }}</td>
+            <!-- 资料名称 -->
+
+            <td>{{ obj.informationName }}</td>
+            <!-- 发布渠道 -->
+
+            <td>{{ obj.publishSourceName }}</td>
+            <!-- 平台板块 发布版块-->
+
+            <td>{{ obj.informationName }}</td>
+            <!-- 阅读量 -->
+            <td>{{ obj.informationName }}</td>
+            <!-- 点赞 -->
+            <td>{{ obj.informationName }}</td>
+            <!-- 评论 -->
+            <td>{{ obj.informationName }}</td>
+            <!-- 在看/转发 -->
+
+            <!--  <td>{{ obj.carTypeName }}</td> -->
+            <!-- 车系 -->
+            <!--  <td>{{ obj.projectTypeName }}</td> -->
+            <!-- 项目分类 -->
+
+            <td>{{ obj.mediaTypeName }}</td>
+            <!-- 稿件类别 内容分类1 -->
+            <td>{{ obj.contentTypeName }}</td>
+            <!-- 内容分类 内容分类2 -->
+            <td>{{ obj.carPlatformName }}</td>
+            <!-- 车型 -->
+            <td>{{ obj.informationName }}</td>
+            <!-- 反馈状态 -->
+            <td>{{ obj.informationName }}</td>
+            <!-- 反馈截止日期 -->
+            <td>{{ obj.mediaTitle }}</td>
+            <!-- 稿件标题 -->
+            <td>
+              <a :href="obj.mediaUrl" target="blank">{{ obj.mediaUrl }}</a>
+            </td>
+            <!-- 链接 -->
+
+            <td class="operationStyle" style="cursor: pointer">
+              <span @click="toggleModal(index)">编辑</span>
+              <span @click="toggleModal2(index)">删除</span>
+              <!-- 弹窗: 确定删除? -->
+              <deleteModal
+                v-if="showModal2"
+                @dataDel="toDel"
+                @hide_modal="closeme2"
+                :LinkData="modalData"
+                :showModalFlag="showModal2"
+                :chooseItemIndex="nowIndex"
+              ></deleteModal>
+            </td>
+          </tr>
+        </tbody>
+      </table>
+    </div>
+    <!-- 弹窗: 编辑表格内容 -->
+    <Modal
+      v-if="showModal"
+      v-on:closeme="closeme"
+      :LinkData="modalData"
+      @update="editTitle"
+      :selectedPlatform="selectedPlatform"
+      :releaseMedia="releaseMedia"
+    ></Modal>
+
+    <div class="pageBottom">
+      <TablePage
+        :currentPage="currentPage"
+        :totalPage="totalPage"
+        @change_page="changePage"
+        @jump_page="jumpPage"
+        class="tablePageStyle"
+      ></TablePage>
+    </div>
+
+    <!-- 弹窗: 上传链接超过剩余限制数量,请修改后重新导入 -->
+    <div class="modal-backdrop" v-show="showModal3">
+      <div class="modal">
+        <div class="modal-body">
+          <div class="bodyRow">上传链接超过剩余限制数量,请修改后重新导入</div>
+        </div>
+        <div class="modal-footer">
+          <button type="button" class="btn-confirm" @click="closeme3()">
+            确定
+          </button>
+          <button type="button" class="btn-close" @click="closeme3">
+            取消
+          </button>
+        </div>
+      </div>
+    </div>
+    <!-- 弹窗: 资料名称无法匹配,请修改后重新导入 -->
+    <div class="modal-backdrop" v-show="showModal4">
+      <div class="modal">
+        <div class="modal-body">
+          <div class="bodyRow">资料名称无法匹配,请修改后重新导入</div>
+          <div class="bodyRow">成功{{ 1 }}条,失败{{ 1 }}条</div>
+        </div>
+        <div class="modal-footer" style="position: relative; top: 95px">
+          <button type="button" class="btn-confirm" @click="closeme4()">
+            确定
+          </button>
+          <button type="button" class="btn-close" @click="closeme4">
+            取消
+          </button>
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import Modal from "../../../components/Modal";
+import TablePage from "../../../components/TablePage";
+import deleteModal from "../../data/components/UploadLinkModalDelete";
+export default {
+  props: {},
+  components: {
+    Modal,
+    TablePage,
+    deleteModal,
+  },
+  data() {
+    return {
+      publishCount: "",
+      platform: [],
+      platformVal: "",
+
+      releaseMedia: [],
+      selectedPlatform: "",
+      selectedPlatformId: "",
+      nowIndex: 0,
+      /* modal */
+      feedbackTimeLimit: 0,
+      showModal: false,
+      showModal2: false,
+      showModal3: false,
+      showModal4: false,
+      // 表格配置
+      sum: 20, // 一共有多少条数据
+      pageSize: 20, // 每页展示的数据
+      discolor: false, // false是隔行变色
+      currentPage: 1,
+      tableHeader: [
+        "NO.",
+        "发布日期",
+        "资料名称",
+        "发布渠道",
+        "平台板块",
+        "阅读量",
+        "点赞",
+        "评论",
+        "在看/转发",
+        "稿件类别",
+        "内容分类",
+        "涉及车型",
+        "反馈状态",
+        "反馈截止日期",
+        "标题",
+        "链接",
+        "操作",
+      ],
+      tableData: [
+          {
+          informationId: "2021/03/04",
+          publishDate: "雷克萨斯ES上市",
+          carTypeName: "雷克萨斯ES",
+          carPlatformName: "ES雷克萨斯",
+          publishSourceName: "S雷克萨斯",
+          projectTypeName: "东区1",
+          contentTypeName: "雷克萨斯ES",
+          mediaTitle: "ES雷克萨斯",
+          mediaUrl: "S雷克萨斯",
+        },
+      ],
+      flag: true,
+      modalData: {}, //17:44
+      emptyData: {
+        accountId: "",
+        carPlatformName: "",
+        carTypeName: "",
+        mediaTypeName: "",
+        contentTypeName: "",
+        endTime: null,
+        id: "",
+        informationId: "",
+        informationName: "",
+        localArea: "",
+        mediaTitle: null,
+        //mediaTypeName: "",
+        mediaUrl: "",
+        projectTypeName: "",
+        publishDate: "",
+        publishPlatformName: "",
+        publishSourceName: "",
+        queryParams: null,
+        startTime: null,
+      },
+      file: "",
+      dictList: [],
+      onlineUrl: "http://8.136.230.133:8080",
+      firmsDataCount: null,
+      userId: 254,
+    };
+  },
+  computed: {
+    // 表格总页数
+    totalPage() {
+      return Math.ceil(this.sum / this.pageSize);
+    },
+  },
+  methods: {
+    /*toggleModal:点击编辑后弹窗; toggleModal2:点击删除后弹窗; toggleModal3:点击导入后弹窗;  */
+    toggleModal: function (i) {
+      this.showModal = !this.showModal;
+      this.modalData = this.tableData[i];
+    },
+    closeme: function () {
+      this.showModal = !this.showModal;
+    },
+    //删除
+    toggleModal2: function (i) {
+      this.showModal2 = !this.showModal2;
+      this.nowIndex = i;
+      this.modalData = this.tableData[i];
+      console.log("INtoggleModal2", this.modalData, this.nowIndex);
+    },
+    closeme2: function () {
+      this.showModal2 = !this.showModal2;
+    },
+    toggleModal3: function () {
+      this.showModal3 = !this.showModal3;
+    },
+    closeme3: function () {
+      this.showModal3 = !this.showModal3;
+    },
+    toggleModal4: function () {
+      this.showModal4 = !this.showModal4;
+    },
+    closeme4: function () {
+      this.showModal4 = !this.showModal4;
+    },
+    /* 编辑内容,,Modal传参 */
+    editTitle: function (val) {
+      console.log("editTitle文件:", val);
+      this.$http({
+        url: val.url,
+        method: "post",
+        data: val.data,
+      })
+        .then((res) => {
+          console.log(res);
+          //更新数据
+          this.choosePlatform();
+        })
+        .catch((err) => {
+          console.log(err);
+        });
+    },
+
+    toDel: function (n) {
+      console.log("inToDel:", n);
+      //清空数据
+      /*  if (n == -2) {
+        this.tableData = "";
+      }
+      //清空某一项数据
+      {
+        let obj = this.tableData[n];
+        Object.keys(obj).forEach((key) => {
+          obj[key] = "";
+        });
+      } */
+      this.showModal2 = !this.showModal2;
+      //更新数据
+
+      this.choosePlatform();
+    },
+    /* 表格翻页 */
+    changePage: function (page) {
+      this.currentPage = page;
+      console.log(page);
+    },
+    // 点击上一页,下一页,首页,尾页
+    jumpPage: function (item) {
+      switch (item) {
+        case 1:
+          this.currentPage = 1;
+          break;
+        case 2:
+          this.currentPage = this.currentPage - 1;
+          break;
+        case 3:
+          this.currentPage = this.currentPage + 1;
+          break;
+        case 4:
+          this.currentPage = this.totalPage;
+          break;
+      }
+      console.log(this.currentPage);
+    },
+    //获取资料列表
+    getDataList: function (config) {
+      let date = new Date();
+      let m = date.getMonth() + 1;
+      let y = date.getFullYear();
+      let d = y + "/" + m;
+      this.$http({
+        url: "/firmsLinkUpload",
+        method: "post",
+        data: {
+          month: d,
+          publishPlatformId: config,
+        },
+      })
+        .then((res) => {
+          if (res.data.code === 200) {
+            //this.tableData = [];
+            let data = res.data.data;
+            this.firmsDataCount = data.length;
+            for (
+              let i = 0, j = 0;
+              i < this.tableData.length && j < data.length;
+              i++, j++
+            ) {
+              this.$set(this.tableData, i, data[j]);
+            }
+            console.log(this.tableData);
+            //修改素材时间显示格式
+            console.log(this.tableData[0].publishDate);
+            let len = this.tableData.length;
+            for (let i = 0; i < len; i++) {
+              let newValue = "";
+              let temp = this.tableData[i].publishDate;
+              if (this.tableData[i].publishDate.length >= 10) {
+                newValue =
+                  temp.slice(0, 4) +
+                  "/" +
+                  temp.slice(5, 7) +
+                  "/" +
+                  temp.slice(8, 10);
+                this.$set(this.tableData[i], "publishDate", newValue);
+              }
+            }
+            console.log(this.tableData);
+          }
+        })
+        .catch((err) => {
+          console.log(err);
+        });
+    },
+  },
+  mounted() {},
+  created() {},
+};
+</script>
+
+<style scoped lang="less">
+.contentHead {
+  height: 55px;
+  display: flex;
+  align-items: center;
+}
+.contentHead span {
+  margin-right: 15px;
+}
+.tableBox {
+  width: 1030px;
+  overflow-y: hidden;
+}
+.tableBox {
+  text-align: center;
+  .table {
+    table-layout: fixed;
+    background-color: #fff;
+    border-collapse: collapse;
+    border: none;
+    td {
+      border: 1px solid #ccc;
+    }
+    span {
+      &:hover {
+        cursor: pointer;
+      }
+    }
+  }
+}
+.table_gray td {
+  background-color: #eeeeee;
+}
+.tableBox table {
+  border-collapse: collapse;
+  border: 0px;
+}
+.tableBox table td {
+  border: 1px solid #ccc;
+  border-right: 0px;
+  border-bottom: 0px;
+  text-overflow: ellipsis;
+  overflow: hidden;
+  white-space: nowrap;
+}
+// 表头样式
+.theadStyle tr td {
+  color: white;
+}
+.tableHeadStyle1 {
+  background: #848484;
+  height: 30px;
+  color: #fff;
+  display: flex;
+  align-items: center;
+}
+.tableHeadStyle1 td {
+  width: 100%;
+  padding: 7px 5px;
+}
+.tableHeadStyle2 {
+  // background: #848484;
+  height: 30px;
+  color: #fff;
+  display: flex;
+  align-items: center;
+}
+.tableHeadStyle2 td {
+  width: 100px;
+  padding: 7px 5px;
+}
+.tableHeadStyle3 td {
+  background: #848484;
+}
+.tableHeadStyle2 td:nth-child(1) {
+  width: 60px;
+}
+.tableHeadStyle2 td:nth-child(10) {
+  width: 100px;
+  padding: 7px 5px;
+}
+.tableHeadStyle2 td:nth-child(11) {
+  width: 100px;
+  padding: 7px 5px;
+}
+.tableHeadStyle2 td:nth-child(12) {
+  width: 100px;
+  padding: 7px 5px;
+}
+.tableHeadStyle2 td:nth-child(2) {
+  width: 100px;
+  padding: 7px 5px;
+}
+.tableHeadStyle2 td:nth-child(3) {
+  width: 100px;
+  padding: 7px 5px;
+}
+.bodyStyle {
+  display: block;
+  background-color: #fff;
+}
+.bodyStyle tr > td:nth-last-child(2) {
+  color: #0000ff;
+}
+.bodyContent td {
+  //background-color: #fff;
+  height: 20px;
+}
+.bodyContent td:nth-last-child(2) a {
+  color: #0000ff;
+}
+.operationStyle {
+  color: #0000ff;
+  display: flex;
+  justify-content: space-around;
+}
+.xiahuaxian {
+  text-decoration: underline;
+}
+.operationStyle span {
+  color: #0000ff;
+}
+.fileOperation {
+  display: flex;
+  justify-content: flex-start;
+  margin: 10px;
+  align-items: center;
+}
+.fileOperation button {
+  border-radius: 4px;
+}
+.fileOperation span {
+  margin-right: 16px;
+}
+.fileOperation {
+  border-radius: 4px;
+  label {
+    margin-right: 16px;
+    height: 30px;
+    line-height: 30px;
+    width: 56px;
+    background-color: #0056a0;
+    color: #fff;
+    text-align: center;
+    font-size: 14px;
+    input {
+      display: none;
+    }
+  }
+}
+
+.timeLimitStyle {
+  padding: 10px;
+}
+
+.modal-backdrop {
+  position: fixed;
+  top: 0;
+  right: 0;
+  bottom: 0;
+  left: 0;
+  background-color: rgba(0, 0, 0, 0.3);
+  display: flex;
+  justify-content: center;
+  align-items: center;
+}
+.modal {
+  background-color: #ffffff;
+  box-shadow: 2px 2px 20px 1px;
+  overflow-x: auto;
+  display: flex;
+  flex-direction: column;
+  width: 500px;
+  border-radius: 0px;
+  height: 230px;
+}
+.modal-footer {
+  border-top: 1px solid #eee;
+  position: relative;
+  top: 124px;
+  left: 232px;
+  width: 208px;
+  display: flex;
+  justify-content: space-between;
+  padding: 0px;
+}
+.modal-footer button {
+  border-radius: 4px;
+  margin-left: 0px;
+  width: 80px;
+  font-size: 14px;
+}
+
+.modal-footer button:nth-child(1) {
+  background-color: #0056a0;
+}
+.modal-footer button:nth-child(2) {
+  background-color: #eeeeee;
+}
+.modal-body {
+  position: relative;
+  top: 64px;
+  margin-left: 50px;
+  padding: 0px;
+}
+.btn-close,
+.btn-confirm {
+  margin-left: 16px;
+  width: 56px;
+  height: 36px;
+  border: none;
+  cursor: pointer;
+}
+.btn-close {
+  color: #313131;
+  background-color: gray;
+}
+.btn-confirm {
+  color: #fff;
+  background-color: #2d8cf0;
+}
+.bodyRow {
+  font-size: 16px;
+  font-family: Arial;
+}
+/* .tablePageStyle{
+  position: relative;
+  left: 266px;
+} */
+.pageBottom {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+}
+.topLeftTitle {
+  height: 50px;
+  display: flex;
+  align-items: center;
+  margin-bottom: 6px;
+}
+.addButton {
+  color: white;
+}
+.addButton button{
+  width: 80px;
+  border-radius: 4px;
+}
+.upHead {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+}
+</style>