소스 검색

测试问题修改。 反馈页面逻辑梳理。 其他细节修改。

liuYb 4 년 전
부모
커밋
7faf3936a0
5개의 변경된 파일149개의 추가작업 그리고 207개의 파일을 삭제
  1. 12 14
      src/components/Modal.vue
  2. 22 8
      src/views/data/InforList.vue
  3. 48 43
      src/views/data/UploadLink.vue
  4. 62 129
      src/views/data/UploadLink/sonUploadLink.vue
  5. 5 13
      src/views/data/components/UploadLinkModalDelete.vue

+ 12 - 14
src/components/Modal.vue

@@ -101,21 +101,21 @@
         <div class="bodyRow">
           <div class="contentCol1">
             <span>阅读量</span>
-            <input type="number" placeholder="" v-model="readCount" />
+            <input type="number" placeholder="" min="0" v-model="readCount" />
           </div>
           <div class="contentCol2">
             <span>点赞</span>
-            <input type="number" placeholder="" v-model="goodCount" />
+            <input type="number" placeholder="" min="0" v-model="goodCount" />
           </div>
         </div>
         <div class="bodyRow">
           <div class="contentCol1">
             <span>评论</span>
-            <input type="number" placeholder="" v-model="bbsCount" />
+            <input type="number" placeholder="" min="0" v-model="bbsCount" />
           </div>
           <div class="contentCol2">
             <span>在看/转发</span>
-            <input type="number" placeholder="" v-model="lookingCount" />
+            <input type="number" placeholder="" min="0" v-model="lookingCount" />
           </div>
         </div>
         <div class="bodyRow longInput">
