Explorar o código

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

suxinf %!s(int64=4) %!d(string=hai) anos
pai
achega
2a9dfc6677

+ 134 - 24
src/components/Modal.vue

@@ -7,32 +7,50 @@
       </div>
       <div class="modal-body">
         <div class="bodyRow">
-          <span>资料名称</span
-          ><select name="" id="">
-            <option value="">请选择</option>
+          <span>资料名称</span>
+          <select>
+            <option
+              v-for="(item, index) in dataName"
+              :key="index"
+              :value="item.informationName"
+            >
+              {{ item.informationName }}
+            </option>
           </select>
         </div>
         <div class="bodyRow timeWidth">
-          <span>发布时间</span><input type="datetime" placeholder="选择时间" />
+          <span>发布时间</span><input type="date" placeholder="选择时间" />
         </div>
         <div class="bodyRow">
           <div class="contentCol1">
             <span>车系</span
             ><select name="" id="">
-              <option value="">请选择</option>
+              <option
+                v-for="(item, index) in carSeries"
+                :key="index"
+                :value="item.typeName"
+              >
+                {{ item.typeName }}
+              </option>
             </select>
           </div>
           <div class="contentCol2">
             <span>车型</span
             ><select name="" id="">
-              <option value="">请选择</option>
+              <option
+                v-for="(item, index) in carSeries"
+                :key="index"
+                :value="item.typeName"
+              >
+                {{ item.typeName }}
+              </option>
             </select>
           </div>
         </div>
         <div class="bodyRow">
           <div class="contentCol1">
             <span>发布平台</span>
-            <div>汽车之家</div>
+            <div>{{selectedPlatform}}</div>
           </div>
 
           <div class="contentCol2">
@@ -52,13 +70,25 @@
           <div class="contentCol1">
             <span>内容分类1</span
             ><select name="" id="">
-              <option value="">请选择</option>
+              <option
+                v-for="(item, index) in content1"
+                :key="index"
+                :value="item.id"
+              >
+                {{ item.platformName }}
+              </option>
             </select>
           </div>
           <div class="contentCol2">
             <span>内容分类2</span
             ><select name="" id="">
-              <option value="">请选择</option>
+              <option
+                v-for="(item, index) in content2"
+                :key="index"
+                :value="item.id"
+              >
+                {{ item.platformName }}
+              </option>
             </select>
           </div>
         </div>
@@ -74,11 +104,7 @@
       </div>
       <div class="modal-footer">
         <!-- <button type="button" class="btn-confirm" @click="confirm">确认</button> -->
-        <button
-          type="button"
-          class="btn-confirm"
-          @click="onSubmit('form'), edit()"
-        >
+        <button type="button" class="btn-confirm" @click="closeSelf(), edit()">
           确认
         </button>
         <button type="button" class="btn-close" @click="closeSelf">取消</button>
@@ -97,23 +123,39 @@ export default {
         return [];
       },
     },
+    selectedPlatform: {
+      type: String,
+      default: () => {
+        return "";
+      },
+    },
   },
   data() {
     return {
+      dataName: [],
+      carSeries: [],
+      carType: [],
+      content1: [],
+      content2: [],
+
+      carTypeName: "",
+      contentTypeName: "",
+      informationId: "",
       mediaTitle: "",
       mediaUrl: "",
+      projectTypeName: "",
+      publishDate: "",
+      publishSourceName: "",
     };
   },
   methods: {
     closeSelf() {
       this.$emit("closeme");
     },
-    onSubmit() {
-      this.$emit("closeme");
-    },
     edit: function () {
       let config = {
-        url: "/dealerDownload",
+        url: "/dealerFeedback", //message: "没有找到经销商信息"
+        // url: "/importDealerFeedback", //message: "没有要导入的文件"
         data: {
           Title: this.mediaTitle,
           Url: this.mediaUrl,
@@ -122,15 +164,83 @@ export default {
       console.log("edit2:", config);
       this.$emit("update", config);
     },
-    test: function () {
-      this.mediaTitle = this.LinkData.mediaTitle;
-      this.mediaUrl = this.LinkData.mediaUrl;
-      console.log("test1:", this.LinkData);
-      console.log("test2:", this.mediaTitle);
+    //资料名称列表
+    chooseDataName: function () {
+      this.$http({
+        url: "/firmsUploadListByAgent",
+        method: "post",
+        data: {},
+      })
+        .then((res) => {
+          if (res.data.code === 200) {
+            this.dataName = res.data.data;
+          }
+        })
+        .catch((err) => {
+          console.log(err);
+        });
+    },
+    //不分页查询车系车型信息
+    chooseCarSeriesAndType: function () {
+      this.$http({
+        url: "/base/carTypeManager/selectCarTypeList",
+        method: "post",
+        data: {},
+      })
+        .then((res) => {
+          if (res.data.code === 200) {
+            this.carSeries = res.data.data;
+            console.log("chooseCarSeriesAndType1", this.carSeries);
+          }
+        })
+        .catch((err) => {
+          console.log(err);
+        });
+    },
+    //不分页查询发布平台信息 内容分类1
+    contentClassify: function () {
+      this.$http({
+        url: "/base/publishPlatformManager/selectPublishPlatformList",
+        method: "post",
+        data: {
+          dictCode: "content1",
+        },
+      })
+        .then((res) => {
+          if (res.data.code === 200) {
+            this.content1 = res.data.data;
+          }
+          console.log("contentClassify1", res);
+        })
+        .catch((err) => {
+          console.log(err);
+        });
+    },
+    //不分页查询发布平台信息 内容分类2
+    contentClassify2: function () {
+      this.$http({
+        url: "/base/publishPlatformManager/selectPublishPlatformList",
+        method: "post",
+        data: {
+          dictCode: "content2",
+        },
+      })
+        .then((res) => {
+          if (res.data.code === 200) {
+            this.content2 = res.data.data;
+          }
+          console.log("contentClassify2", res);
+        })
+        .catch((err) => {
+          console.log(err);
+        });
     },
   },
   mounted() {
-    this.test();
+    this.chooseDataName();
+    this.chooseCarSeriesAndType();
+    this.contentClassify();
+    this.contentClassify2();
   },
 };
 </script>

+ 20 - 4
src/views/data/InforList.vue

@@ -99,7 +99,11 @@
       </div>
     </div>
     <div v-else>
-      <Detail :detailData="tableData" :nowIndex="nowIndex" :fileData="tableFileData"></Detail>
+      <Detail
+        :detailData="tableData"
+        :nowIndex="nowIndex"
+        :fileData="tableFileData"
+      ></Detail>
     </div>
   </div>
 </template>
@@ -274,7 +278,7 @@ export default {
         .catch((err) => {
           console.log(err);
         });
-        this.initialPage = !this.initialPage;
+      this.initialPage = !this.initialPage;
     },
     //获取资料列表
     getDataList: function () {
@@ -350,10 +354,22 @@ export default {
     searchByCondition: function () {
       console.log("insearchByCondition", this.searchName);
       let asc = this.timeSortVal === "asc" ? false : true;
-      let reportId = this.reportSortVal === "already" ? true : false;
+      let report = "";
+      if (this.reportSortVal === "already") {
+        report = this.reportSortVal === "already" ? true : false;
+      } else if (this.reportSortVal === "notyet") {
+        report = this.reportSortVal === "notyet" ? false : true;
+      }
+      let download = "";
+      if (this.downloadSortVal === "already") {
+        download = this.downloadSortVal === "already" ? true : false;
+      } else if (this.downloadSortVal === "notyet") {
+        download = this.downloadSortVal === "notyet" ? false : true;
+      }
       let data = {
         asc: asc,
-        reportId: reportId,
+        report: report,
+        download: download,
       };
       this.newGetDataList(data);
     },

+ 57 - 23
src/views/data/UploadLink.vue

@@ -4,9 +4,10 @@
     <span>针对论坛及其他平台链接上传</span>
     <div class="contentHead">
       <span>上传平台</span>
-      <select name="" id="">
-        <option value="">汽车之家</option>
-        <option value="">请选择</option>
+      <select name="" id="" v-model="platformVal" @change="choosePlatform">
+        <option v-for="(item, index) in platform" :key="index" :value="item.platformName">
+          {{ item.platformName }}
+        </option>
       </select>
     </div>
     <div class="tableBox">
@@ -15,7 +16,7 @@
           <tr class="tableHeadStyle1">
             <td>论坛传播情况汇总</td>
           </tr>
-          <tr class="tableHeadStyle2">
+          <tr class="tableHeadStyle2 tableHeadStyle3">
             <td v-for="(item, index) in tableHeader" :key="index">
               {{ item }}
             </td>
@@ -29,25 +30,25 @@
             :class="{ table_gray: index % 2 === 0 }"
           >
             <td v-if="flag">{{ index + 1 }}</td>
-            <td>{{ obj.informationId || "2021/03/04" }}</td>
+            <td>{{ obj.informationId }}</td>
             <!-- 资料名称 待定-->
-            <td>{{ obj.publishDate || "2021/03/04" }}</td>
+            <td>{{ obj.publishDate }}</td>
             <!-- 发布日期 -->
-            <td>{{ obj.carTypeName || "2021/03/04" }}</td>
+            <td>{{ obj.carTypeName }}</td>
             <!-- 车系 -->
-            <td>{{ obj.carPlatformName || "2021/03/04" }}</td>
+            <td>{{ obj.carPlatformName }}</td>
             <!-- 车型 -->
-            <td>{{ obj.publishSourceName || "2021/03/04" }}</td>
+            <td>{{ obj.publishSourceName }}</td>
             <!-- 发布版块 -->
-            <td>{{ obj.projectTypeName || "2021/03/04" }}</td>
+            <td>{{ obj.projectTypeName }}</td>
             <!-- 项目分类 -->
-            <td>{{ obj.contentTypeName || "2021/03/04" }}</td>
+            <td>{{ obj.contentTypeName }}</td>
             <!-- 内容分类 -->
-            <td>{{ obj.contentTypeName || "2021/03/04" }}</td>
+            <td>{{ obj.contentTypeName }}</td>
             <!-- 内容分类 -->
-            <td>{{ obj.mediaTitle || "2021/03/04" }}</td>
+            <td>{{ obj.mediaTitle }}</td>
             <!-- 稿件标题 -->
-            <td>{{ obj.mediaUrl || "2021/03/04" }}</td>
+            <td>{{ obj.mediaUrl }}</td>
             <!-- 链接 -->
             <td class="operationStyle">
               <span @click="toggleModal(index)">编辑</span>
@@ -70,6 +71,7 @@
       v-on:closeme="closeme"
       :Linkdata="tableData"
       @update="editTitle"
+      :selectedPlatform="selectedPlatform"
     ></Modal>
 
     <div class="timeLimitStyle">
@@ -160,6 +162,9 @@ export default {
   },
   data() {
     return {
+      platform: [],
+      platformVal: "",
+      selectedPlatform: "",
       nowIndex: 0,
       /* modal */
       feedbackTimeLimit: 6,
@@ -266,7 +271,6 @@ export default {
     toggleModal: function (i) {
       this.showModal = !this.showModal;
       this.modalData = this.tableData[i];
-      console.log("INtoggleModal", this.modalData);
     },
     closeme: function () {
       this.showModal = !this.showModal;
@@ -297,7 +301,7 @@ export default {
       console.log("editTitle文件:", val);
       //this.Linkdata = new Array(val);
       this.$http({
-        url: "/dealerFeedback",
+        url: val.url,
         method: "post",
         data: val.data,
       })
@@ -349,11 +353,14 @@ export default {
       console.log(this.currentPage);
     },
     //获取资料列表
-    getDataList: function () {
+    getDataList: function (config) {
       this.$http({
         url: "/firmsLinkUpload",
         method: "post",
-        data: {},
+        data: {
+          //id: config,
+          platformName: config,
+        },
       })
         .then((res) => {
           if (res.data.code === 200) {
@@ -436,9 +443,33 @@ export default {
       // 以二进制方式打开文件
       fileReader.readAsBinaryString(files[0]); */
     },
+    //获取平台列表
+    getPlatform: function () {
+      this.$http({
+        url: "/base/publishPlatformManager/selectPublishPlatformList",
+        method: "post",
+        data: {},
+      })
+        .then((res) => {
+          if (res.data.code === 200) {
+            this.platform = res.data.data;
+          }
+        })
+        .catch((err) => {
+          console.log(err);
+        });
+        
+    },
+    //下拉选择平台
+    choosePlatform: function () {
+      console.log(this.platformVal)
+      this.selectedPlatform = this.platformVal;
+      this.getDataList(this.platformVal);
+    },
+    
   },
   mounted() {
-    //this.getDataList();
+    this.getPlatform();
   },
 };
 </script>
@@ -473,8 +504,8 @@ export default {
     }
   }
 }
-.table_gray {
-  background-color: #00549f;
+.table_gray td{
+  background-color: #eeeeee;
 }
 .tableBox table {
   border-collapse: collapse;
@@ -504,7 +535,7 @@ export default {
   padding: 7px 5px;
 }
 .tableHeadStyle2 {
-  background: #848484;
+ // background: #848484;
   height: 30px;
   color: #fff;
   display: flex;
@@ -514,6 +545,9 @@ export default {
   width: 100px;
   padding: 7px 5px;
 }
+.tableHeadStyle3 td {
+  background: #848484;
+}
 .tableHeadStyle2 td:nth-child(1) {
   width: 60px;
 }
@@ -545,7 +579,7 @@ export default {
   color: #0000ff;
 }
 .bodyContent td {
-  background-color: #fff;
+  //background-color: #fff;
   height: 20px;
 }
 .operationStyle {

+ 4 - 2
src/views/data/components/InfoListItemDetail.vue

@@ -101,7 +101,9 @@ export default {
       console.log("下载附件:", config);
       return new Promise((resolve, reject) => {
         this.$http({
-          url: '/selectInformationFileList',
+          //dealerDownload
+          //url: '/selectInformationFileList',
+          url: '/dealerDownload',
           method: "post",
           data: config,
         })
@@ -190,7 +192,7 @@ export default {
 /* .detail span:nth-child(2){
   width: 150px;
 } */
-.filesName{
+.filesName p{
   color: #4B8EC7;
 }
 </style>