@@ -199,17 +199,16 @@ export default {
   methods: {
     closeSelf() {
       this.$emit("closeme");
-      //  console.log(this.LinkData);
     },
 
     edit: function () {
       let obj = {};
       //获取资料名
-      let idVal = this.ziliaoId;
+     /*  let idVal = this.ziliaoId;
       obj = this.dataName.find(function (item) {
         return item.id === idVal;
       });
-      this.ziliaoName = obj.informationName;
+      this.ziliaoName = obj.informationName; */
       //获取车系 id
       let nameCarS = this.carS;
       obj = this.carSeries.find(function (item) {
@@ -269,7 +268,7 @@ export default {
       this.$emit("update", config);
       this.$emit("closeme");
     },
-    addInfo: function () {
+  /*   addInfo: function () {
       let obj = {};
       //获取资料名
       let idVal = this.ziliaoId;
@@ -297,7 +296,7 @@ export default {
       let config = {
         url: "/dealerFeedback",
         data: {
-          // id: "", //主键值
+          id: "", //主键值
           month: d,
           dealerId: "254",
           dataId: this.ziliaoId,
@@ -305,14 +304,12 @@ export default {
           releaseTime: this.ziliaoTime,
           carService: this.carS,
           carType: this.carT,
-          //releasePlate: this.selectedPlatform,
-          //releaseMedia: this.releaseP,
           //发布板块
           releasePlate: this.releaseP,
           //发布平台
           releaseMedia: this.selectedPlatform,
+          
           draftGenre: this.contentName1,
-
           //内容分类2?
           contentClass: this.contentName2,
           articleTitle: this.mediaTitle,
@@ -326,7 +323,7 @@ export default {
       };
       this.$emit("update", config);
       this.$emit("closeme");
-    },
+    }, */
     //资料名称列表
     chooseDataName: function () {
       this.$http({
@@ -484,7 +481,8 @@ export default {
 
     initialData: function () {
       this.ziliaoId = this.LinkData.informationId;
-
+/* console.log(this.LinkData)
+console.log(this.ziliaoId) */
       this.mediaTitle = this.LinkData.mediaTitle;
       this.mediaUrl = this.LinkData.mediaUrl;
       this.carS = this.LinkData.carTypeName;

+ 22 - 8
src/views/data/InforList.vue

@@ -87,12 +87,19 @@
                   <!--  :class="{ reportStyle: obj.report == 0 ? true : false }" -->
                   <!-- <span :class="!showItemOperation">已完成</span> -->
                   <span
-                    @click="waitToReport(obj.report, index)"
-                    :class="{showItemOperationStyle: obj.report == 1 ? true : false}"
+                    @click="waitToReport(obj, index)"
+                    :class="{
+                      showItemOperationStyle: obj.report == 1 ? true : false,
+                    }"
                     class="reportStyle"
                     >待办</span
                   >
-                  <span :class="{showItemOperationStyle: obj.report == 0 ? true : false}">已完成</span>
+                  <span
+                    :class="{
+                      showItemOperationStyle: obj.report == 0 ? true : false,
+                    }"
+                    >已完成</span
+                  >
                 </td>
 
                 <td v-if="operation" :style="trStyle" class="operationStyle">
@@ -233,14 +240,14 @@ export default {
       return this.$route.query && this.$route.query.tag ? true : false;
     },
     showItemOperation: function () {
-      console.log(this.localReport)
+      console.log(this.localReport);
       if (!this.localReport) {
         console.log(this.localReport);
         return { showItemOperationStyle: false };
       } else {
         return { showItemOperationStyle: true };
       }
-     /*  let now = new Date().getTime();
+      /*  let now = new Date().getTime();
      if (!this.endDate) {
         console.log("超出反馈时间", this.endDate);
         return { showItemOperationStyle: true };
@@ -370,6 +377,7 @@ export default {
         url: "/firmsUploadListByAgent",
         method: "post",
         data: {
+          asc: false,
           agentId: this.userId,
           Page: this.currentPage,
           Rows: this.pageSize,
@@ -497,12 +505,17 @@ export default {
       }
     },
     //待办跳转
-    waitToReport: function (flag, i) {
+    waitToReport: function (obj, i) {
       this.endDate = this.tableData[i].endDate;
       this.localReport = this.tableData[i].report;
-      if (flag) {
+      console.log(obj.report == 0, obj.download == 0);
+      console.log(obj);
+      if (obj.report == 0 && obj.download != 0) {
         console.log("待办跳转");
-        this.$router.replace({ path: "/uploadLink/sonuploadLink" });
+        this.$router.push({
+          path: "/uploadLink/sonUploadLink",
+          query: { informationName: obj.informationName, id: obj.id },
+        });
       }
     },
   },
@@ -613,6 +626,7 @@ export default {
 }
 .reportStyle {
   text-decoration: underline;
+  cursor: pointer;
 }
 .showItemOperationStyle {
   display: none;

+ 48 - 43
src/views/data/UploadLink.vue

@@ -81,20 +81,12 @@
               <!-- 链接 -->
 
               <td class="operationStyle" style="cursor: pointer">
-                <span @click="toggleModal(index)" :class="showItemOperation"
+                <!-- <span @click="toggleModal(index)" :class="showItemOperation"
                   >编辑</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>
+                > -->
+                <span @click="toggleModal(index)">编辑</span>
+                <span @click="viewHistoryRecord(obj, index)">查看</span>
+                <!-- <span @click="toggleModal2(index)">删除</span> -->
               </td>
             </tr>
           </tbody>
@@ -110,6 +102,15 @@
         :releaseMedia="releaseMedia"
       ></Modal>
 
+      <!-- 弹窗: 确定删除? -->
+      <deleteModal
+        v-if="showModal2"
+        @dataDel="toDel"
+        @hide_modal="closeme2"
+        :LinkData="modalData"
+        :showModalFlag="showModal2"
+      ></deleteModal>
+
       <!--    <div class="timeLimitStyle">
         <span>仅可对上传时间为{{ feedbackTimeLimit }}个月内的资料进行反馈</span>
       </div> -->
@@ -141,12 +142,19 @@
             >导出</label
           >
         </div>
-        <TablePage
-          :currentPage="currentPage"
-          :totalPage="totalPage"
-          @change_page="changePage"
-          @jump_page="jumpPage"
-        ></TablePage>
+        <div
+          style="display: flex; justify-content: center; align-items: center"
+        >
+          <TablePage
+            :currentPage="currentPage"
+            :totalPage="totalPage"
+            @change_page="changePage"
+            @jump_page="jumpPage"
+          ></TablePage>
+          <p style="margin-left: 16px">
+            共{{ totalPage }}页,共{{ sum }}条数据
+          </p>
+        </div>
       </div>
 
       <!-- 弹窗: 上传链接超过剩余限制数量,请修改后重新导入 -->
@@ -217,7 +225,6 @@ export default {
       releaseMedia: [],
       selectedPlatform: "",
       selectedPlatformId: "",
-      nowIndex: 0,
       /* modal */
       feedbackTimeLimit: 0,
       showModal: false,
@@ -287,7 +294,6 @@ export default {
       file: "",
       dictList: [],
       onlineUrl: env_url, //'http://8.140.188.129:8080'线上 //http://8.136.230.133:8080 //测试
-      //firmsDataCount: null,
       userId: 254,
       //截止日期
       endTime: "",
@@ -315,19 +321,6 @@ export default {
     },
   },
   methods: {
-    /*  CurentTime: function () {
-      var now = new Date();
-      var year = now.getFullYear(); //年
-      var month = now.getMonth() + 1; //月
-      var day = now.getDate(); //日
-      var clock = year + "/";
-
-      if (month < 10) clock += "0";
-      clock += month + "/";
-      if (day < 10) clock += "0";
-      clock += day;
-      return clock;
-    }, */
     /*toggleModal:点击编辑后弹窗; toggleModal2:点击删除后弹窗; toggleModal3:点击导入后弹窗;  */
     toggleModal: function (i) {
       this.showModal = !this.showModal;
@@ -342,9 +335,7 @@ export default {
     //删除
     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;
@@ -372,18 +363,30 @@ export default {
         .then((res) => {
           console.log(res);
           //更新数据
-          this.choosePlatform();
+          //this.choosePlatform();
+          //更新数据
+          let config = {
+            Page: this.currentPage,
+            Rows: this.pageSize,
+            agentId: this.userId,
+          };
+          this.getDataList(config);
         })
         .catch((err) => {
           console.log(err);
         });
     },
 
-    toDel: function (n) {
-      console.log("inToDel:", n);
+    toDel: function () {
       this.showModal2 = !this.showModal2;
       //更新数据
-      this.choosePlatform();
+      //this.choosePlatform();
+      let config = {
+        Page: this.currentPage,
+        Rows: this.pageSize,
+        agentId: this.userId,
+      };
+      this.getDataList(config);
     },
     /* 表格翻页 */
     changePage: function (page) {
@@ -439,6 +442,7 @@ export default {
             let data = res.data.data;
             console.log(data);
             this.sum = res.data.count;
+            this.tableData = [];
             for (let i = 0, j = 0; j < data.length; i++, j++) {
               this.$set(this.tableData, i, data[j]);
             }
@@ -462,7 +466,7 @@ export default {
                 this.$set(this.tableData[i], "publishDate", newValue);
               }
             }
-            //   console.log(this.tableData);
+            //console.log(this.tableData);
           }
         })
         .catch((err) => {
@@ -690,9 +694,10 @@ export default {
           console.log(err);
         });
     },
-    viewHistoryRecord: function () {
-      this.$router.replace({
+    viewHistoryRecord: function (obj, index) {
+      this.$router.push({
         path: "uploadLink/sonUploadLink",
+        query: { informationName: obj.informationName, id: obj.id, i: index },
       });
     },
     isFather: function () {

+ 62 - 129
src/views/data/UploadLink/sonUploadLink.vue

@@ -4,7 +4,7 @@
       <div class="topLeftTitle">针对论坛及其他平台链接上传</div>
       <button class="addButton" @click="addInfo()">新增反馈</button>
     </div>
-    
+
     <div class="tableBox">
       <table class="feedbackTable">
         <thead class="theadStyle">
@@ -37,13 +37,13 @@
             <td>{{ obj.publishSourceName }}</td>
             <!-- 平台板块 发布版块-->
 
-            <td>{{ obj.informationName }}</td>
+            <td>{{ obj.readCount }}</td>
             <!-- 阅读量 -->
-            <td>{{ obj.informationName }}</td>
+            <td>{{ obj.goodCount }}</td>
             <!-- 点赞 -->
-            <td>{{ obj.informationName }}</td>
+            <td>{{ obj.bbsCount }}</td>
             <!-- 评论 -->
-            <td>{{ obj.informationName }}</td>
+            <td>{{ obj.lookingCount }}</td>
             <!-- 在看/转发 -->
 
             <!--  <td>{{ obj.carTypeName }}</td> -->
@@ -57,9 +57,11 @@
             <!-- 内容分类 内容分类2 -->
             <td>{{ obj.carPlatformName }}</td>
             <!-- 车型 -->
-            <td>{{ obj.informationName }}</td>
-            <!-- 反馈状态 -->
-            <td>{{ obj.informationName }}</td>
+            <td :class="{ weiFanKui: !obj.id }">
+              {{ obj.id ? "已反馈" : "未反馈" }}
+            </td>
+            <!-- 反馈状态  未定-->
+            <td>{{ obj.endDate }}</td>
             <!-- 反馈截止日期 -->
             <td>{{ obj.mediaTitle }}</td>
             <!-- 稿件标题 -->
@@ -69,17 +71,10 @@
             <!-- 链接 -->
 
             <td class="operationStyle" style="cursor: pointer">
-              <span @click="toggleModal(index)" :class="showItemOperation">编辑</span>
-              <span @click="toggleModal2(index)" :class="showItemOperation">删除</span>
-              <!-- 弹窗: 确定删除? -->
-              <deleteModal
-                v-if="showModal2"
-                @dataDel="toDel"
-                @hide_modal="closeme2"
-                :LinkData="modalData"
-                :showModalFlag="showModal2"
-                :chooseItemIndex="nowIndex"
-              ></deleteModal>
+              <span @click="toggleModal(index)">编辑</span>
+              <!-- :class="showItemOperation" -->
+              <span @click="toggleModal2(index)">删除</span>
+              <!-- :class="showItemOperation" -->
             </td>
           </tr>
         </tbody>
@@ -95,48 +90,23 @@
       :releaseMedia="releaseMedia"
     ></Modal>
 
+    <!-- 弹窗: 确定删除? -->
+    <deleteModal
+      v-if="showModal2"
+      @dataDel="toDel"
+      @hide_modal="closeme2"
+      :LinkData="modalData"
+      :showModalFlag="showModal2"
+    ></deleteModal>
+
     <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>
+      <p style="margin-left: 16px">共{{ totalPage }}页,共{{ sum }}条数据</p>
     </div>
   </div>
 </template>
@@ -145,7 +115,7 @@
 import Modal from "../../../components/Modal";
 import TablePage from "../../../components/TablePage";
 import deleteModal from "../../data/components/UploadLinkModalDelete";
-import { env_url } from "../../../config/env"
+import { env_url } from "../../../config/env";
 
 export default {
   props: {},
@@ -163,7 +133,6 @@ export default {
       releaseMedia: [],
       selectedPlatform: "",
       selectedPlatformId: "",
-      nowIndex: 0,
       /* modal */
       feedbackTimeLimit: 0,
       showModal: false,
@@ -195,16 +164,33 @@ export default {
         "操作",
       ],
       tableData: [
-          {
-          informationId: "2021/03/04",
-          publishDate: "雷克萨斯ES上市",
-          carTypeName: "雷克萨斯ES",
-          carPlatformName: "ES雷克萨斯",
-          publishSourceName: "S雷克萨斯",
-          projectTypeName: "东区1",
-          contentTypeName: "雷克萨斯ES",
-          mediaTitle: "ES雷克萨斯",
-          mediaUrl: "",
+        {
+          accountId: null,
+          bbsCount: 0,
+          carPlatformName: null,
+          carTypeName: null,
+          contentTypeName: null,
+          dlrCode: null,
+          dlrName: null,
+          endDate: null,
+          endTime: null,
+          goodCount: 0,
+          id: "1384738850966597634",
+          informationId: null,
+          informationName: "1",
+          localArea: null,
+          lookingCount: 0,
+          mediaTitle: null,
+          mediaTypeName: null,
+          mediaUrl: null,
+          projectTypeName: null,
+          publishDate: null,
+          publishPlatformName: null,
+          publishSourceName: null,
+          queryParams: null,
+          readCount: 0,
+          reportDate: null,
+          startTime: null,
         },
       ],
       flag: true,
@@ -233,8 +219,10 @@ export default {
       file: "",
       dictList: [],
       onlineUrl: env_url, //'http://8.140.188.129:8080'线上 //http://8.136.230.133:8080 //测试
-      firmsDataCount: null,
+
       userId: 254,
+      informationName: this.$route.query.informationName || "",
+      ziliaoId: this.$route.query.informationId || "",
     };
   },
   computed: {
@@ -244,38 +232,15 @@ export default {
     },
     //是否隐藏编辑按钮 时间判断
     showItemOperation: function () {
-/*       let myDate = new Date();
-      myDate.getTime();
-console.log(myDate) */
-      let nowDate = this.CurentTime();
-     /*  2021-04-09T10:47:08.176 */
       if (!this.endTime) {
-        console.log(nowDate);
         return { showItemOperationStyle: true };
       } else {
         console.log(this.endTime);
-        if (nowDate < this.endTime) {
-          return { showItemOperationStyle: false };
-        }else{
-          return { showItemOperationStyle: true };
-        }
+        return { showItemOperationStyle: false };
       }
     },
   },
   methods: {
-    CurentTime: function () {
-      var now = new Date();
-      var year = now.getFullYear(); //年
-      var month = now.getMonth() + 1; //月
-      var day = now.getDate(); //日
-      var clock = year + "/";
-
-      if (month < 10) clock += "0";
-      clock += month + "/";
-      if (day < 10) clock += "0";
-      clock += day;
-      return clock;
-    },
     /*toggleModal:点击编辑后弹窗; toggleModal2:点击删除后弹窗; toggleModal3:点击导入后弹窗;  */
     toggleModal: function (i) {
       this.showModal = !this.showModal;
@@ -287,25 +252,11 @@ console.log(myDate) */
     //删除
     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);
@@ -326,17 +277,6 @@ console.log(myDate) */
 
     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;
       //更新数据
 
@@ -381,17 +321,13 @@ console.log(myDate) */
       })
         .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++
-            ) {
+            console.log(data);
+            this.sum = res.data.count;
+            for (let i = 0, j = 0; 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;
@@ -651,13 +587,10 @@ console.log(myDate) */
   font-size: 16px;
   font-family: Arial;
 }
-/* .tablePageStyle{
-  position: relative;
-  left: 266px;
-} */
+
 .pageBottom {
   display: flex;
-  justify-content: space-between;
+  justify-content: flex-end;
   align-items: center;
 }
 .topLeftTitle {

+ 5 - 13
src/views/data/components/UploadLinkModalDelete.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="modal-backdrop" v-show="showModalFlag">
+  <div class="modal-backdrop" v-if="showModalFlag">
     <div class="modal">
       <div class="modal-body">
         <div class="bodyRow">确定删除?</div>
@@ -21,10 +21,6 @@ export default {
       type: Boolean,
       default: true,
     },
-    chooseItemIndex: {
-      type: Number,
-      default: 0,
-    },
     LinkData: {
       type: Object,
       default: () => {
@@ -34,7 +30,6 @@ export default {
   },
   data() {
     return {
-      itemIndex: 0,
       deleteId: 0,
     };
   },
@@ -43,9 +38,6 @@ export default {
       this.$emit("hide_modal");
     },
     sonDataDel: function () {
-      this.itemIndex = this.chooseItemIndex;
-      
-
       this.$http({
         url: "/deleteAccountReportRecordInfo",
         method: "post",
@@ -55,7 +47,7 @@ export default {
       })
         .then((res) => {
           console.log("已删除", res);
-          this.$emit("dataDel", this.itemIndex);
+          this.$emit("dataDel");
         })
         .catch((err) => {
           console.log(err);
@@ -82,13 +74,13 @@ export default {
   right: 0;
   bottom: 0;
   left: 0;
-  background-color: rgba(0, 0, 0, 0.3);
+  background-color: rgb(0,0,0,0.3);
   display: flex;
   justify-content: center;
   align-items: center;
 }
 .modal {
-  background-color: #ffffff;
+  background-color: #eeeeee;
   box-shadow: 2px 2px 20px 1px;
   overflow-x: auto;
   display: flex;
@@ -118,7 +110,7 @@ export default {
   background-color: #0056a0;
 }
 .modal-footer button:nth-child(2) {
-  background-color: #eeeeee;
+  background-color: gray;
 }
 .modal-body {
   position: relative;